[PATCH gnupgpy 1/5] build: Migrate project metadata to pyproject.toml

Lucas via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <6eba00156c7671b9eb2646ad66d6313a7baefaff.1742770151.git.lucc@posteo.de>
* pyproject.toml: New.
* setup.py.in: Migrate some static metadata to the new pyproject.toml
file
--

This commit just migrates the metadata without any further changes.  All
updates and modernisations follow in later commits.

Signed-off-by: Lucas Hoffmann <[email protected]>
---
 pyproject.toml | 37 +++++++++++++++++++++++++++++++++++++
 setup.py.in    | 25 -------------------------
 2 files changed, 37 insertions(+), 25 deletions(-)
 create mode 100644 pyproject.toml

_______________________________________________
Gnupg-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
0001-build-Migrate-project-metadata-to-pyproject.toml.patch (text/x-patch, 3.4 KB)
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..c3c9d70
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,37 @@
+[project]
+name = "gpg"
+
+# These are set in the setup.py file.  The field "readme" is called
+# "long_description" over there.
+dynamic = ["version", "readme"]
+
+# Note: description appears as Summary in egg-info file.
+description = "Python bindings to the GPGME API of the GnuPG cryptography library."
+
+license = {text = "LGPL2.1+ (the library), GPL2+ (tests and examples)"}
+authors = [{name = "The GnuPG hackers", email = "[email protected]"}]
+
+classifiers = [
+    "Development Status :: 4 - Beta",
+    "Intended Audience :: Developers",
+    "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
+    "Programming Language :: Python :: 2",
+    "Programming Language :: Python :: 2.7",
+    "Programming Language :: Python :: 3",
+    "Programming Language :: Python :: 3.6",
+    "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",
+    "Operating System :: POSIX",
+    "Operating System :: Microsoft :: Windows",
+    "Topic :: Communications :: Email",
+    "Topic :: Security :: Cryptography",
+]
+urls = {homepage = "https://www.gnupg.org"}
+
+[build-system]
+# Minimum requirements for the build system to execute.
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
diff --git a/setup.py.in b/setup.py.in
index 22b01af..3f57232 100755
--- a/setup.py.in
+++ b/setup.py.in
@@ -229,11 +229,8 @@ swige = Extension(
     extra_link_args=libs)
 
 setup(
-    name='gpg',
     cmdclass={'build': BuildExtFirstHack},
     version='@VERSION@',
-    # Note: description appears as Summary in egg-info file.
-    description='Python bindings to the GPGME API of the GnuPG cryptography library.',
     # Note: long-description appears as Description in egg-info file.
     long_description='''Dynamically generated bindings to the C API of the GNU Privacy Guard.
 
@@ -257,31 +254,9 @@ GPGME and these bindings is available here:
 
     https://gnupg.org/software/gpgme/index.html
 ''',
-    author='The GnuPG hackers',
-    author_email='[email protected]',
-    url='https://www.gnupg.org',
     ext_modules=[swige],
     packages=[
         'gpg', 'gpg.constants', 'gpg.constants.data', 'gpg.constants.keylist',
         'gpg.constants.sig', 'gpg.constants.tofu'
     ],
-    license='LGPL2.1+ (the library), GPL2+ (tests and examples)',
-    classifiers=[
-        'Development Status :: 4 - Beta',
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)',
-        'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.7',
-        'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.6',
-        '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',
-        'Operating System :: POSIX',
-        'Operating System :: Microsoft :: Windows',
-        'Topic :: Communications :: Email',
-        'Topic :: Security :: Cryptography',
-    ],
 )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.