Skip to content

Commit

Permalink
Merge pull request #17 from watchdogpolska/integrate-pyproject
Browse files Browse the repository at this point in the history
Integrate pyproject
  • Loading branch information
ad-m authored Sep 23, 2023
2 parents d76c851 + ce7bf75 commit 87b3e74
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 15 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- "==4.1.*"
- "==4.2.*"
include:
- django: "==3.2.*"
python: '3.10'
- python: '3.10'
django: "==3.2.*"
# Python 3.11 & Django 3.2 raises deprecation warning about deprecated 'cgi' for Python 3.13
steps:
- uses: actions/checkout@v1
Expand All @@ -33,6 +33,13 @@ jobs:

- name: Build test
run: make test
- name: Build package
run: make build_pkg

- uses: actions/upload-artifact@v3
with:
name: distribution
path: dist

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_wheel
run: make build_pkg

- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
History
-------

0.18.1 (2023-09-24)
*******************

* Integrate pyproject.toml

0.18.0 (2023-09-04)
*******************

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
7 changes: 0 additions & 7 deletions teryt_tree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
from pkg_resources import get_distribution, DistributionNotFound

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass
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 87b3e74

Please sign in to comment.