Skip to content

Commit d432153

Browse files
authored
Add setuptools runtime requirement (#2334)
* Add setuptools runtime requirement The `pkg_resources` module is provided by `setuptools`. The `setuptools` package is not part of the Python stdlib but is often available in the system environment as a build-time requirement. Explicitly listing `setuptools` as a requirement protects `opentelemetry-python` from breaking with import errors in cases where `setuptools` is not available system-wide. This commit pins the version to `setuptools >= 16.0` which is the first release that includes the required imports (2015). * Update CHANGELOG
1 parent 5771b54 commit d432153

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
([#2307](https://github.com/open-telemetry/opentelemetry-python/pull/2307))
1919
- Adding OTEL_LOGS_EXPORTER environment variable
2020
([#2320](https://github.com/open-telemetry/opentelemetry-python/pull/2320))
21+
- Add `setuptools` to `install_requires`
22+
([#2334](https://github.com/open-telemetry/opentelemetry-python/pull/2334))
2123
- Add otlp entrypoint for log exporter
2224
([#2322](https://github.com/open-telemetry/opentelemetry-python/pull/2322))
2325

exporter/opentelemetry-exporter-opencensus/setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ install_requires =
4646
opentelemetry-api ~= 1.3
4747
opentelemetry-sdk ~= 1.3
4848
protobuf >= 3.13.0
49+
setuptools >= 16.0
4950

5051
[options.packages.find]
5152
where = src

opentelemetry-api/setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ include_package_data = True
4545
install_requires =
4646
Deprecated >= 1.2.6
4747
aiocontextvars; python_version<'3.7'
48+
setuptools >= 16.0
4849

4950
[options.packages.find]
5051
where = src

opentelemetry-sdk/setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ include_package_data = True
4545
install_requires =
4646
opentelemetry-api == 1.8.0
4747
opentelemetry-semantic-conventions == 0.27b0
48+
setuptools >= 16.0
4849

4950
[options.packages.find]
5051
where = src

0 commit comments

Comments
 (0)