mirror of
https://github.com/pretix/pretix-servicefees.git
synced 2024-10-13 13:41:49 +02:00
Convert project to use pyproject.toml
This commit is contained in:
parent
5bc8a670f2
commit
510d90a60c
|
@ -1,13 +1,11 @@
|
|||
pypi:
|
||||
script:
|
||||
- cp /keys/.pypirc ~/.pypirc
|
||||
- virtualenv env
|
||||
- source env/bin/activate
|
||||
- XDG_CACHE_HOME=/cache pip3 install -U pip wheel setuptools twine
|
||||
- XDG_CACHE_HOME=/cache pip3 install -U pretix
|
||||
- XDG_CACHE_HOME=/cache pip3 install -U pkginfo==1.8.3 # Work around https://github.com/pypa/twine/issues/940
|
||||
- python setup.py develop
|
||||
- python setup.py sdist bdist_wheel
|
||||
- virtualenv /tmp/env
|
||||
- source /tmp/env/bin/activate
|
||||
- XDG_CACHE_HOME=/cache pip3 install -U pip wheel setuptools twine build pretix-plugin-build
|
||||
- python -m build
|
||||
- check-manifest .
|
||||
- twine check dist/*
|
||||
- twine upload dist/*
|
||||
tags:
|
||||
|
|
|
@ -12,7 +12,7 @@ Development setup
|
|||
|
||||
3. Activate the virtual environment you use for pretix development.
|
||||
|
||||
4. Execute ``python setup.py develop`` within this directory to register this application with pretix's plugin registry.
|
||||
4. Execute ``pip install -e .`` within this directory to register this application with pretix's plugin registry.
|
||||
|
||||
5. Execute ``make`` within this directory to compile translations.
|
||||
|
||||
|
|
43
pyproject.toml
Normal file
43
pyproject.toml
Normal file
|
@ -0,0 +1,43 @@
|
|||
[project]
|
||||
name = "pretix-servicefees"
|
||||
dynamic = ["version"]
|
||||
description = "Allows you to impose a service fee on all non-free orders."
|
||||
readme = "README.rst"
|
||||
requires-python = ">=3.9"
|
||||
license = {file = "LICENSE"}
|
||||
keywords = ["pretix"]
|
||||
authors = [
|
||||
{name = "pretix team", email = "support@pretix.eu"},
|
||||
]
|
||||
maintainers = [
|
||||
{name = "pretix team", email = "support@pretix.eu"},
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
|
||||
]
|
||||
|
||||
[project.entry-points."pretix.plugin"]
|
||||
pretix_servicefees = "pretix_servicefees:PretixPluginMeta"
|
||||
|
||||
[project.entry-points."distutils.commands"]
|
||||
build = "pretix_plugin_build.build:CustomBuild"
|
||||
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools",
|
||||
"pretix-plugin-build",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://github.com/pretix/pretix-servicefees"
|
||||
|
||||
[tool.setuptools]
|
||||
include-package-data = true
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "pretix_servicefees.__version__"}
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["pretix*"]
|
||||
namespaces = false
|
46
setup.py
46
setup.py
|
@ -1,45 +1,3 @@
|
|||
import os
|
||||
from distutils.command.build import build
|
||||
from setuptools import setup
|
||||
|
||||
from django.core import management
|
||||
from setuptools import setup, find_packages
|
||||
from pretix_servicefees import __version__
|
||||
|
||||
|
||||
try:
|
||||
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as f:
|
||||
long_description = f.read()
|
||||
except:
|
||||
long_description = ''
|
||||
|
||||
|
||||
class CustomBuild(build):
|
||||
def run(self):
|
||||
management.call_command('compilemessages', verbosity=1)
|
||||
build.run(self)
|
||||
|
||||
|
||||
cmdclass = {
|
||||
'build': CustomBuild
|
||||
}
|
||||
|
||||
|
||||
setup(
|
||||
name='pretix-servicefees',
|
||||
version=__version__,
|
||||
description='Allows you to impose a service fee on all non-free orders.',
|
||||
long_description=long_description,
|
||||
url='https://github.com/pretix/pretix-servicefees',
|
||||
author='Raphael Michel',
|
||||
author_email='michel@rami.io',
|
||||
license='Apache Software License',
|
||||
|
||||
install_requires=[],
|
||||
packages=find_packages(exclude=['tests', 'tests.*']),
|
||||
include_package_data=True,
|
||||
cmdclass=cmdclass,
|
||||
entry_points="""
|
||||
[pretix.plugin]
|
||||
pretix_servicefees=pretix_servicefees:PretixPluginMeta
|
||||
""",
|
||||
)
|
||||
setup()
|
||||
|
|
Loading…
Reference in a new issue