Skip to content

Commit c362f8a

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

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
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/bindgen_generate.sh
2727

2828
# Build the wheel
29-
python setup.py --verbose bdist_wheel
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/bindgen_generate.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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1-
[build-system]
2-
requires = ["setuptools", "wheel", "setuptools-rust"]
1+
requires = ["setuptools>=62", "wheel", "toml"]
2+
build-backend = "setuptools.build_meta"
3+
4+
[project]
5+
name = "payjoin"
6+
description = "The Python language bindings for the Payjoin Dev Kit"
7+
readme = "README.md"
8+
requires-python = ">=3.8"
9+
license = "MIT"
10+
dynamic = ["version"]
11+
12+
[tool.setuptools]
13+
packages = ["payjoin"]
14+
package-dir = { "payjoin" = "src/payjoin" }
15+
include-package-data = true
316

417
[toml.pytest.ini_options]
518
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)