From 318a3a3afc05ee60801768ab37e3b1e3d6e535b0 Mon Sep 17 00:00:00 2001 From: Ofek Lev Date: Sat, 10 Sep 2022 07:51:24 -0400 Subject: [PATCH] Update package metadata opentelemetry-distro (#1304) --- opentelemetry-distro/MANIFEST.in | 7 ---- opentelemetry-distro/pyproject.toml | 56 +++++++++++++++++++++++++++ opentelemetry-distro/setup.cfg | 59 ----------------------------- opentelemetry-distro/setup.py | 27 ------------- 4 files changed, 56 insertions(+), 93 deletions(-) delete mode 100644 opentelemetry-distro/MANIFEST.in create mode 100644 opentelemetry-distro/pyproject.toml delete mode 100644 opentelemetry-distro/setup.cfg delete mode 100644 opentelemetry-distro/setup.py diff --git a/opentelemetry-distro/MANIFEST.in b/opentelemetry-distro/MANIFEST.in deleted file mode 100644 index 191b7d195..000000000 --- a/opentelemetry-distro/MANIFEST.in +++ /dev/null @@ -1,7 +0,0 @@ -prune tests -graft src -global-exclude *.pyc -global-exclude *.pyo -global-exclude __pycache__/* -include MANIFEST.in -include README.rst diff --git a/opentelemetry-distro/pyproject.toml b/opentelemetry-distro/pyproject.toml new file mode 100644 index 000000000..6707fc5c2 --- /dev/null +++ b/opentelemetry-distro/pyproject.toml @@ -0,0 +1,56 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "opentelemetry-distro" +dynamic = ["version"] +description = "OpenTelemetry Python Distro" +readme = "README.rst" +license = "Apache-2.0" +requires-python = ">=3.7" +authors = [ + { name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" }, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Typing :: Typed", +] +dependencies = [ + "opentelemetry-api ~= 1.12", + "opentelemetry-instrumentation == 0.33b0", + "opentelemetry-sdk == 1.12.0", +] + +[project.optional-dependencies] +otlp = [ + "opentelemetry-exporter-otlp == 1.12.0", +] +test = [] + +[project.entry-points.opentelemetry_configurator] +configurator = "opentelemetry.distro:OpenTelemetryConfigurator" + +[project.entry-points.opentelemetry_distro] +distro = "opentelemetry.distro:OpenTelemetryDistro" + +[project.urls] +Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-distro" + +[tool.hatch.version] +path = "src/opentelemetry/distro/version.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/src", + "/tests", +] + +[tool.hatch.build.targets.wheel] +packages = ["src/opentelemetry"] diff --git a/opentelemetry-distro/setup.cfg b/opentelemetry-distro/setup.cfg deleted file mode 100644 index 59f199a07..000000000 --- a/opentelemetry-distro/setup.cfg +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -[metadata] -name = opentelemetry-distro -description = OpenTelemetry Python Distro -long_description = file: README.rst -long_description_content_type = text/x-rst -author = OpenTelemetry Authors -author_email = cncf-opentelemetry-contributors@lists.cncf.io -url = https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-distro -platforms = any -license = Apache-2.0 -classifiers = - Development Status :: 4 - Beta - Intended Audience :: Developers - License :: OSI Approved :: Apache Software License - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Typing :: Typed - -[options] -python_requires = >=3.7 -package_dir= - =src -packages=find_namespace: -zip_safe = False -include_package_data = True -install_requires = - opentelemetry-api ~= 1.12 - opentelemetry-instrumentation == 0.33b0 - opentelemetry-sdk == 1.12.0 - -[options.packages.find] -where = src - -[options.entry_points] -opentelemetry_distro = - distro = opentelemetry.distro:OpenTelemetryDistro -opentelemetry_configurator = - configurator = opentelemetry.distro:OpenTelemetryConfigurator - -[options.extras_require] -test = -otlp = - opentelemetry-exporter-otlp == 1.12.0 diff --git a/opentelemetry-distro/setup.py b/opentelemetry-distro/setup.py deleted file mode 100644 index ddf6de91a..000000000 --- a/opentelemetry-distro/setup.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os - -import setuptools - -BASE_DIR = os.path.dirname(__file__) -VERSION_FILENAME = os.path.join( - BASE_DIR, "src", "opentelemetry", "distro", "version.py" -) -PACKAGE_INFO = {} -with open(VERSION_FILENAME, encoding="utf-8") as f: - exec(f.read(), PACKAGE_INFO) - -setuptools.setup(version=PACKAGE_INFO["__version__"],)