Skip to content

Commit

Permalink
refactor: Build and Packaging.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pvital committed May 23, 2024
1 parent b5b803c commit c222d96
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 83 deletions.
77 changes: 77 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "instana"
dynamic = [
"version",
]
description = "Python Distributed Tracing & Metrics Sensor for Instana."
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
keywords = [
"performance",
"opentracing",
"metrics",
"monitoring",
"tracing",
"distributed-tracing",
]
authors = [
{ name = "Instana Team Python Tracer Engineers" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware",
"Topic :: System :: Monitoring",
"Topic :: System :: Networking :: Monitoring",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"autowrapt>=1.0",
"basictracer>=3.1.0",
"fysom>=2.1.2",
"opentracing>=2.3.0",
"protobuf<5.0.0",
"requests>=2.6.0",
"six>=1.12.0",
"urllib3>=1.26.5",
]

[project.optional-dependencies]
dev = [
"pytest",
]

[project.urls]
Documentation = "https://www.ibm.com/docs/en/instana-observability/current?topic=technologies-monitoring-python-instana-python-package"
Issues = "https://github.com/instana/python-sensor/issues"
Source = "https://github.com/instana/python-sensor"

[tool.hatch.version]
path = "src/instana/version.py"

[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
]

[tool.hatch.build.targets.wheel]
packages = ["src/instana"]
81 changes: 0 additions & 81 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.projectKey=Python-Tracer
sonar.projectName=Python Tracer
sonar.sourceEncoding=utf-8
sonar.sources=instana/
sonar.sources=src/instana/
sonar.tests=tests/
sonar.python.coverage.reportPaths=coverage.xml
sonar.python.version=3
Expand Down
2 changes: 1 addition & 1 deletion src/instana/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

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

VERSION = '2.3.0'
VERSION = "2.3.0"

0 comments on commit c222d96

Please sign in to comment.