Skip to content

Commit

Permalink
Integrate pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-m committed Sep 13, 2023
1 parent 4a22cc8 commit d7cdb48
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:

- name: Build test
run: make test
- name: Build package
run: make build-pkg

docs:
runs-on: ubuntu-latest
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Set up Python 3.7
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: "3.7"
python-version: "3.10"

- name: Build distribution
run: |
pip install setuptools_scm wheel
python3 setup.py sdist bdist
run: make build-pkg

- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ assets:
build:
docker-compose build web

build-pkg:
python -m pip install --upgrade build
python -m build

test: assets
docker-compose run -v $$PWD/assets:/assets -e PYTHONWARNINGS=error -e CACHE_DIR=/assets/ web python manage.py test --keepdb --verbosity=2

Expand Down
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[project]
dynamic = ["version"]
name = "django-teryt-tree"
readme = "README.rst"
authors = [
{ name="Adam Dobrawy", email="[email protected]" },
]
description = 'Django-teryt-tree is a Django app that implements TERYT database as tree by django-mptt.'
dependencies = ['django-mptt', 'django-model-utils', 'django-autoslug', 'tqdm']
requires-python = ">=3.10"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: Polish',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11'
]
keywords = ['django-teryt-tree']
license = {file = "LICENSE"}

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["."]
include = ["teryt_tree*", "teryt_tree.locale.pl.LC_MESSAGES"]

[tool.setuptools_scm]
write_to = "teryt_tree/_version.py"

[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
setup_requires=["setuptools_scm", "wheel"],
install_requires=["django-mptt", "django-model-utils", "django-autoslug", "tqdm"],
download_url="https://github.com/ad-m/django-teryt-tree/",
license="BSD",
zip_safe=False,
keywords="django-teryt-tree",
classifiers=[
Expand Down
1 change: 1 addition & 0 deletions teryt_tree/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_version.py
Empty file.
Empty file removed teryt_tree/static/img/.gitignore
Empty file.
Empty file removed teryt_tree/static/js/teryt_tree.js
Empty file.

0 comments on commit d7cdb48

Please sign in to comment.