Skip to content

Commit 39892bf

Browse files
committed
Change the building tool
1 parent 52e5028 commit 39892bf

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ jobs:
5151
- name: Install dependencies
5252
run: |
5353
pip install --upgrade pip
54-
python setup.py sdist bdist_wheel
55-
pip install dist/django_forbid-*.whl
54+
sh build.sh
5655
pip install tox tox-gh-actions
5756
- name: Run tests using tox
5857
run: tox -e ${{ matrix.env }}

build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# last version of `build` supporting Python 3.6
4+
pip install build==0.9.0
5+
6+
# build the wheel and install it
7+
WHEEL_NAME=$(python -m build | grep -Po "django_forbid-.*\.whl" | tail -n 1)
8+
pip install dist/$WHEEL_NAME

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ deps =
1515
django21: django==2.1
1616
-r{toxinidir}/tests/requirements.txt
1717
commands =
18-
python setup.py sdist bdist_wheel
19-
pip install dist/django_forbid-*.whl
18+
sh build.sh
2019
pytest

0 commit comments

Comments
 (0)