diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/MANIFEST.IN b/instrumentation/opentelemetry-instrumentation-pymemcache/MANIFEST.IN deleted file mode 100644 index aed3e3327..000000000 --- a/instrumentation/opentelemetry-instrumentation-pymemcache/MANIFEST.IN +++ /dev/null @@ -1,9 +0,0 @@ -graft src -graft tests -global-exclude *.pyc -global-exclude *.pyo -global-exclude __pycache__/* -include CHANGELOG.md -include MANIFEST.in -include README.rst -include LICENSE diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml new file mode 100644 index 000000000..8e76adc45 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml @@ -0,0 +1,58 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "opentelemetry-instrumentation-pymemcache" +dynamic = ["version"] +description = "OpenTelemetry pymemcache instrumentation" +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", + "opentelemetry-instrumentation == 0.33b0", + "opentelemetry-semantic-conventions == 0.33b0", + "wrapt >= 1.0.0, < 2.0.0", +] + +[project.optional-dependencies] +instruments = [ + "pymemcache >= 1.3.5, < 4", +] +test = [ + "opentelemetry-instrumentation-pymemcache[instruments]", + "opentelemetry-test-utils == 0.33b0", +] + +[project.entry-points.opentelemetry_instrumentor] +pymemcache = "opentelemetry.instrumentation.pymemcache:PymemcacheInstrumentor" + +[project.urls] +Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-pymemcache" + +[tool.hatch.version] +path = "src/opentelemetry/instrumentation/pymemcache/version.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/src", + "/tests", +] + +[tool.hatch.build.targets.wheel] +packages = ["src/opentelemetry"] diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/setup.cfg b/instrumentation/opentelemetry-instrumentation-pymemcache/setup.cfg deleted file mode 100644 index aeef01e67..000000000 --- a/instrumentation/opentelemetry-instrumentation-pymemcache/setup.cfg +++ /dev/null @@ -1,56 +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-instrumentation-pymemcache -description = OpenTelemetry pymemcache instrumentation -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/instrumentation/opentelemetry-instrumentation-pymemcache -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 - opentelemetry-semantic-conventions == 0.33b0 - opentelemetry-instrumentation == 0.33b0 - wrapt >= 1.0.0, < 2.0.0 - -[options.extras_require] -test = - opentelemetry-test-utils == 0.33b0 - -[options.packages.find] -where = src - -[options.entry_points] -opentelemetry_instrumentor = - pymemcache = opentelemetry.instrumentation.pymemcache:PymemcacheInstrumentor diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/setup.py b/instrumentation/opentelemetry-instrumentation-pymemcache/setup.py deleted file mode 100644 index 105c59e9e..000000000 --- a/instrumentation/opentelemetry-instrumentation-pymemcache/setup.py +++ /dev/null @@ -1,99 +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. - - -# DO NOT EDIT. THIS FILE WAS AUTOGENERATED FROM templates/instrumentation_setup.py.txt. -# RUN `python scripts/generate_setup.py` TO REGENERATE. - - -import distutils.cmd -import json -import os -from configparser import ConfigParser - -import setuptools - -config = ConfigParser() -config.read("setup.cfg") - -# We provide extras_require parameter to setuptools.setup later which -# overwrites the extras_require section from setup.cfg. To support extras_require -# section in setup.cfg, we load it here and merge it with the extras_require param. -extras_require = {} -if "options.extras_require" in config: - for key, value in config["options.extras_require"].items(): - extras_require[key] = [v for v in value.split("\n") if v.strip()] - -BASE_DIR = os.path.dirname(__file__) -PACKAGE_INFO = {} - -VERSION_FILENAME = os.path.join( - BASE_DIR, - "src", - "opentelemetry", - "instrumentation", - "pymemcache", - "version.py", -) -with open(VERSION_FILENAME, encoding="utf-8") as f: - exec(f.read(), PACKAGE_INFO) - -PACKAGE_FILENAME = os.path.join( - BASE_DIR, - "src", - "opentelemetry", - "instrumentation", - "pymemcache", - "package.py", -) -with open(PACKAGE_FILENAME, encoding="utf-8") as f: - exec(f.read(), PACKAGE_INFO) - -# Mark any instruments/runtime dependencies as test dependencies as well. -extras_require["instruments"] = PACKAGE_INFO["_instruments"] -test_deps = extras_require.get("test", []) -for dep in extras_require["instruments"]: - test_deps.append(dep) - -extras_require["test"] = test_deps - - -class JSONMetadataCommand(distutils.cmd.Command): - - description = ( - "print out package metadata as JSON. This is used by OpenTelemetry dev scripts to ", - "auto-generate code in other places", - ) - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - metadata = { - "name": config["metadata"]["name"], - "version": PACKAGE_INFO["__version__"], - "instruments": PACKAGE_INFO["_instruments"], - } - print(json.dumps(metadata)) - - -setuptools.setup( - cmdclass={"meta": JSONMetadataCommand}, - version=PACKAGE_INFO["__version__"], - extras_require=extras_require, -)