From e9adaccf367aac2dea6ddd5ccb3cf63edf03c355 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 13 Jan 2025 11:57:15 -0600 Subject: [PATCH 1/4] INTPYTHON-380 Switch to hatchling backend --- MANIFEST.in | 7 ------- pyproject.toml | 46 +++++++++++++++++++++++++++++++++++++++++++++ setup.py | 51 -------------------------------------------------- 3 files changed, 46 insertions(+), 58 deletions(-) delete mode 100644 MANIFEST.in 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/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..3332bb0 --- /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 = "BSD" +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/__init__.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"]}, -) From 8afaa72b6e3aaceae1dd265bda5a257654f598f2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 13 Jan 2025 12:33:08 -0600 Subject: [PATCH 2/4] fix version handling --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3332bb0..74e4f36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ Download = "https://github.com/mongodb-labs/flask-pymongo/tags" Homepage = "http://flask-pymongo.readthedocs.org/" [tool.hatch.version] -path = "flask_pymongo/__init__.py" +path = "flask_pymongo/_version.py" [tool.hatch.build.targets.sdist] include = [ From 012904a4274ffc4d2400495b286414f5e56e8a64 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 13 Jan 2025 12:35:54 -0600 Subject: [PATCH 3/4] add version file --- flask_pymongo/_version.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 flask_pymongo/_version.py 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' From 98634d63c9ebf215d9c47fc2c6dabb3913f0e621 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 13 Jan 2025 12:37:08 -0600 Subject: [PATCH 4/4] fix license handling --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 74e4f36..69df3fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "Flask-PyMongo" dynamic = ["version"] description = "PyMongo support for Flask applications" readme = "README.md" -license = "BSD" +license = { file="LICENSE" } requires-python = ">=3.9" authors = [ { name = "Dan Crosta", email = "dcrosta@late.am" },