Skip to content

Commit c222d96

Browse files
committed
refactor: Build and Packaging.
PEP 621 and PEP 631 standardized `pyproject.toml` as the new normal for Python packages instead of `setup.py`. PEP 517 and PEP 660 created standards for Python build systems. This commit removes the `setup.py` file and creates a `pyproject.toml` one to deal with the new packaging standards. Signed-off-by: Paulo Vital <[email protected]>
1 parent b5b803c commit c222d96

File tree

4 files changed

+79
-83
lines changed

4 files changed

+79
-83
lines changed

pyproject.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "instana"
7+
dynamic = [
8+
"version",
9+
]
10+
description = "Python Distributed Tracing & Metrics Sensor for Instana."
11+
readme = "README.md"
12+
requires-python = ">=3.7"
13+
license = "MIT"
14+
keywords = [
15+
"performance",
16+
"opentracing",
17+
"metrics",
18+
"monitoring",
19+
"tracing",
20+
"distributed-tracing",
21+
]
22+
authors = [
23+
{ name = "Instana Team Python Tracer Engineers" },
24+
]
25+
classifiers = [
26+
"Development Status :: 5 - Production/Stable",
27+
"Intended Audience :: Developers",
28+
"Intended Audience :: Information Technology",
29+
"Intended Audience :: Science/Research",
30+
"Intended Audience :: System Administrators",
31+
"License :: OSI Approved :: MIT License",
32+
"Operating System :: OS Independent",
33+
"Programming Language :: Python",
34+
"Programming Language :: Python :: 3.7",
35+
"Programming Language :: Python :: 3.8",
36+
"Programming Language :: Python :: 3.9",
37+
"Programming Language :: Python :: 3.10",
38+
"Programming Language :: Python :: 3.11",
39+
"Programming Language :: Python :: 3.12",
40+
"Programming Language :: Python :: Implementation :: CPython",
41+
"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware",
42+
"Topic :: System :: Monitoring",
43+
"Topic :: System :: Networking :: Monitoring",
44+
"Topic :: Software Development :: Libraries :: Python Modules",
45+
]
46+
dependencies = [
47+
"autowrapt>=1.0",
48+
"basictracer>=3.1.0",
49+
"fysom>=2.1.2",
50+
"opentracing>=2.3.0",
51+
"protobuf<5.0.0",
52+
"requests>=2.6.0",
53+
"six>=1.12.0",
54+
"urllib3>=1.26.5",
55+
]
56+
57+
[project.optional-dependencies]
58+
dev = [
59+
"pytest",
60+
]
61+
62+
[project.urls]
63+
Documentation = "https://www.ibm.com/docs/en/instana-observability/current?topic=technologies-monitoring-python-instana-python-package"
64+
Issues = "https://github.com/instana/python-sensor/issues"
65+
Source = "https://github.com/instana/python-sensor"
66+
67+
[tool.hatch.version]
68+
path = "src/instana/version.py"
69+
70+
[tool.hatch.build.targets.sdist]
71+
include = [
72+
"/src",
73+
"/tests",
74+
]
75+
76+
[tool.hatch.build.targets.wheel]
77+
packages = ["src/instana"]

setup.py

Lines changed: 0 additions & 81 deletions
This file was deleted.

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sonar.projectKey=Python-Tracer
22
sonar.projectName=Python Tracer
33
sonar.sourceEncoding=utf-8
4-
sonar.sources=instana/
4+
sonar.sources=src/instana/
55
sonar.tests=tests/
66
sonar.python.coverage.reportPaths=coverage.xml
77
sonar.python.version=3

src/instana/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
# Module version file. Used by setup.py and snapshot reporting.
55

6-
VERSION = '2.3.0'
6+
VERSION = "2.3.0"

0 commit comments

Comments
 (0)