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 4f5eed2 commit 0b00934
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 121 deletions.
99 changes: 21 additions & 78 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,27 @@ 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 pretalx
run: pip3 install pretalx
- name: Install Dependencies
run: pip3 install isort -Ue .
cache: "pip"
python-version: "3.11"
- name: Install isort
run: pip3 install isort
- name: Run isort
run: isort -c .
flake:
name: flake8
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 pretalx
run: pip3 install pretalx
cache: "pip"
python-version: "3.11"
- 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 @@ -62,64 +48,28 @@ 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 pretalx
run: pip3 install pretalx
cache: "pip"
python-version: "3.11"
- 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
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 pretalx
run: pip3 install pretalx
cache: "pip"
python-version: "3.11"
- 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 @@ -128,25 +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-
- name: Install pretalx
run: pip3 install pretalx
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/*
Expand Down
1 change: 1 addition & 0 deletions pretalx_youtube/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "2.0.0"
4 changes: 3 additions & 1 deletion pretalx_youtube/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 . import __version__


class PluginApp(AppConfig):
name = "pretalx_youtube"
Expand All @@ -13,7 +15,7 @@ class PretalxPluginMeta:
"Show YouTube videos embedded on talk pages. Set URLs manually or via API."
)
visible = True
version = "2.0.0"
version = __version__
category = "RECORDING"

def ready(self):
Expand Down
38 changes: 38 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[project]
name = "pretalx-youtube"
dynamic = ["version"]
description = "Static youtube 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-youtube"
repository = "https://github.com/pretalx/pretalx-youtube.git"

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

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

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

[tool.setuptools.dynamic]
version = {attr = "pretalx_youtube.__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 0b00934

Please sign in to comment.