Skip to content

Commit 947a338

Browse files
authored
Use build instead of invoking setup.py directly (#229)
This is the modern approach. Most critically, it uses an isolated venv containing the build-time dependencies such as farm-ng-package, which setup.py does not. For gory details, see https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html Part of SWE-427.
1 parent bb2c612 commit 947a338

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/pypi-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
# Match ci_python.yml. See notes on Python version there.
1515
python-version: '3.8'
1616
- name: Install dependencies
17-
run: python3 -m pip install --upgrade setuptools wheel
17+
run: python3 -m pip install --upgrade setuptools wheel build
1818
- name: Compile project
1919
run: python3 -m pip install -e .
2020
- name: Build distribution package
21-
run: python3 setup.py sdist bdist_wheel
21+
run: python3 -m build
2222
- name: Publish distribution 📦 to PyPI
2323
uses: pypa/gh-action-pypi-publish@release/v1
2424
with:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ profile = "black"
2424
requires = [
2525
"setuptools",
2626
"wheel",
27-
"farm-ng-core",
28-
"farm-ng-package",
2927
"protobuf<=5.27.5",
3028
"grpcio-tools==1.64.1",
29+
"farm-ng-core",
30+
"farm-ng-package",
3131
]
3232
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)