diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..9dd202f3 --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +exclude = static,.git,*migrations*,build,.tox,docs +max-line-length = 119 +max-complexity = 7 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..34dc09c7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[project] +name = "Bootstrap-Flask" +description = "Bootstrap 4 & 5 helper for your Flask projects." +readme = "README.md" +license = { text = "MIT" } +authors = [{ name = "Grey Li", email = "withlihui@gmail.com" }] +classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Web Environment', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Framework :: Flask', + 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', + 'Topic :: Software Development :: Libraries :: Python Modules', +] +dependencies = ["Flask", "WTForms"] +version = "2.3.3" + +[project.urls] +Documentation = "https://bootstrap-flask.readthedocs.io/en/stable/" +Changes = "https://bootstrap-flask.readthedocs.io/en/stable/changelog/" +"Source Code" = "https://github.com/helloflask/bootstrap-flask/" +"Issue Tracker" = "https://github.com/helloflask/bootstrap-flask/issues/" +Funding = "https://opencollective.com/bootstrap-flask" +Discussions = "https://github.com/helloflask/bootstrap-flask/discussions/" + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pytest.ini_options] +testpaths = ["tests"] + +[tool.coverage.run] +source = ["flask_bootstrap"] + +[tool.coverage.report] +exclude_lines = ["pragma: no cover", " except ImportError:"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5d578c2c..00000000 --- a/setup.cfg +++ /dev/null @@ -1,24 +0,0 @@ -[metadata] -license_file = LICENSE - -[bdist_wheel] -universal = 1 - -[coverage:run] -source = flask_bootstrap - -[coverage:report] -exclude_lines = - pragma: no cover - except ImportError: - -[flake8] -exclude = static,.git,*migrations*,build,.tox,docs -max-line-length = 119 -max-complexity = 7 - -[aliases] -test = pytest - -[tool:pytest] -testpaths = tests diff --git a/setup.py b/setup.py deleted file mode 100644 index e92b364a..00000000 --- a/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -""" -Bootstrap-Flask ---------------- - -Bootstrap-Flask is a collection of Jinja macros for Bootstrap 4 & 5 and Flask. -It helps you to render Flask-related objects and data to Bootstrap HTML more easily. - -If you come from Flask-Bootstrap, check out -[this tutorial](https://bootstrap-flask.readthedocs.io/en/stable/migrate/) -on how to migrate to this extension. - -Go to [GitHub page](https://github.com/helloflask/bootstrap-flask), which you -can check for more details. -""" -from setuptools import setup - -setup( - name='Bootstrap-Flask', - version='2.3.3', - url='https://github.com/helloflask/bootstrap-flask', - project_urls={ - 'Documentation': 'https://bootstrap-flask.readthedocs.io/en/stable/', - 'Funding': 'https://opencollective.com/bootstrap-flask', - 'Changes': 'https://bootstrap-flask.readthedocs.io/en/stable/changelog/', - 'Source Code': 'https://github.com/helloflask/bootstrap-flask/', - 'Issue Tracker': 'https://github.com/helloflask/bootstrap-flask/issues/', - 'Discussions': 'https://github.com/helloflask/bootstrap-flask/discussions/' - }, - license='MIT', - author='Grey Li', - author_email='withlihui@gmail.com', - description='Bootstrap 4 & 5 helper for your Flask projects.', - long_description=__doc__, - long_description_content_type='text/markdown', - platforms='any', - packages=['flask_bootstrap'], - zip_safe=False, - include_package_data=True, - test_suite='tests', - install_requires=[ - 'Flask', - 'WTForms' - ], - keywords='flask extension development', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Web Environment', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Framework :: Flask', - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Software Development :: Libraries :: Python Modules' - ] -)