Skip to content
Snippets Groups Projects
Verified Commit b0823ab3 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Apply updateded pretix plugin cookiecutter

parent c1c754b9
Branches
Tags
No related merge requests found
Pipeline #270543 failed
......@@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
......@@ -39,10 +39,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
......@@ -61,10 +61,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
......@@ -83,10 +83,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
......@@ -96,7 +96,7 @@ jobs:
- name: Install pretix
run: pip3 install pretix
- name: Install Dependencies
run: pip3 install twine check-manifest -Ue .
run: pip3 install twine check-manifest pretix-plugin-build setuptools build -Ue .
- name: Run check-manifest
run: check-manifest .
working-directory: .
......
......@@ -16,10 +16,10 @@ jobs:
name: Tests
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v1
with:
path: ~/.cache/pip
......
......@@ -49,6 +49,7 @@ __pycache__/
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
......@@ -66,6 +67,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
.ropeproject/
# PyInstaller
# Usually these files are written by a python script from a template
......@@ -87,7 +89,7 @@ htmlcov/
nosetests.xml
coverage.xml
*.cover
*.py,cover
*,cover
.hypothesis/
.pytest_cache/
cover/
......@@ -101,6 +103,7 @@ cover/
local_settings.py
db.sqlite3
db.sqlite3-journal
data/
# Flask stuff:
instance/
......@@ -116,7 +119,7 @@ docs/_build/
.pybuilder/
target/
# Jupyter Notebook
# Ipython Notebook
.ipynb_checkpoints
# IPython
......
---
stages:
- linting
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache
docformatter:
stage: linting
image: python:3
before_script:
- pip3 install -U pip docformatter
script:
- docformatter --check -r .
black:
stage: linting
image: python:3
before_script:
- pip3 install -U pip black
script:
- black --check .
isort:
stage: linting
image: python:3
before_script:
- pip3 install -U pip isort
script:
- isort -c .
flake8:
stage: linting
image: python:3
before_script:
- pip3 install -U pip flake8
script:
- flake8 .
test:
image:
name: pretix/ci-image
before_script:
- pip install -U pip uv
- uv pip install --system -U wheel setuptools pytest pytest-django coverage
- uv pip install --system -U git+https://github.com/pretix/pretix.git@master#egg=pretix
script:
- uv pip install --system -e .
- make
- coverage run -m pytest tests
- coverage report
style:
image:
name: pretix/ci-image
before_script:
- pip install -U pip uv
- uv pip install --system -U wheel setuptools isort black flake8 check-manifest
- uv pip install --system -U git+https://github.com/pretix/pretix.git@master#egg=pretix
script:
- uv pip install --system -e .
- black --check .
- isort -c --gitignore .
- flake8 --extend-exclude .cache .
- check-manifest --ignore .cache .
pypi:
image:
name: pretix/ci-image
before_script:
- cat $PYPIRC > ~/.pypirc
- pip install -U pip uv
- uv pip install --system -U wheel setuptools twine build pretix-plugin-build check-manifest
script:
- python -m build
- check-manifest .
- twine check dist/*
- twine upload dist/*
only:
- pypi
artifacts:
paths:
- dist/
Copyright 2023 Jaakko Rinta-Filppula, Felix Schäfer
Copyright 2025 Jaakko Rinta-Filppula, Felix Schäfer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......
[project]
name = "pretix-oidc"
dynamic = ["version"]
description = "OIDC authentication plugin for pretix"
readme = "README.md"
license = {text = "Apache"}
keywords = ["pretix", "oidc"]
authors = [
{name = "Felix Schäfer", email = "admin@kif.rocks"},
{name = "Jaakko Rinta-Filppula"},
]
maintainers = [
{name = "Felix Schäfer", email = "admin@kif.rocks"},
]
dependencies = [
"dictlib",
"oic",
]
[project.entry-points."pretix.plugin"]
pretix_oidc = "pretix_oidc:PretixPluginMeta"
[project.entry-points."distutils.commands"]
build = "pretix_plugin_build.build:CustomBuild"
[build-system]
requires = [
"setuptools",
"pretix-plugin-build",
]
[project.urls]
Homepage = "https://gitlab.fachschaften.org/kif/pretix-oidc"
Repository = "https://github.com/thegcat/pretix-oidc"
Tracker = "https://github.com/thegcat/pretix-oidc/issues"
"pretix Marketplace" = "https://marketplace.pretix.eu/products/oidc/"
[tool.setuptools]
include-package-data = true
[tool.setuptools.dynamic]
version = {attr = "pretix_oidc.__version__"}
[tool.setuptools.packages.find]
include = ["pretix*"]
namespaces = false
......@@ -4,12 +4,12 @@ max-line-length = 160
exclude = migrations,.ropeproject,static,_static,build
[isort]
profile = black
combine_as_imports = true
default_section = THIRDPARTY
include_trailing_comma = true
known_third_party = pretix
known_standard_library = typing
multi_line_output = 3
skip = setup.py
use_parentheses = True
force_grid_wrap = 0
......
import os
from distutils.command.build import build
from setuptools import setup
from django.core import management
from setuptools import find_packages, setup
from pretix_oidc import __version__
try:
with open(
os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8"
) as f:
long_description = f.read()
except Exception:
long_description = ""
class CustomBuild(build):
def run(self):
management.call_command("compilemessages", verbosity=1)
build.run(self)
cmdclass = {"build": CustomBuild}
setup(
name="pretix-oidc",
version=__version__,
description="OIDC authentication plugin for pretix",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://gitlab.fachschaften.org/kif/pretix-oidc",
author="Jaakko Rinta-Filppula, Felix Schäfer",
author_email="admin@kif.rocks",
license="Apache",
install_requires=["dictlib>=1.1.5", "oic>=1.2.0"],
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
cmdclass=cmdclass,
entry_points="""
[pretix.plugin]
pretix_oidc=pretix_oidc:PretixPluginMeta
""",
)
setup()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment