diff --git a/_template/pyproject.toml b/_template/pyproject.toml new file mode 100644 index 000000000..117bd3b59 --- /dev/null +++ b/_template/pyproject.toml @@ -0,0 +1,62 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +# opentelemetry-instrumentation plus the name of the library being instrument e.g +# name = "opentelemetry-instrumentation-sqlalchemy" +name = "" +dynamic = ["version"] +# a description of the instrumentation e.g +# description = "SQLAlchemy tracing for OpenTelemetry" +description = "" +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", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", +] +dependencies = [ + "opentelemetry-api ~= 1.12", +] + +[project.optional-dependencies] +test = [ + # add any test dependencies here + "", +] + +[project.entry-points.opentelemetry_instrumentor] +# REPLACE ME: the entrypoint for the instrumentor e.g +# sqlalchemy = "opentelemetry.instrumentation.sqlalchemy:SQLAlchemyInstrumentor" + = "opentelemetry.instrumentation." + +[project.urls] +# url of the instrumentation e.g +# Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-sqlalchemy" +Homepage = "" + +[tool.hatch.version] +# REPLACE ME: the path to the version file e.g +# "src/opentelemetry/instrumentation/sqlalchemy/version.py" +path = "src/opentelemetry/instrumentation//version.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/src", + "/tests", +] + +[tool.hatch.build.targets.wheel] +packages = ["src/opentelemetry"] diff --git a/_template/setup.cfg b/_template/setup.cfg deleted file mode 100644 index e34e38341..000000000 --- a/_template/setup.cfg +++ /dev/null @@ -1,58 +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] -# opentelemetry-instrumentation plus the name of the library being instrument e.g -# name = opentelemetry-instrumentation-sqlalchemy -name = "" -# a description of the instrumentation e.g -# description = SQLAlchemy tracing for OpenTelemetry -description = "" -long_description = file: README.rst -long_description_content_type = text/x-rst -author = OpenTelemetry Authors -author_email = cncf-opentelemetry-contributors@lists.cncf.io -# url of the instrumentation e.g -# url = https://github.com/open-telemetry/opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-sqlalchemy -url = "" -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 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - -[options] -python_requires = >=3.7 -package_dir= - =src -packages=find_namespace: - -install_requires = - opentelemetry-api ~= 1.12 - -[options.extras_require] -test = - # add any test dependencies here - "" - -[options.packages.find] -where = src - diff --git a/_template/setup.py b/_template/setup.py deleted file mode 100644 index e158a21c8..000000000 --- a/_template/setup.py +++ /dev/null @@ -1,42 +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( - # REPLACE ME: the path to the version file e.g - # BASE_DIR, "src", "opentelemetry", "instrumentation", "sqlalchemy", "version.py" - BASE_DIR, - "src", - "opentelemetry", - "instrumentation", - "", - "version.py", -) -PACKAGE_INFO = {} -with open(VERSION_FILENAME, encoding="utf-8") as f: - exec(f.read(), PACKAGE_INFO) - -setuptools.setup( - version=PACKAGE_INFO["__version__"], - entry_points={ - "opentelemetry_instrumentor": [ - # REPLACE ME: the entrypoint for the instrumentor e.g - # "sqlalchemy = opentelemetry.instrumentation.sqlalchemy:SQLAlchemyInstrumentor" - " = opentelemetry.instrumentation." - ] - }, -)