Skip to content

Commit 554ad41

Browse files
committed
build: add pyproject.toml to remove deprecation warning at install
1 parent 27f1b15 commit 554ad41

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ jobs:
66
build:
77

88
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
913

1014
steps:
1115
- uses: actions/checkout@v4
12-
- name: Set up Python 3.9
16+
- name: Set up Python ${{ matrix.python-version }}
1317
uses: actions/setup-python@v5
1418
with:
15-
python-version: 3.9
19+
python-version: ${{ matrix.python-version }}
1620
- name: Install dependencies
1721
run: |
1822
python -m pip install --upgrade pip
@@ -24,9 +28,14 @@ jobs:
2428
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
2529
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
2630
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
27-
- name: Install
31+
- name: install with pip -e
32+
if: ${{ matrix.python-version == 3.12 || matrix.python-version == 3.13 }}
2833
run: |
29-
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
3039
- name: Test with pytest
3140
run: |
3241
pip install pytest

.github/workflows/pythonpublish.yml

Lines changed: 4 additions & 4 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:
22-
TWINE_USERNAME: __token__
23-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
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"

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
author="Fabien MARTY",
1313
author_email="[email protected]",
1414
name="jinja2_shell_extension",
15-
version="2.1.0",
15+
version="2.0.2",
1616
license="BSD",
1717
packages=find_packages(),
1818
install_requires=install_requires,
@@ -25,7 +25,6 @@
2525
classifiers=[
2626
"Development Status :: 5 - Production/Stable",
2727
"Intended Audience :: Developers",
28-
"License :: OSI Approved :: BSD License",
2928
"Programming Language :: Python :: 3"
3029
]
3130
)

0 commit comments

Comments
 (0)