Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate setup.py to pyproject.toml #1472

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
17 changes: 16 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
79 changes: 0 additions & 79 deletions setup.py

This file was deleted.