Skip to content

Commit 5fbc1db

Browse files
committed
Separated attach. Need to include new test location for repo auto tests
1 parent 5a53e49 commit 5fbc1db

File tree

8 files changed

+111
-8
lines changed

8 files changed

+111
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
## 1.0.0b1 (Unreleased)
4+
5+
- Separate from distro
6+
([#XXX](https://github.com/microsoft/ApplicationInsights-Python/pull/XXX))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License in the project root for
4+
# license information.
5+
# --------------------------------------------------------------------------
6+
7+
VERSION = "1.0.0b1"
+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/usr/bin/env python
2+
3+
# -------------------------------------------------------------------------
4+
# Copyright (c) Microsoft Corporation. All rights reserved.
5+
# Licensed under the MIT License. See License.txt in the project root for
6+
# license information.
7+
# --------------------------------------------------------------------------
8+
9+
10+
import os
11+
import re
12+
13+
from setuptools import find_packages, setup
14+
15+
# Change the PACKAGE_NAME only to change folder and different name
16+
PACKAGE_NAME = "azure-monitor-opentelemetry-autoinstrumentation"
17+
PACKAGE_PPRINT_NAME = "Azure Monitor Opentelemetry Distro for Auto-Instrumentation"
18+
19+
# a-b-c => a/b/c
20+
package_folder_path = PACKAGE_NAME.replace("-", "/")
21+
22+
23+
# azure v0.x is not compatible with this package
24+
# azure v0.x used to have a __version__ attribute (newer versions don't)
25+
try:
26+
import azure
27+
28+
try:
29+
ver = azure.__version__
30+
raise Exception(
31+
"This package is incompatible with azure=={}. ".format(ver)
32+
+ 'Uninstall it with "pip uninstall azure".'
33+
)
34+
except AttributeError:
35+
pass
36+
except ImportError:
37+
pass
38+
39+
# Version extraction inspired from 'requests'
40+
with open(os.path.join(package_folder_path, "_version.py"), "r") as fd:
41+
version = re.search(
42+
r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE
43+
).group(1)
44+
45+
if not version:
46+
raise RuntimeError("Cannot find version information")
47+
48+
setup(
49+
name=PACKAGE_NAME,
50+
version=version,
51+
description="Microsoft {} Client Library for Python".format(
52+
PACKAGE_PPRINT_NAME
53+
),
54+
long_description=open("README.md", "r").read(),
55+
long_description_content_type="text/markdown",
56+
license="MIT License",
57+
author="Microsoft Corporation",
58+
author_email="[email protected]",
59+
url="https://github.com/microsoft/ApplicationInsights-Python/tree/main/azure-monitor-opentelemetry",
60+
classifiers=[
61+
"Development Status :: 4 - Beta",
62+
"Programming Language :: Python",
63+
"Programming Language :: Python :: 3",
64+
"Programming Language :: Python :: 3.7",
65+
"Programming Language :: Python :: 3.8",
66+
"Programming Language :: Python :: 3.9",
67+
"Programming Language :: Python :: 3.10",
68+
"Programming Language :: Python :: 3.11",
69+
"License :: OSI Approved :: MIT License",
70+
],
71+
zip_safe=False,
72+
packages=find_packages(
73+
exclude=[
74+
"tests",
75+
"samples",
76+
# Exclude packages that will be covered by PEP420 or nspkg
77+
"azure",
78+
"azure.monitor",
79+
"azure.monitor.opentelemetry",
80+
]
81+
),
82+
include_package_data=True,
83+
package_data={
84+
"pytyped": ["py.typed"],
85+
},
86+
python_requires=">=3.7",
87+
install_requires=[
88+
"azure-monitor-opentelemetry>=1.0.0b12",
89+
],
90+
entry_points={
91+
"opentelemetry_distro": [
92+
"azure_monitor_opentelemetry_distro = azure.monitor.opentelemetry.autoinstrumentation._distro:AzureMonitorDistro"
93+
],
94+
"opentelemetry_configurator": [
95+
"azure_monitor_opentelemetry_configurator = azure.monitor.opentelemetry.autoinstrumentation._configurator:AzureMonitorConfigurator"
96+
],
97+
},
98+
)

Diff for: azure-monitor-opentelemetry/setup.py

-8
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,4 @@
9696
"opentelemetry-api==1.17.0",
9797
"opentelemetry-sdk==1.17.0",
9898
],
99-
entry_points={
100-
"opentelemetry_distro": [
101-
"azure_monitor_opentelemetry_distro = azure.monitor.opentelemetry.autoinstrumentation._distro:AzureMonitorDistro"
102-
],
103-
"opentelemetry_configurator": [
104-
"azure_monitor_opentelemetry_configurator = azure.monitor.opentelemetry.autoinstrumentation._configurator:AzureMonitorConfigurator"
105-
],
106-
},
10799
)

0 commit comments

Comments
 (0)