From a96a9aec2e028b58e6f8d0f8943d5b0287413694 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Thu, 18 Jul 2024 22:02:28 +0800 Subject: [PATCH] Use pyproject. --- pyproject.toml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 38 ---------------------------------- 2 files changed, 55 insertions(+), 38 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9ad1e57 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,55 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "py-ubjson" +dynamic = ["version"] +description="Universal Binary JSON encoder/decoder." +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "Iotic Labs Ltd", email = "info@iotic-labs.com" } +] +maintainers = [ + { name = "Iotic Labs Ltd", email = "vilnis.termanis@iotic-labs.com" } +] +license = { text = "Apache-2.0" } +keywords = ["ubjson", "ubj"] +classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: Apache Software License', + 'Intended Audience :: Developers', + 'Programming Language :: C', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.2', + 'Programming Language :: Python :: 3.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', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Libraries :: Python Modules' +] + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["."] +# Used in combination of the MANIFEST.in to exclude these two directories from the binary +# wheel. +exclude = ["src", "test"] + +[tool.setuptools.dynamic] +version = { attr = "ubjson.__version__" } + +[project.urls] +repository = "https://github.com/Iotic-Labs/py-ubjson" + +[project.optional-dependencies] +dev = ["Pympler>=0.7,<0.8", "coverage>=4.5.3,<4.6"] \ No newline at end of file diff --git a/setup.py b/setup.py index 491426b..bd1f1b5 100644 --- a/setup.py +++ b/setup.py @@ -33,8 +33,6 @@ from distutils.errors import CCompilerError from distutils.errors import DistutilsPlatformError, DistutilsExecError -from ubjson import __version__ as version - def load_description(filename): script_dir = os.path.abspath(os.path.dirname(__file__)) @@ -72,24 +70,6 @@ def build_extension(self, ext): # '-pedantic'] setup( - name='py-ubjson', - version=version, - description='Universal Binary JSON encoder/decoder', - long_description=load_description('README.md'), - long_description_content_type='text/markdown', - author='Iotic Labs Ltd', - author_email='info@iotic-labs.com', - maintainer='Iotic Labs Ltd', - maintainer_email='vilnis.termanis@iotic-labs.com', - url='https://github.com/Iotic-Labs/py-ubjson', - license='Apache License 2.0', - packages=['ubjson'], - extras_require={ - 'dev': [ - 'Pympler>=0.7 ,<0.8', - 'coverage>=4.5.3,<4.6' - ] - }, zip_safe=False, ext_modules=([Extension( '_ubjson', @@ -98,22 +78,4 @@ def build_extension(self, ext): # undef_macros=['NDEBUG'] )] if BUILD_EXTENSIONS else []), cmdclass={"build_ext": BuildExtWarnOnFail}, - keywords=['ubjson', 'ubj'], - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'License :: OSI Approved :: Apache Software License', - 'Intended Audience :: Developers', - 'Programming Language :: C', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.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', - 'Topic :: Software Development :: Libraries', - 'Topic :: Software Development :: Libraries :: Python Modules' - ] )