diff --git a/Changelog b/Changelog new file mode 100644 index 0000000..d03efa1 --- /dev/null +++ b/Changelog @@ -0,0 +1,8 @@ +Version 3.1, 2023-12-20 + + Switch to pyproject.toml for building the package + + +Version 3.0, 2020-12-20 + + Initial changelog diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6206135 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,41 @@ +[build-system] +requires = ["setuptools", "setuptools_scm[toml]"] +build-backend = "setuptools.build_meta" + +[project] +name = "privacyideaadm" +dynamic = ["version"] +description = 'privacyIDEA admin Client' +authors = [ + {name = "Cornelius Kölbel", email = "cornelius@privacyidea.org"}, +] +readme = {file = "README.md", content-type = "text/markdown"} +requires-python = ">=3.7" +keywords = ["2fa", "mfa", "privacyIDEA", "Yubikey", "Nitrokey"] +license = {text = "AGPL-3.0-only"} +classifiers = [ + "Programming Language :: Python :: 3", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: GNU Affero General Public License v3" +] + +dependencies = [ + "cffi", + "click", + "cryptography", + "python-yubico", + "qrcode", + "requests", + "six" +] + +[project.optional-dependencies] +doc = ["sphinx"] +dev = ["pytest"] + +[project.urls] +homepage = "https://www.privacyidea.org" +repository = "https://github.com/privacyidea/privacyideaadm.git" +changelog = "https://github.com/privacyidea/privacyideaadm/Changelog" + +[tool.setuptools_scm] diff --git a/requirements.txt b/requirements.txt index caab6e6..32da4e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,15 @@ -certifi==2020.6.20 -cffi==1.14.0 -chardet==3.0.4 -click==7.1.2 -cryptography==2.9.2 -idna==2.10 -pycparser==2.20 +certifi==2022.12.7 +cffi==1.15.1 +charset-normalizer==3.1.0 +click==8.1.3 +cryptography==40.0.2 +idna==3.4 +pycparser==2.21 +pypng==0.20220715.0 python-yubico==1.3.3 -pyusb==1.0.2 -qrcode==6.1 -requests==2.24.0 -six==1.15.0 -sphinx==6.1.3 -urllib3==1.25.9 +pyusb==1.2.1 +qrcode==7.4.2 +requests==2.28.2 +six==1.16.0 +typing_extensions==4.5.0 +urllib3==1.26.15 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 40010ab..0000000 --- a/setup.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[egg_info] -#tag_build = dev -tag_svn_revision = false - -[bdist_rpm] -release = 1 -group = Productivity/Networking/Security -vendor = privacyidea.org -packager = cornelius@privacyidea.org -Provides = privacyideaadm diff --git a/setup.py b/setup.py index 10571b4..a078797 100644 --- a/setup.py +++ b/setup.py @@ -1,75 +1,16 @@ # -*- coding: utf-8 -*- -from __future__ import print_function from setuptools import setup -from setuptools.command.install import install -import os -import sys -version = "3.0" -name = 'privacyideaadm' -release = '3.0' - -# Taken from kennethreitz/requests/setup.py -package_directory = os.path.realpath(os.path.dirname(__file__)) - - -class InstallWithDoc(install): - def run(self): - self.run_command('build_sphinx') - install.run(self) - - -cmdclass = {'install': InstallWithDoc} - - -def get_file_contents(file_path): - """Get the context of the file using full path name.""" - content = "" - try: - full_path = os.path.join(package_directory, file_path) - content = open(full_path, 'r').read() - except: - print("### could not open file {0!r}".format(file_path), file=sys.stderr) - return content - - -setup(name=name, - version=version, - description='privacyIDEA admin Client', - author='Cornelius Kölbel', - author_email='cornelius@privacyidea.org', - url='http://www.privacyidea.org', - packages=['privacyideautils', - 'privacyideautils.commands'], - setup_requires=['sphinx <= 1.8.5;python_version<"3.0"', - 'sphinx >= 2.0;python_version>="3.0"'], - install_requires=[ - "cffi", - "click", - "cryptography", - "python-yubico", - "qrcode", - "requests", - "six" - ], - cmdclass=cmdclass, - command_options={ - 'build_sphinx': { - 'project': ('setup.py', name), - 'version': ('setup.py', version), - 'source_dir': ('setup.py', 'doc'), - 'build_dir': ('setup.py', os.path.join('doc', '_build')), - 'builder': ('setup.py', 'man') - } - }, - scripts=['scripts/privacyidea', - 'scripts/privacyidea-luks-assign', - 'scripts/privacyidea-authorizedkeys', - 'scripts/privacyidea-check-offline-otp', - 'scripts/privacyidea-get-offline-otp', - 'scripts/privacyidea-validate', - 'scripts/privacyidea-enroll-yubikey-piv'], - data_files=[('share/man/man1', ["doc/_build/man/privacyidea.1"])], - license='AGPLv3', - long_description=get_file_contents('DESCRIPTION') - ) +setup( + packages=['privacyideautils', + 'privacyideautils.commands'], + scripts=[ + 'scripts/privacyidea', + 'scripts/privacyidea-luks-assign', + 'scripts/privacyidea-authorizedkeys', + 'scripts/privacyidea-check-offline-otp', + 'scripts/privacyidea-get-offline-otp', + 'scripts/privacyidea-validate', + 'scripts/privacyidea-enroll-yubikey-piv' + ] +)