Skip to content

Commit 29f48a9

Browse files
committed
build: add pyproject.toml to remove deprecation warning at install
1 parent f24bfea commit 29f48a9

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ jobs:
2828
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
2929
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3030
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
31-
- name: Install
31+
- name: install with pip -e
32+
if: ${{ matrix.python-version == 3.12 || matrix.python-version == 3.13 }}
3233
run: |
33-
python setup.py install
34+
pip install -e . -v --no-build-isolation
35+
- name: install with setup.py develop
36+
if: ${{ matrix.python-version != 3.12 && matrix.python-version != 3.13 }}
37+
run: |
38+
python setup.py develop
3439
- name: Test with pytest
3540
run: |
3641
pip install pytest

.github/workflows/pythonpublish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
- name: Install dependencies
1717
run: |
1818
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine
19+
python -m pip install build twine
2020
- name: Build and publish
2121
env:
2222
TWINE_USERNAME: __token__
2323
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
2424
run: |
25-
python setup.py sdist bdist_wheel
25+
python -m build
2626
twine upload dist/*

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# pyproject.toml
2+
[build-system]
3+
requires = ["setuptools >= 42.0.0"]
4+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)