Switch to setup.cfg due to deprecation of setup.py

This commit is contained in:
Peter Pfeufer 2022-03-09 09:50:40 +00:00 committed by Ariel Rin
parent c377bcec5f
commit 6846bb7cdc
6 changed files with 93 additions and 93 deletions

View File

@ -134,11 +134,13 @@ deploy_production:
image: python:3.10-bullseye
before_script:
- pip install twine wheel
- python -m pip install --upgrade pip
- python -m pip install --upgrade build
- python -m pip install --upgrade setuptools wheel twine
script:
- python setup.py sdist bdist_wheel
- twine upload dist/*
- python -m build
- python -m twine upload dist/*
rules:
- if: $CI_COMMIT_TAG

View File

@ -28,7 +28,12 @@ repos:
exclude: ^(LICENSE|allianceauth\/static\/css\/themes\/bootstrap-locals.less|allianceauth\/eveonline\/swagger.json|(.*.po)|(.*.mo))
- repo: https://github.com/asottile/pyupgrade
rev: v2.30.0
rev: v2.31.0
hooks:
- id: pyupgrade
args: [ --py38-plus ]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.0
hooks:
- id: setup-cfg-fmt

6
pyproject.toml Normal file
View File

@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"

74
setup.cfg Normal file
View File

@ -0,0 +1,74 @@
[metadata]
name = allianceauth
version = attr: allianceauth.__version__
description = An auth system for EVE Online to help in-game organizations manage online service access.
long_description = file: README.md
long_description_content_type = text/markdown
author = Alliance Auth
author_email = adarnof@gmail.com
license = GPL-2.0
license_file = LICENSE
classifiers =
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 4
Intended Audience :: Developers
License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Internet :: WWW/HTTP :: Dynamic Content',
Topic :: Internet :: WWW/HTTP',
home_page = https://gitlab.com/allianceauth/allianceauth
keywords =
allianceauth
eveonline
project_urls =
Issue / Bug Reports = https://gitlab.com/allianceauth/allianceauth/-/issues
Documentation = https://allianceauth.readthedocs.io/
[options]
packages = find:
install_requires =
bcrypt
beautifulsoup4
celery>=5.2.0,<6.0.0
celery-once>=3.0.1
django>=4.0.2,<5.0.0
django-bootstrap-form
django-celery-beat@git+https://github.com/celery/django-celery-beat.git@0806ab3c65e1615e9b617146779c21f49749067a
django-esi>=4.0.0a1
django-redis>=5.2.0<6.0.0
django-registration>=3.2
django-sortedm2m
dnspython
mysqlclient>=2.1.0
openfire-restapi
packaging>=21.0,<22
passlib
pydiscourse
python-slugify>=1.2
redis>=4.0.0,<5.0.0
requests>=2.9.1,<3.0.0
requests-oauthlib
semantic-version
slixmpp
python_requires = ~=3.8
include_package_data = True
zip_safe = False
[options.packages.find]
include = allianceauth
[options.entry_points]
console_scripts =
allianceauth = allianceauth.bin.allianceauth:main
[options.extras_require]
test =
coverage>=4.3.1
django-webtest
requests-mock>=1.2.0

View File

@ -1,88 +0,0 @@
import os
from setuptools import setup
import allianceauth
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
install_requires = [
'mysqlclient>=2.1.0',
'dnspython',
'passlib',
'requests>=2.9.1,<3.0.0',
'bcrypt',
'python-slugify>=1.2',
'requests-oauthlib',
'semantic_version',
'packaging>=21.0,<22',
'beautifulsoup4',
'redis>=4.0.0,<5.0.0',
'celery>=5.2.0,<6.0.0',
'celery_once>=3.0.1',
'django>=4.0.2,<5.0.0',
'django-bootstrap-form',
'django-registration>=3.2',
'django-sortedm2m',
'django-redis>=5.2.0<6.0.0',
'django-celery-beat @ git+https://github.com/celery/django-celery-beat.git@0806ab3c65e1615e9b617146779c21f49749067a',
'openfire-restapi',
'slixmpp',
'pydiscourse',
'django-esi>=4.0.0a1'
]
testing_extras = [
'coverage>=4.3.1',
'requests-mock>=1.2.0',
'django-webtest',
]
setup(
name='allianceauth',
version=allianceauth.__version__,
author='Alliance Auth',
author_email='adarnof@gmail.com',
description=(
'An auth system for EVE Online to help in-game organizations '
'manage online service access.'
),
long_description=long_description,
long_description_content_type='text/markdown',
install_requires=install_requires,
extras_require={
'testing': testing_extras
},
python_requires='~=3.8',
license='GPLv2',
packages=['allianceauth'],
url=allianceauth.__url__,
zip_safe=False,
include_package_data=True,
entry_points="""
[console_scripts]
allianceauth=allianceauth.bin.allianceauth:main
""",
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 4',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
project_urls={
'Documentation': 'https://allianceauth.readthedocs.io/',
},
)

View File

@ -1,4 +1,5 @@
[tox]
isolated_build = True
skipsdist = true
usedevelop = true
envlist = py{38,39,310,311}-{all,core}
@ -15,7 +16,7 @@ basepython =
py311: python3.11
deps=
coverage
install_command = pip install -e ".[testing]" -U {opts} {packages}
install_command = pip install -e ".[test]" -U {opts} {packages}
commands =
all: coverage run runtests.py -v 2 --debug-mode
core: coverage run runtests.py allianceauth.authentication.tests.test_app_settings -v 2 --debug-mode