From 40b235e1b5db41f45e72aaa769577f0e8ef30128 Mon Sep 17 00:00:00 2001 From: precioussheep <87296328+Precioussheep@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:29:59 +1000 Subject: [PATCH 1/2] migrate from setup.py to pyproject.toml --- pyproject.toml | 42 ++++++++++++++++++++++++++++++++++++++++++ setup.py | 40 ---------------------------------------- 2 files changed, 42 insertions(+), 40 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..14a40f2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,42 @@ +[build-system] +requires = ["setuptools >= 77.0.3"] +build-backend = "setuptools.build_meta" + +[project] +name = "xkcdpass" +version = "1.20.0" +description = "Generate secure multiword passwords/passphrases, inspired by XKCD" +readme = "README.rst" +authors = [{ name = "Steven Tobin", email = "steventtobin@gmail.com" }] +license = "BSD-3-Clause" +license-files = ["LICENSE.BSD"] +requires-python = ">=3.6" + +classifiers = [ + 'Development Status :: 5 - Production/Stable', + "Environment :: Console", + 'Operating System :: OS Independent', + "Programming Language :: Python :: 3.6", + "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", + "Programming Language :: Python :: 3.13", +] + +[project.urls] +Homepage = "https://github.com/redacted/XKCD-password-generator" +Repository = "https://github.com/redacted/XKCD-password-generator.git" +Issues = "https://github.com/redacted/XKCD-password-generator/issues" + +[project.scripts] +xkcdpass = "xkcdpass.xkcd_password:main" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +include = ["xkcdpass*"] +exclude = ["examples", "*.tests", "*.tests.*", "tests.*", "tests"] diff --git a/setup.py b/setup.py deleted file mode 100644 index cbce854..0000000 --- a/setup.py +++ /dev/null @@ -1,40 +0,0 @@ -from setuptools import setup, find_namespace_packages -from io import open -import sys - -setup( - name='xkcdpass', - version='1.20.0', - author='Steven Tobin', - author_email='steventtobin@gmail.com', - url='https://github.com/redacted/XKCD-password-generator', - description='Generate secure multiword passwords/passphrases, inspired by XKCD', - long_description=open('README.rst', encoding='utf-8').read(), - #packages=['xkcdpass'], - packages=find_namespace_packages(exclude=["examples", "*.tests", "*.tests.*", "tests.*", "tests"]), - zip_safe=False, - license='BSD', - include_package_data=True, - entry_points={ - 'console_scripts': [ - 'xkcdpass = xkcdpass.xkcd_password:main', - ], - }, - tests_require=['mock'] if sys.version_info[0] == 2 else None, - test_suite = 'tests', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Environment :: Console', - 'Operating System :: OS Independent', - 'License :: OSI Approved :: BSD License', - ], -) From c1fd2b65863b9a1c1d888c3f1f83cc928328c706 Mon Sep 17 00:00:00 2001 From: precioussheep <87296328+Precioussheep@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:42:42 +1000 Subject: [PATCH 2/2] update README to reflect pyproject build and remove python2 support --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index e36795e..833126f 100644 --- a/README.rst +++ b/README.rst @@ -23,7 +23,7 @@ Install or manually:: - python setup.py install + pip install . @@ -38,7 +38,7 @@ Contributions welcome and gratefully appreciated! Requirements ============ -Python 2 (version 2.7 or later), or Python 3 (version 3.4 or later). Running module unit tests on Python 2 requires ``mock`` to be installed. +Python 3 (version 3.4 or later).