]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
pyproject.toml instead of setup.py for new packaging
authorBoris Glimcher <Boris.Glimcher@emc.com>
Sun, 27 Feb 2022 19:36:04 +0000 (21:36 +0200)
committerBoris Glimcher <Boris.Glimcher@emc.com>
Mon, 28 Feb 2022 14:00:34 +0000 (16:00 +0200)
This allows to build with meson and package for Pypi

Build like this:
    python -m build

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
libnvme/setup.py [deleted file]
pyproject.toml [new file with mode: 0644]

diff --git a/libnvme/setup.py b/libnvme/setup.py
deleted file mode 100644 (file)
index b7994ea..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-from distutils.core import setup, Extension
-
-libnvme_module = Extension(
-    '_nvme',
-    sources = ['nvme_wrap.c'],
-    libraries = ['nvme', 'json-c', 'uuid'],
-    library_dirs = ['../src'],
-    include_dirs = ['../ccan', '../src', '../src/nvme'],
-)
-
-setup(
-    name='libnvme',
-    author="Hannes Reinecke",
-    author_email='hare@suse.de',
-    description='python bindings for libnvme',
-    ext_modules=[libnvme_module],
-    py_modules=["nvme"],
-)
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644 (file)
index 0000000..7e0c7e8
--- /dev/null
@@ -0,0 +1,24 @@
+[build-system]
+requires = ["mesonpep517", "wheel", "meson", "ninja"] # PEP 508 specifications.
+build-backend = "mesonpep517.buildapi"
+
+[tool.mesonpep517.metadata]
+author="Hannes Reinecke"
+author-email="hare@suse.de"
+classifiers = [
+    "Intended Audience :: Developers",
+    "Development Status :: 5 - Production/Stable",
+    "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
+    "Programming Language :: Python :: 3",
+    "Programming Language :: Python :: 3.6",
+    "Programming Language :: Python :: 3.7",
+    "Programming Language :: Python :: 3.8",
+    "Programming Language :: Python :: 3.9",
+    "Topic :: Software Development :: Libraries :: Python Modules",
+]
+description-file="README.md"
+home-page = "https://github.com/linux-nvme/libnvme"
+license="LGPL-2.1-or-later"
+requires-python=">=3.6"
+summary="python bindings for libnvme"
+