Skip to content

Commit

Permalink
Migrate to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
rixx committed Nov 2, 2023
1 parent b391efe commit 2f16658
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 81 deletions.
44 changes: 6 additions & 38 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pretalx
run: pip3 install pretalx
- name: Install Dependencies
run: pip3 install isort -Ue .
- name: Install isort
run: pip3 install isort
- name: Run isort
run: isort -c .
flake:
Expand All @@ -50,10 +48,8 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pretalx
run: pip3 install pretalx
- name: Install Dependencies
run: pip3 install flake8 flake8-bugbear -Ue .
run: pip3 install flake8 flake8-bugbear
- name: Run flake8
run: flake8 .
working-directory: .
Expand All @@ -72,35 +68,11 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pretalx
run: pip3 install pretalx
- name: Install Dependencies
run: pip3 install black -Ue .
run: pip3 install black
- name: Run black
run: black --check .
working-directory: .
docformatter:
name: docformatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
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 pretalx
run: pip3 install pretalx
- name: Install Dependencies
run: pip3 install docformatter -Ue .
- name: Run docformatter
run: docformatter --check -r .
working-directory: .
djhtml:
name: djhtml
runs-on: ubuntu-latest
Expand All @@ -116,10 +88,8 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pretalx
run: pip3 install pretalx
- name: Install Dependencies
run: pip3 install djhtml -Ue .
run: pip3 install djhtml
- name: Run docformatter
run: find -name "*.html" | xargs djhtml -c
working-directory: .
Expand All @@ -138,15 +108,13 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pretalx
run: pip3 install pretalx
- 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/*
Expand Down
1 change: 1 addition & 0 deletions pretalx_media_ccc_de/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.2.0"
4 changes: 3 additions & 1 deletion pretalx_media_ccc_de/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy

from pretalx_media_ccc_de import __version__


class PluginApp(AppConfig):
name = "pretalx_media_ccc_de"
Expand All @@ -13,7 +15,7 @@ class PretalxPluginMeta:
"Pull recordings from media.ccc.de and embed them in talk pages"
)
visible = True
version = "1.2.0"
version = __version__
category = "RECORDING"

def ready(self):
Expand Down
40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[project]
name = "pretalx-media-ccc-de"
dynamic = ["version"]
description = "Pull recordings from media.ccc.de and embed them in talk pages."
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-media-ccc-de"
repository = "https://github.com/pretalx/pretalx-media-ccc-de.git"

[project.entry-points."pretalx.plugin"]
pretalx_media_ccc_de = "pretalx_media_ccc_de:PretalxPluginMeta"

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools", "wheel"]

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

[tool.setuptools.dynamic]
version = {attr = "pretalx_media_ccc_de.__version__"}

[tool.setuptools.packages.find]
include = ["pretalx*"]

[tool.check-manifest]
ignore = [
".*",
]
42 changes: 0 additions & 42 deletions setup.py

This file was deleted.

0 comments on commit 2f16658

Please sign in to comment.