-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #475 from MongoEngine/setuptools
Added: Complete pyproject.toml configuration; Removed: Static version mentions in source code files
- Loading branch information
Showing
12 changed files
with
108 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ venv/ | |
.vscode | ||
htmlcov/ | ||
coverage.xml | ||
_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ python: | |
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- wtf | ||
- toolbar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,4 @@ | ||
import os | ||
|
||
"""Setup file for backward compatibility with setuptools, not supported PEP 660.""" | ||
from setuptools import setup | ||
|
||
description = ( | ||
"Flask-MongoEngine is a Flask extension " | ||
"that provides integration with MongoEngine and WTF model forms." | ||
) | ||
|
||
# Load index.rst as long_description | ||
doc_path = os.path.join(os.path.dirname(__file__), "docs", "index.rst") | ||
long_description = open(doc_path, encoding="utf-8").read() | ||
long_description_content_type = "text/x-rst" | ||
|
||
# Stops exit traceback on tests | ||
try: | ||
import multiprocessing # noqa | ||
except ImportError: | ||
pass | ||
|
||
|
||
def get_version(version_tuple): | ||
"""Return the version tuple as a string, e.g. for (0, 10, 7), | ||
return '0.10.7'. | ||
""" | ||
return ".".join(map(str, version_tuple)) | ||
|
||
|
||
# Dirty hack to get version number from flask_monogengine/__init__.py - we | ||
# can't import it as it depends on PyMongo and PyMongo isn't installed until | ||
# this file is read | ||
init = os.path.join(os.path.dirname(__file__), "flask_mongoengine", "__init__.py") | ||
version_line = list(filter(lambda l: l.startswith("VERSION"), open(init)))[0] | ||
version = get_version(eval(version_line.split("=")[-1])) | ||
|
||
test_requirements = ["coverage", "pytest", "pytest-cov"] | ||
|
||
setup( | ||
name="flask-mongoengine", | ||
version=version, | ||
url="https://github.com/mongoengine/flask-mongoengine", | ||
license="BSD", | ||
author="Ross Lawley", | ||
author_email="ross.lawley@gmail.com", | ||
zip_safe=False, | ||
platforms="any", | ||
python_requires=">=3.7", | ||
install_requires=[ | ||
"Flask>=1.1.4", | ||
"WTForms[email]>=2.3.1", | ||
"Flask-WTF>=0.14.3", | ||
"mongoengine>=0.21", | ||
"Flask-DebugToolbar>=0.11.0", | ||
], | ||
packages=["flask_mongoengine", "flask_mongoengine.wtf"], | ||
include_package_data=True, | ||
tests_require=test_requirements, | ||
description=description, | ||
long_description=long_description, | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Framework :: Flask", | ||
], | ||
) | ||
setup() |