From c475cabba20363ea5789ed23bdb1f5b67d7a3be0 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:07:36 +0100 Subject: [PATCH 1/4] Move project metadata to pyproject.toml --- asyncssh/version.py | 6 --- pyproject.toml | 59 +++++++++++++++++++++++++++++ setup.py | 92 --------------------------------------------- 3 files changed, 59 insertions(+), 98 deletions(-) create mode 100644 pyproject.toml delete mode 100755 setup.py diff --git a/asyncssh/version.py b/asyncssh/version.py index 23b431f..29c8f71 100644 --- a/asyncssh/version.py +++ b/asyncssh/version.py @@ -20,10 +20,4 @@ """AsyncSSH version information""" -__author__ = 'Ron Frederick' - -__author_email__ = 'ronf@timeheart.net' - -__url__ = 'http://asyncssh.timeheart.net' - __version__ = '2.18.0' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..3588d07 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,59 @@ +[build-system] +requires = ['setuptools'] +build-backend = 'setuptools.build_meta' + +[project] +name = 'asyncssh' +license = {text = 'EPL-2.0 OR GPL-2.0-or-later'} +description = 'AsyncSSH: Asynchronous SSHv2 client and server library' +readme = 'README.rst' +authors = [{name = 'Ron Frederick', email = 'ronf@timeheart.net'}] +classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'License :: OSI Approved', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: POSIX', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Topic :: Internet', + 'Topic :: Security :: Cryptography', + 'Topic :: Software Development :: Libraries :: Python Modules', + 'Topic :: System :: Networking', +] +requires-python = '>= 3.6' +dependencies = [ + 'cryptography >= 39.0', + 'typing_extensions >= 4.0.0', +] +dynamic = ['version'] + +[project.optional-dependencies] +bcrypt = ['bcrypt >= 3.1.3'] +fido2 = ['fido2 >= 0.9.2'] +gssapi = ['gssapi >= 1.2.0'] +libnacl = ['libnacl >= 1.4.2'] +pkcs11 = ['python-pkcs11 >= 0.7.0'] +pyOpenSSL = ['pyOpenSSL >= 23.0.0'] +pywin32 = ['pywin32 >= 227'] + + +[project.urls] +Homepage = 'http://asyncssh.timeheart.net' +Documentation = 'https://asyncssh.readthedocs.io' +Source = 'https://github.com/ronf/asyncssh' +Tracker = 'https://github.com/ronf/asyncssh/issues' + +[tool.setuptools.dynamic] +version = {attr = 'asyncssh.version.__version__'} + +[tool.setuptools.packages.find] +include = ['asyncssh*'] + +[tool.setuptools.package-data] +asyncssh = ['py.typed'] diff --git a/setup.py b/setup.py deleted file mode 100755 index 76f3e7a..0000000 --- a/setup.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python3.6 - -# Copyright (c) 2013-2022 by Ron Frederick and others. -# -# This program and the accompanying materials are made available under -# the terms of the Eclipse Public License v2.0 which accompanies this -# distribution and is available at: -# -# http://www.eclipse.org/legal/epl-2.0/ -# -# This program may also be made available under the following secondary -# licenses when the conditions for such availability set forth in the -# Eclipse Public License v2.0 are satisfied: -# -# GNU General Public License, Version 2.0, or any later versions of -# that license -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later -# -# Contributors: -# Ron Frederick - initial implementation, API, and documentation - -"""AsyncSSH: Asynchronous SSHv2 client and server library - -AsyncSSH is a Python package which provides an asynchronous client and -server implementation of the SSHv2 protocol on top of the Python asyncio -framework. It requires Python 3.6 or later and the PyCA library for some -cryptographic functions. - -""" - -from os import path -from setuptools import setup - -base_dir = path.abspath(path.dirname(__file__)) - -doclines = __doc__.split('\n', 1) - -with open(path.join(base_dir, 'README.rst')) as desc: - long_description = desc.read() - -with open(path.join(base_dir, 'asyncssh', 'version.py')) as version: - exec(version.read()) - -setup(name = 'asyncssh', - version = __version__, - author = __author__, - author_email = __author_email__, - url = __url__, - project_urls = { - 'Documentation': 'https://asyncssh.readthedocs.io', - 'Source': 'https://github.com/ronf/asyncssh', - 'Tracker': 'https://github.com/ronf/asyncssh/issues' - }, - license = 'Eclipse Public License v2.0', - description = doclines[0], - long_description = long_description, - platforms = 'Any', - python_requires = '>= 3.6', - install_requires = [ - 'cryptography >= 39.0', - 'typing_extensions >= 4.0.0'], - extras_require = { - 'bcrypt': ['bcrypt >= 3.1.3'], - 'fido2': ['fido2 >= 0.9.2'], - 'gssapi': ['gssapi >= 1.2.0'], - 'libnacl': ['libnacl >= 1.4.2'], - 'pkcs11': ['python-pkcs11 >= 0.7.0'], - 'pyOpenSSL': ['pyOpenSSL >= 23.0.0'], - 'pywin32': ['pywin32 >= 227'] - }, - packages = ['asyncssh', 'asyncssh.crypto'], - package_data = {'asyncssh': ['py.typed']}, - scripts = [], - test_suite = 'tests', - classifiers = [ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'License :: OSI Approved', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: POSIX', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Topic :: Internet', - 'Topic :: Security :: Cryptography', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: System :: Networking']) From fc89b85b2d40161c40daa9e3f97ea5c7f6697ffe Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:58:40 +0100 Subject: [PATCH 2/4] Partial revert after review --- asyncssh/version.py | 6 ++++++ pyproject.toml | 4 +--- setup.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 setup.py diff --git a/asyncssh/version.py b/asyncssh/version.py index 29c8f71..23b431f 100644 --- a/asyncssh/version.py +++ b/asyncssh/version.py @@ -20,4 +20,10 @@ """AsyncSSH version information""" +__author__ = 'Ron Frederick' + +__author_email__ = 'ronf@timeheart.net' + +__url__ = 'http://asyncssh.timeheart.net' + __version__ = '2.18.0' diff --git a/pyproject.toml b/pyproject.toml index 3588d07..9ce4108 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,6 @@ name = 'asyncssh' license = {text = 'EPL-2.0 OR GPL-2.0-or-later'} description = 'AsyncSSH: Asynchronous SSHv2 client and server library' readme = 'README.rst' -authors = [{name = 'Ron Frederick', email = 'ronf@timeheart.net'}] classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', @@ -31,7 +30,7 @@ dependencies = [ 'cryptography >= 39.0', 'typing_extensions >= 4.0.0', ] -dynamic = ['version'] +dynamic = ['version', "authors"] [project.optional-dependencies] bcrypt = ['bcrypt >= 3.1.3'] @@ -44,7 +43,6 @@ pywin32 = ['pywin32 >= 227'] [project.urls] -Homepage = 'http://asyncssh.timeheart.net' Documentation = 'https://asyncssh.readthedocs.io' Source = 'https://github.com/ronf/asyncssh' Tracker = 'https://github.com/ronf/asyncssh/issues' diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..1d5df89 --- /dev/null +++ b/setup.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3.6 + +# Copyright (c) 2013-2022 by Ron Frederick and others. +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License v2.0 which accompanies this +# distribution and is available at: +# +# http://www.eclipse.org/legal/epl-2.0/ +# +# This program may also be made available under the following secondary +# licenses when the conditions for such availability set forth in the +# Eclipse Public License v2.0 are satisfied: +# +# GNU General Public License, Version 2.0, or any later versions of +# that license +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later +# +# Contributors: +# Ron Frederick - initial implementation, API, and documentation + +"""AsyncSSH: Asynchronous SSHv2 client and server library + +AsyncSSH is a Python package which provides an asynchronous client and +server implementation of the SSHv2 protocol on top of the Python asyncio +framework. It requires Python 3.6 or later and the PyCA library for some +cryptographic functions. + +""" + +from os import path +from setuptools import setup + +base_dir = path.abspath(path.dirname(__file__)) + +with open(path.join(base_dir, 'asyncssh', 'version.py')) as version: + exec(version.read()) + +setup(author = __author__, + author_email = __author_email__, + url = __url__) From 5e4cf9ae61c5ef3438de4b79fb3adfec294ffac1 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 19 Nov 2024 02:37:31 +0100 Subject: [PATCH 3/4] Remove docstring --- setup.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/setup.py b/setup.py index 1d5df89..d990dba 100644 --- a/setup.py +++ b/setup.py @@ -20,15 +20,6 @@ # Contributors: # Ron Frederick - initial implementation, API, and documentation -"""AsyncSSH: Asynchronous SSHv2 client and server library - -AsyncSSH is a Python package which provides an asynchronous client and -server implementation of the SSHv2 protocol on top of the Python asyncio -framework. It requires Python 3.6 or later and the PyCA library for some -cryptographic functions. - -""" - from os import path from setuptools import setup From 764eea169c5455d3c4ce15e8da39d1618ee7b257 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 19 Nov 2024 03:02:13 +0100 Subject: [PATCH 4/4] Remove setup.py file --- pyproject.toml | 4 +++- setup.py | 33 --------------------------------- 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index 9ce4108..3588d07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ name = 'asyncssh' license = {text = 'EPL-2.0 OR GPL-2.0-or-later'} description = 'AsyncSSH: Asynchronous SSHv2 client and server library' readme = 'README.rst' +authors = [{name = 'Ron Frederick', email = 'ronf@timeheart.net'}] classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', @@ -30,7 +31,7 @@ dependencies = [ 'cryptography >= 39.0', 'typing_extensions >= 4.0.0', ] -dynamic = ['version', "authors"] +dynamic = ['version'] [project.optional-dependencies] bcrypt = ['bcrypt >= 3.1.3'] @@ -43,6 +44,7 @@ pywin32 = ['pywin32 >= 227'] [project.urls] +Homepage = 'http://asyncssh.timeheart.net' Documentation = 'https://asyncssh.readthedocs.io' Source = 'https://github.com/ronf/asyncssh' Tracker = 'https://github.com/ronf/asyncssh/issues' diff --git a/setup.py b/setup.py deleted file mode 100644 index d990dba..0000000 --- a/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python3.6 - -# Copyright (c) 2013-2022 by Ron Frederick and others. -# -# This program and the accompanying materials are made available under -# the terms of the Eclipse Public License v2.0 which accompanies this -# distribution and is available at: -# -# http://www.eclipse.org/legal/epl-2.0/ -# -# This program may also be made available under the following secondary -# licenses when the conditions for such availability set forth in the -# Eclipse Public License v2.0 are satisfied: -# -# GNU General Public License, Version 2.0, or any later versions of -# that license -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later -# -# Contributors: -# Ron Frederick - initial implementation, API, and documentation - -from os import path -from setuptools import setup - -base_dir = path.abspath(path.dirname(__file__)) - -with open(path.join(base_dir, 'asyncssh', 'version.py')) as version: - exec(version.read()) - -setup(author = __author__, - author_email = __author_email__, - url = __url__)