Skip to content

Commit

Permalink
chore: from setup to pyproject (#407)
Browse files Browse the repository at this point in the history
Signed-off-by: ThibaultFy <[email protected]>
  • Loading branch information
ThibaultFy authored Mar 25, 2024
1 parent d8c7b96 commit 88854ac
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: pip install wheel
- name: Build
run:
python setup.py sdist bdist_wheel
python -m build
- name: Publish
uses: pypa/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions changes/407.changed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Depreciate `setup.py` in favour of `pyproject.toml` ([#407](https://github.com/Substra/substra/pull/407))
59 changes: 59 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
exclude = ["tests*"]

[tool.hatch.version]
path = "substra/__version__.py"

[project]
name = "substra"
description = "Low-level Python library for interacting with a Substra network"
dynamic = ["version"]
requires-python = ">= 3.9"
dependencies = [
"requests",
"urllib3<2",
"docker",
"pyyaml",
"pydantic>=2.3.0,<3.0.0",
"tqdm",
"python-slugify",
]
keywords = ["substra"]
classifiers = [
"Intended Audience :: Developers",
"Topic :: Utilities",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
license = { file = "LICENSE" }
authors = [{ name = "Owkin, Inc." }]


[project.optional-dependencies]
dev = [
"pandas",
"pytest",
"pytest-cov",
"pytest-mock",
"substratools>=0.21.2",
"black",
"flake8",
"isort",
"docstring_parser",
"towncrier",
]

[project.urls]
Documentation = "https://docs.substra.org/en/stable/"
Repository = "https://github.com/Substra/substra"
Changelog = "https://github.com/Substra/substra/blob/main/CHANGELOG.md"

[tool.pytest.ini_options]
addopts = "-v --cov=substra --ignore=tests/unit --ignore=tests/e2e"

[tool.black]
line-length = 120
Expand Down
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

67 changes: 0 additions & 67 deletions setup.py

This file was deleted.

0 comments on commit 88854ac

Please sign in to comment.