Skip to content

Commit 3a57418

Browse files
committed
build: add pyproject.toml to remove deprecation warning at install
1 parent a30d57c commit 3a57418

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
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"

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="fabien.marty@gmail.com",
1414
name="jinja2_getenv_extension",
15-
version="1.0.2",
15+
version="1.0.3",
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)