diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67abe1f..da4aa9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,20 +27,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache - uses: actions/cache@v3 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: - ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }} - restore-keys: | - ${{ matrix.python-version }}-v1- + cache: 'pip' - name: Install dependencies run: | diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..fb767da --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,13 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3" + +sphinx: + configuration: docs/en/source/conf.py + +python: + install: + - requirements: requirements-doc.txt diff --git a/checklist.rst b/checklist.rst index 2671b6e..a825750 100644 --- a/checklist.rst +++ b/checklist.rst @@ -4,7 +4,7 @@ Procedure: 1. check CI status testing result: https://github.com/beproud/django-newauth/actions 2. update release version/date in ``ChangeLog.rst`` -3. run ``python setup.py release sdist bdist_wheel`` +3. run ``python -m build`` 4. check ``twine check dist/*`` 5. upload ``twine upload dist/*`` 6. tagging version e.g. ``git tag 0.40``. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7d64159 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = "django-newauth" +dynamic = ['version'] +description = "Authentication for Django done right" +authors = [ + { name = "BeProud", email = "project@beproud.jp" }, +] +readme = "README.rst" +classifiers=[ + 'Development Status :: 3 - Alpha', + 'Environment :: Plugins', + 'Framework :: Django', + 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.2', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Topic :: Software Development :: Libraries :: Python Modules', +] +requires-python = ">=3.8" +license = {file = "LICENSE"} +dependencies = [ + "Django>=3.2", +] + +[project.urls] +Homepage = "https://github.com/beproud/django-newauth/" +Documentation = "http://django-newauth.rtfd.io/" +Repository = "https://github.com/beproud/django-newauth.git" +Changelog = "https://github.com/beproud/django-newauth/blob/master/ChangeLog.rst" + +[tool.setuptools] +zip-safe = false +include-package-data = true + +[tool.setuptools.dynamic] +version = {attr = "newauth.VERSION"} + +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index e70f1d8..0000000 --- a/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[egg_info] -tag_build = .dev -tag_date = true - -[aliases] -release = egg_info -Db '' diff --git a/setup.py b/setup.py deleted file mode 100644 index d3d044a..0000000 --- a/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -#:coding=utf-8: - -from setuptools import setup, find_packages -from newauth import VERSION - - -def read(filename): - with open(filename) as f: - return f.read() - - -setup ( - name='django-newauth', - version=VERSION, - description='Authentication for Django done right', - long_description=read('README.rst') + read('ChangeLog.rst'), - long_description_content_type='text/x-rst', - author='BeProud', - author_email='project@beproud.jp', - url='http://django-newauth.rtfd.io/', - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Environment :: Plugins', - 'Framework :: Django', - 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.2', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - include_package_data=True, - packages=find_packages(), - install_requires=[ - 'Django>=3.2', - ], - test_suite='tests.main', - zip_safe=False, -) diff --git a/tox.ini b/tox.ini index 1732746..ebd4842 100644 --- a/tox.ini +++ b/tox.ini @@ -46,6 +46,7 @@ DJANGO = deps = twine wheel + build commands = - python setup.py sdist bdist_wheel + python -m build -s -w twine check --strict dist/*