From 35e4d18d7db00408339824974132fedfd514cae1 Mon Sep 17 00:00:00 2001 From: David Lai Date: Thu, 29 Apr 2021 04:50:52 +0800 Subject: [PATCH] use setup.cfg --- pyproject.toml | 3 +++ setup.cfg | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 55 ++--------------------------------------- 3 files changed, 71 insertions(+), 53 deletions(-) create mode 100644 pyproject.toml create mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..019b0d8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +# Minimum requirements for the build system to execute. +requires = ["setuptools", "wheel"] # PEP 508 specifications. diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..6a4561c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,66 @@ +[metadata] +name = montydb +version = attr: montydb.version.__version__ +description = Monty, Mongo tinified. MongoDB implemented in Python ! +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/davidlatwe/montydb +author = davidlatwe +author_email = davidlatwe@gmail.com +maintainer = davidlatwe +maintainer_email = davidlatwe@gmail.com +license = BSD-3-Clause +license_file = LICENSE +platforms = any +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Intended Audience :: Education + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: PyPy + Topic :: Utilities + Topic :: Database +keywords = monty montydb mongo mongodb pymongo database +project_urls = + Source=https://github.com/davidlatwe/montydb + Tracker=https://github.com/davidlatwe/montydb/issues + +[options] +zip_safe = true +packages = find: +include_package_data = true +python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* +install_requires = +tests_require = + pytest-cov + pymongo + lmdb + +[options.packages.find] +exclude = + tests + +[options.entry_points] + +[options.package_data] + +[options.extras_require] +bson = + pymongo +lmdb = + lmdb + +[sdist] +formats = gztar + +[bdist_wheel] +universal = true diff --git a/setup.py b/setup.py index ea0811f..254a0a8 100644 --- a/setup.py +++ b/setup.py @@ -1,54 +1,3 @@ -import os -import imp -from setuptools import setup, find_packages - -version_file = os.path.abspath("montydb/version.py") -version_mod = imp.load_source("version", version_file) -version = version_mod.version - -with open("README.md", "r") as fh: - long_description = fh.read() - -setup( - name="montydb", - version=version, - packages=find_packages(exclude=("tests", "tests.*")), - - # development metadata - zip_safe=True, - - # metadata for upload to PyPI - author="davidlatwe", - author_email="davidlatwe@gmail.com", - description="MongoDB's unofficial Python implementation.", - long_description=long_description, - long_description_content_type="text/markdown", - keywords=["monty", "montydb", "mongo", "mongodb", "pymongo"], - url="https://github.com/davidlatwe/montydb", - license="BSD-3-Clause", - python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", - classifiers=( - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Database", - ), - install_requires=( - ), - tests_require=( - "pytest-cov", - "pymongo", - "lmdb", - ), -) +from setuptools import setup +setup()