Skip to content

Commit

Permalink
migrate setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
deronnax committed Jan 3, 2025
1 parent 1c07def commit 0918dd4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 83 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
if: "matrix.os == 'macos-latest'"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade ".[fastimport,paramiko,https]" setuptools-rust
pip install --upgrade ".[fastimport,paramiko,https]" build
- name: Install gpg on supported platforms
run: pip install --upgrade ".[pgp]"
if: "matrix.os != 'windows-latest' && matrix.python-version != 'pypy3'"
Expand All @@ -50,7 +49,7 @@ jobs:
if: "matrix.python-version != 'pypy3'"
- name: Build
run: |
python setup.py build_ext -i
python -m build
env:
RUSTFLAGS: "-D warnings"
- name: codespell
Expand Down
20 changes: 19 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.2"]
requires = ["setuptools>=61.2", "setuptools-rust"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -35,6 +35,21 @@ Repository = "https://www.dulwich.io/code/"
GitHub = "https://github.com/dulwich/dulwich"
"Bug Tracker" = "https://github.com/dulwich/dulwich/issues"

[[tool.setuptools-rust.ext-modules]]
target = "dulwich._objects"
path = "crates/objects/Cargo.toml"
optional = true

[[tool.setuptools-rust.ext-modules]]
target = "dulwich._pack"
path = "crates/pack/Cargo.toml"
optional = true

[[tool.setuptools-rust.ext-modules]]
target = "dulwich._diff_tree"
path = "crates/diff-tree/Cargo.toml"
optional = true

[project.optional-dependencies]
fastimport = ["fastimport"]
https = ["urllib3>=1.24.1"]
Expand Down Expand Up @@ -66,6 +81,9 @@ script-files = [
]
license-files = ["COPYING"]

[tool.setuptools.package-data]
"" = ["py.typed"]

[tool.setuptools.dynamic]
version = {attr = "dulwich.__version__"}

Expand Down
79 changes: 0 additions & 79 deletions setup.py

This file was deleted.

0 comments on commit 0918dd4

Please sign in to comment.