From 13c453f031d367f0bc86c05b88f413911189cebd Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 13 Jan 2025 13:29:59 -0600 Subject: [PATCH] INTPYTHON-380 Switch to hatchling backend (#171) --- MANIFEST.in | 7 ------ flask_pymongo/_version.py | 2 ++ pyproject.toml | 46 +++++++++++++++++++++++++++++++++++ setup.py | 51 --------------------------------------- 4 files changed, 48 insertions(+), 58 deletions(-) delete mode 100644 MANIFEST.in create mode 100644 flask_pymongo/_version.py create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index ae20c18..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,7 +0,0 @@ -include *.md version.txt -recursive-include examples *.py *.html *.txt -recursive-include docs *.py *.rst *.html *.css_t *.conf Makefile LICENSE README -prune docs/_build -prune dist -prune build -global-exclude *.pyc diff --git a/flask_pymongo/_version.py b/flask_pymongo/_version.py new file mode 100644 index 0000000..5a64317 --- /dev/null +++ b/flask_pymongo/_version.py @@ -0,0 +1,2 @@ + +__version__ = '3.0.0.dev0' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..69df3fb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "Flask-PyMongo" +dynamic = ["version"] +description = "PyMongo support for Flask applications" +readme = "README.md" +license = { file="LICENSE" } +requires-python = ">=3.9" +authors = [ + { name = "Dan Crosta", email = "dcrosta@late.am" }, +] +classifiers = [ + "Environment :: Web Environment", + "Framework :: Flask", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "Flask>=3.0", + "PyMongo>=4.0", +] + +[project.urls] +Download = "https://github.com/mongodb-labs/flask-pymongo/tags" +Homepage = "http://flask-pymongo.readthedocs.org/" + +[tool.hatch.version] +path = "flask_pymongo/_version.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/flask_pymongo", +] diff --git a/setup.py b/setup.py deleted file mode 100644 index 4644b25..0000000 --- a/setup.py +++ /dev/null @@ -1,51 +0,0 @@ -""" -Flask-PyMongo -------------- - -MongoDB support for Flask applications. - -Flask-PyMongo is pip-installable: - - $ pip install Flask-PyMongo - -Documentation for Flask-PyMongo is available on `ReadTheDocs -`_. - -Source code is hosted on `GitHub `_. -Contributions are welcome! -""" - -from setuptools import find_packages, setup - -setup( - name="Flask-PyMongo", - url="http://flask-pymongo.readthedocs.org/", - download_url="https://github.com/dcrosta/flask-pymongo/tags", - license="BSD", - author="Dan Crosta", - author_email="dcrosta@late.am", - description="PyMongo support for Flask applications", - long_description=__doc__, - zip_safe=False, - platforms="any", - packages=find_packages(), - install_requires=[ - "Flask>=3.0", - "PyMongo>=4.0", - ], - classifiers=[ - "Environment :: Web Environment", - "Framework :: Flask", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - setup_requires=["vcversioner"], - vcversioner={"version_module_paths": ["flask_pymongo/_version.py"]}, -)