From 36123e875f14fcdf223ea450091ddd3075bb00d5 Mon Sep 17 00:00:00 2001
From: Ofek Lev <ofekmeister@gmail.com>
Date: Sun, 28 Aug 2022 20:58:28 -0400
Subject: [PATCH] Update package metadata

---
 .../opentelemetry-exporter-jaeger/MANIFEST.in |  9 ----
 .../pyproject.toml                            | 51 ++++++++++++++++++
 .../opentelemetry-exporter-jaeger/setup.cfg   | 54 -------------------
 .../opentelemetry-exporter-jaeger/setup.py    | 26 ---------
 4 files changed, 51 insertions(+), 89 deletions(-)
 delete mode 100644 exporter/opentelemetry-exporter-jaeger/MANIFEST.in
 create mode 100644 exporter/opentelemetry-exporter-jaeger/pyproject.toml
 delete mode 100644 exporter/opentelemetry-exporter-jaeger/setup.cfg
 delete mode 100644 exporter/opentelemetry-exporter-jaeger/setup.py

diff --git a/exporter/opentelemetry-exporter-jaeger/MANIFEST.in b/exporter/opentelemetry-exporter-jaeger/MANIFEST.in
deleted file mode 100644
index aed3e33273b..00000000000
--- a/exporter/opentelemetry-exporter-jaeger/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/exporter/opentelemetry-exporter-jaeger/pyproject.toml b/exporter/opentelemetry-exporter-jaeger/pyproject.toml
new file mode 100644
index 00000000000..eb32a59c1ff
--- /dev/null
+++ b/exporter/opentelemetry-exporter-jaeger/pyproject.toml
@@ -0,0 +1,51 @@
+[build-system]
+requires = ["hatchling"]
+build-backend = "hatchling.build"
+
+[project]
+name = "opentelemetry-exporter-jaeger"
+dynamic = ["version"]
+description = "Jaeger Exporters for OpenTelemetry"
+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 :: 5 - Production/Stable",
+  "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",
+  "Typing :: Typed",
+]
+dependencies = [
+  "opentelemetry-exporter-jaeger-proto-grpc == 1.12.0",
+  "opentelemetry-exporter-jaeger-thrift == 1.12.0",
+]
+
+[project.optional-dependencies]
+test = []
+
+[project.entry-points.opentelemetry_traces_exporter]
+jaeger = "opentelemetry.exporter.jaeger.proto.grpc:JaegerExporter"
+
+[project.urls]
+Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/opentelemetry-exporter-jaeger"
+
+[tool.hatch.version]
+path = "src/opentelemetry/exporter/jaeger/version.py"
+
+[tool.hatch.build.targets.sdist]
+include = [
+  "/src",
+  "/tests",
+]
+
+[tool.hatch.build.targets.wheel]
+packages = ["src/opentelemetry"]
diff --git a/exporter/opentelemetry-exporter-jaeger/setup.cfg b/exporter/opentelemetry-exporter-jaeger/setup.cfg
deleted file mode 100644
index 890f99561e2..00000000000
--- a/exporter/opentelemetry-exporter-jaeger/setup.cfg
+++ /dev/null
@@ -1,54 +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-exporter-jaeger
-description = Jaeger Exporters for OpenTelemetry
-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/tree/main/exporter/opentelemetry-exporter-jaeger
-platforms = any
-license = Apache-2.0
-classifiers =
-    Development Status :: 5 - Production/Stable
-    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
-    Typing :: Typed
-
-[options]
-python_requires = >=3.7
-package_dir=
-    =src
-packages=find_namespace:
-install_requires =
-    opentelemetry-exporter-jaeger-proto-grpc == 1.12.0
-    opentelemetry-exporter-jaeger-thrift == 1.12.0
-
-[options.packages.find]
-where = src
-
-[options.extras_require]
-test =
-
-[options.entry_points]
-opentelemetry_traces_exporter =
-    jaeger = opentelemetry.exporter.jaeger.proto.grpc:JaegerExporter
diff --git a/exporter/opentelemetry-exporter-jaeger/setup.py b/exporter/opentelemetry-exporter-jaeger/setup.py
deleted file mode 100644
index 2303890631c..00000000000
--- a/exporter/opentelemetry-exporter-jaeger/setup.py
+++ /dev/null
@@ -1,26 +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", "exporter", "jaeger", "version.py"
-)
-PACKAGE_INFO = {}
-with open(VERSION_FILENAME, encoding="utf-8") as f:
-    exec(f.read(), PACKAGE_INFO)
-
-setuptools.setup(version=PACKAGE_INFO["__version__"])