migrate from setup.py to pyproject.toml
authorprecioussheep <redacted>
Mon, 8 Sep 2025 00:29:59 +0000 (10:29 +1000)
committerprecioussheep <redacted>
Mon, 8 Sep 2025 00:29:59 +0000 (10:29 +1000)
pyproject.toml [new file with mode: 0644]
setup.py [deleted file]

diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644 (file)
index 0000000..14a40f2
--- /dev/null
@@ -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 (file)
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',
-    ],
-)
git clone https://git.99rst.org/PROJECT