Skip to content

Commit cff82bb

Browse files
committed
Remove the direct use of setup.py
setup.py is deprecated for use directly asa build tool
1 parent 363d2b5 commit cff82bb

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: bash ./scripts/generate_bindings.sh
4040

4141
- name: "Build wheel"
42-
run: python setup.py bdist_wheel --verbose
42+
run: python -m build --wheel
4343

4444
- name: "Install wheel"
4545
run: pip install ./dist/*.whl

payjoin-ffi/python/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ source venv/bin/activate
2626
PYBIN="./venv/bin/" bash ./scripts/generate_bindings.sh
2727

2828
# Build the wheel
29-
python setup.py bdist_wheel --verbose
29+
python -m build --wheel
3030

3131
# Force reinstall payjoin
3232
pip install ./dist/payjoin-<version>.whl --force-reinstall
@@ -48,6 +48,6 @@ source venv/bin/activate
4848
PYBIN="./venv/bin/" bash ./scripts/generate_bindings.sh
4949

5050
# Build the wheel
51-
python setup.py --verbose bdist_wheel
51+
python -m build --wheel
5252

5353
```

payjoin-ffi/python/pyproject.toml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "setuptools-rust"]
2+
requires = ["setuptools>=62", "wheel", "toml"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "payjoin"
7+
description = "The Python language bindings for the Payjoin Dev Kit"
8+
readme = "README.md"
9+
requires-python = ">=3.8"
10+
license = "MIT"
11+
dynamic = ["version"]
12+
13+
[tool.setuptools]
14+
packages = ["payjoin"]
15+
package-dir = { "payjoin" = "src/payjoin" }
16+
include-package-data = true
317

418
[tool.pytest.ini_options]
519
pythonpath = [

payjoin-ffi/python/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ semantic-version==2.9.0
22
typing_extensions==4.0.1
33
setuptools==78.1.1
44
wheel==0.38.4
5+
build==1.3.0

0 commit comments

Comments
 (0)