Skip to content

Commit dabbcc8

Browse files
ci: explicitly configure setuptools and use the PyPA build frontend
setup.py test is deprecated, just run the tests directly. Require setuptools 72.2 - this incorporates upstream distutils changes which make it easier to adjust C++ compile flags independently of C compile flags.
1 parent 2a7ef66 commit dabbcc8

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/build_and_test.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,20 @@ jobs:
4646
runs-on: "ubuntu-22.04"
4747
steps:
4848
- uses: actions/checkout@v4
49+
- uses: actions/setup-python@v5
50+
with:
51+
python-version: '3.9'
4952
- name: Build
5053
run: |
51-
python setup.py build
54+
pip install build
55+
python -m build --sdist --wheel
5256
- name: Test
5357
run: |
54-
python setup.py test
58+
python -m venv --upgrade-deps --clear trial &&
59+
cd trial &&
60+
source bin/activate &&
61+
pip install ../dist/jsonnet-*.whl &&
62+
python3 ../python/_jsonnet_test.py
5563
5664
cmake_build:
5765
name: Build and test using CMake

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["setuptools"]
32
build-backend = "setuptools.build_meta"
3+
requires = ["setuptools >= 72.2"]

0 commit comments

Comments
 (0)