Browse Source

Move from setup.py to setup.cfg

and add configuration for some tools and use automatic versioning.
pull/7/head
juga 1 year ago
parent
commit
f2df496133
3 changed files with 88 additions and 63 deletions
  1. +9
    -0
      pyproject.toml
  2. +77
    -3
      setup.cfg
  3. +2
    -60
      setup.py

+ 9
- 0
pyproject.toml View File

@ -0,0 +1,9 @@
[build-system]
# Until pyproject is the default, use setuptools
requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm"]
[tool.black]
line-length = 79
target-version = ['py36', 'py37', 'py38']
exclude = '/docs/'
verbose = true

+ 77
- 3
setup.cfg View File

@ -1,3 +1,77 @@
[tool:pytest]
log_cli=true
log_cli_level=DEBUG
[metadata]
name = remailer
description = pEp Python Remailer
author = juga
author_email = juga@riseup.net
license = GPLv3
url = https://gitea.pep.foundation/juga/pEpPythonRemailer.git
keywords = email pEp OpenPGP remailer mixmaster
classifiers =
Development Status :: 4 - Beta
Environment :: Console
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Natural Language :: English
Operating System :: POSIX :: Linux
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Communications :: Email
Topic :: Security :: Cryptography
Topic :: System :: Networking
long_description = file: README.rst
long_description_content_type = text/x-rst
license_files = LICENSE.rst
project_urls =
; Documentation = https://ToBeServed
Source = https://gitea.pep.foundation/juga/pEpPythonRemailer.git
Tracker = https://gitea.pep.foundation/juga/pEpPythonRemailer/issues
[options]
packages = find:
include_package_data = True
python_requires = >= 3.7
install_requires =
colorlog >= 4.0
pEp >= 2.0
# To automatically write the version from a SCM.
setup_requires = setuptools_scm
[options.extras_require]
test =
coverage
flake8
flake8-docstrings
isort
pytest
tox
mypy
doc =
sphinx
dev =
pre-commit
[options.entry_points]
console_scripts =
remailer = remailer.cli:main
# If there is a pyproject.toml file, use setuptools, since pyproject.toml is
# not the default yet.
[build-system]
requires = ["setuptools", "wheel"]
[isort]
line_length = 79
multi_line_output = 3
include_trailing_comma = 1
force_grid_wrap = 0
use_parentheses = 1
verbose = 1
[flake8]
max-line-length = 79
ignore = D100,D101,D103,D104,D107
exclude = docs/*
verbose = 1

+ 2
- 60
setup.py View File

@ -1,61 +1,3 @@
#!/usr/bin/env python3
import os.path
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
def version():
with open(os.path.join(here, "remailer", "__init__.py")) as fp:
for line in fp:
if "__version__" in line.strip():
version = line.split("=", 1)[1].strip().strip("'")
return version
setup(
name='remailer',
version=version(),
description='pEp Python Remailer',
long_description=open("README.rst").read(),
long_description_content_type="text/x-rst",
author='juga',
author_email='juga@riseup.net',
license='GPLv3',
url="https://gitea.pep.foundation/juga/pEpPythonRemailer.git",
classifiers=[
'Development Status :: 4 - Beta',
"Environment :: Console",
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Communications :: Email',
'Topic :: Security :: Cryptography',
'Topic :: System :: Networking',
],
packages=find_packages(),
include_package_data=True,
keywords='email pEp OpenPGP remailer mixmaster',
python_requires='>=3.7',
entry_points={
'console_scripts': [
'remailer = remailer.cli:main',
]
},
install_requires=[
'pEp>=2.0',
'colorlog>=4.0'
],
extras_require={
'test': ['flake8', 'tox', 'pytest', 'coverage'],
'doc': ['sphinx', 'pylint'],
},
)
setup(use_scm_version=True)

Loading…
Cancel
Save