diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index a7d0524..6b49551 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -19,17 +19,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v1 with: - python-version: "3.10" - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Install Dependencies + cache: "pip" + python-version: "3.11" + - name: Install isort run: pip3 install isort - name: Run isort run: isort -c . @@ -38,16 +33,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v1 with: - python-version: "3.10" - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- + cache: "pip" + python-version: "3.11" - name: Install Dependencies run: pip3 install flake8 flake8-bugbear - name: Run flake8 @@ -58,16 +48,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v1 with: - python-version: "3.10" - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- + cache: "pip" + python-version: "3.11" - name: Install Dependencies run: pip3 install black - name: Run black @@ -78,16 +63,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v1 with: - python-version: "3.10" - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- + cache: "pip" + python-version: "3.11" - name: Install Dependencies run: pip3 install djhtml - name: Run docformatter @@ -98,23 +78,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v1 with: - python-version: "3.10" - - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- + cache: "pip" + python-version: "3.11" - name: Install Dependencies run: pip3 install twine check-manifest -Ue . - name: Run check-manifest run: check-manifest . working-directory: . - name: Build package - run: python setup.py sdist + run: python -m build working-directory: . - name: Check package run: twine check dist/* diff --git a/pretalx_venueless/__init__.py b/pretalx_venueless/__init__.py index e69de29..67bc602 100644 --- a/pretalx_venueless/__init__.py +++ b/pretalx_venueless/__init__.py @@ -0,0 +1 @@ +__version__ = "1.3.0" diff --git a/pretalx_venueless/apps.py b/pretalx_venueless/apps.py index e989c43..088fbcf 100644 --- a/pretalx_venueless/apps.py +++ b/pretalx_venueless/apps.py @@ -1,6 +1,8 @@ from django.apps import AppConfig from django.utils.translation import gettext_lazy +from . import __version__ + class PluginApp(AppConfig): name = "pretalx_venueless" @@ -13,7 +15,7 @@ class PretalxPluginMeta: "Venueless integration in pretalx: Notify venueless about new schedule releases!" ) visible = True - version = "1.3.0" + version = __version__ category = "INTEGRATION" def ready(self): diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5113eb9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,38 @@ +[project] +name = "pretalx-venueless" +dynamic = ["version"] +description = "Static venueless for pretalx, e.g. information, venue listings, a Code of Conduct, etc." +readme = "README.rst" +license = {text = "Apache Software License"} +keywords = ["pretalx"] +authors = [ + {name = "Tobias Kunze", email = "r@rixx.de"}, +] +maintainers = [ + {name = "Tobias Kunze", email = "r@rixx.de"}, +] + +dependencies = [] + +[project.urls] +homepage = "https://github.com/pretalx/pretalx-venueless" +repository = "https://github.com/pretalx/pretalx-venueless.git" + +[project.entry-points."pretalx.plugin"] +pretalx_venueless = "pretalx_venueless:PretalxPluginMeta" + +[build-system] +build-backend = "setuptools.build_meta" +requires = ["setuptools", "wheel"] + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.dynamic] +version = {attr = "pretalx_venueless.__version__"} + +[tool.setuptools.packages.find] +include = ["pretalx*"] + +[tool.check-manifest] +ignore = [".*"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 532a56f..0000000 --- a/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -import os -from distutils.command.build import build - -from django.core import management -from setuptools import find_packages, setup - -try: - with open( - os.path.join(os.path.dirname(__file__), "README.rst"), encoding="utf-8" - ) as f: - long_description = f.read() -except FileNotFoundError: - long_description = "" - - -class CustomBuild(build): - def run(self): - management.call_command("compilemessages", verbosity=1) - build.run(self) - - -cmdclass = {"build": CustomBuild} - - -setup( - name="pretalx-venueless", - version="1.3.0", - description="Venueless integration in pretalx: Notify venueless about new schedule releases!", - long_description=long_description, - url="https://github.com/pretalx/pretalx-venueless", - author="Tobias Kunze", - author_email="r@rixx.de", - license="Apache Software License", - install_requires=["PyJWT"], - packages=find_packages(exclude=["tests", "tests.*"]), - include_package_data=True, - cmdclass=cmdclass, - entry_points=""" -[pretalx.plugin] -pretalx_venueless=pretalx_venueless:PretalxPluginMeta -""", -)