Skip to content

Commit

Permalink
Migrate from setup.py to pyproject.toml (eclipse-basyx#290)
Browse files Browse the repository at this point in the history
Migrate from setup.py to pyproject.toml

Previously, we used `setup.py` for specifying our
package, together with a `requirements.txt` for
defining our dependencies. 

[PEP 518] introduces `pyproject.toml` as the new 
and suggested way of specifying both, 
build process and dependencies. 
With this commit, we migrate from the old 
`setup.py` and `requirements.txt` to using
`pyproject.toml`. 

[PEP 518](https://peps.python.org/pep-0518/)
  • Loading branch information
hadijannat authored Sep 13, 2024
1 parent 3c74154 commit 208e6f9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install setuptools wheel build
- name: Create source and wheel dist
run: |
python setup.py sdist bdist_wheel
python -m build
48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "basyx-python-sdk"
version = "1.0.0"
description = "The Eclipse BaSyx Python SDK, an implementation of the Asset Administration Shell for Industry 4.0 systems"
authors = [
{ name = "The Eclipse BaSyx Authors", email = "admins@iat.rwth-aachen.de" }
]
readme = "README.md"
license = { file = "LICENSE" }
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable"
]
requires-python = ">=3.8"
dependencies = [
"python-dateutil>=2.8,<3",
"lxml>=4.2,<5",
"urllib3>=1.26,<2.0",
"pyecma376-2>=0.2.4"
]

[project.optional-dependencies]
dev = [
"mypy",
"pycodestyle",
"codeblocks",
"coverage",
]

[project.urls]
"Homepage" = "https://github.com/eclipse-basyx/basyx-python-sdk"

[tool.setuptools]
packages = ["basyx"]

[tool.setuptools.package-data]
basyx = ["py.typed"]
"basyx.aas.examples.data" = ["TestFile.pdf"]

[tool.setuptools.exclude-package-data]
"*" = ["test", "test.*"]

49 changes: 0 additions & 49 deletions setup.py

This file was deleted.

0 comments on commit 208e6f9

Please sign in to comment.