From d8a6b84c8d95f1cc96bcc2342438d882f237c0c7 Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Sun, 27 Feb 2022 21:36:04 +0200 Subject: [PATCH] pyproject.toml instead of setup.py for new packaging This allows to build with meson and package for Pypi Build like this: python -m build Signed-off-by: Boris Glimcher --- libnvme/setup.py | 18 ------------------ pyproject.toml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 18 deletions(-) delete mode 100644 libnvme/setup.py create mode 100644 pyproject.toml diff --git a/libnvme/setup.py b/libnvme/setup.py deleted file mode 100644 index b7994ea2..00000000 --- a/libnvme/setup.py +++ /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 index 00000000..7e0c7e88 --- /dev/null +++ b/pyproject.toml @@ -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" + -- 2.50.1