forked from mkdocs/mkdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to pyproject.toml and Hatch build (mkdocs#2988)
- Loading branch information
Showing
8 changed files
with
111 additions
and
118 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 119 | ||
extend-ignore = E203 |
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 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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "mkdocs" | ||
description = "Project documentation with Markdown." | ||
readme = "README.md" | ||
license = "BSD-2-Clause" | ||
authors = [ | ||
{name = "Tom Christie", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"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 :: 3 :: Only", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Documentation", | ||
"Topic :: Text Processing", | ||
] | ||
dynamic = ["version"] | ||
requires-python = ">=3.7" | ||
dependencies = [ | ||
"click >=7.0", | ||
"Jinja2 >=2.11.1", | ||
"Markdown >=3.2.1, <3.4", | ||
"PyYAML >=5.1", | ||
"watchdog >=2.0", | ||
"ghp-import >=1.0", | ||
"pyyaml_env_tag >=0.1", | ||
"importlib_metadata >=4.3; python_version < '3.10'", | ||
"typing_extensions >=3.10; python_version < '3.8'", | ||
"packaging >=20.5", | ||
"mergedeep >=1.3.4", | ||
"colorama >=0.4; platform_system == 'Windows'", | ||
] | ||
[project.optional-dependencies] | ||
i18n = [ | ||
"babel >=2.9.0", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://www.mkdocs.org/" | ||
Source = "https://github.com/mkdocs/mkdocs" | ||
Issues = "https://github.com/mkdocs/mkdocs/issues" | ||
History = "https://www.mkdocs.org/about/release-notes/" | ||
|
||
[project.scripts] | ||
mkdocs = "mkdocs.__main__:cli" | ||
|
||
[project.entry-points."mkdocs.themes"] | ||
mkdocs = "mkdocs.themes.mkdocs" | ||
readthedocs = "mkdocs.themes.readthedocs" | ||
|
||
[project.entry-points."mkdocs.plugins"] | ||
search = "mkdocs.contrib.search:SearchPlugin" | ||
|
||
[tool.hatch.version] | ||
path = "mkdocs/__init__.py" | ||
|
||
[tool.hatch.build] | ||
artifacts = ["/mkdocs/**/*.mo"] | ||
[tool.hatch.build.targets.sdist] | ||
include = ["/mkdocs"] | ||
[tool.hatch.build.targets.wheel] | ||
exclude = ["/mkdocs/tests/integration", "*.po", "*.pot", "babel.cfg"] | ||
|
||
[tool.black] | ||
line-length = 100 | ||
target-version = ["py37"] | ||
skip-string-normalization = true | ||
|
||
[tool.isort] | ||
profile = "black" | ||
line_length = 100 | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
warn_unreachable = true | ||
no_implicit_optional = true | ||
show_error_codes = true |
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,95 +1,13 @@ | ||
#!/usr/bin/env python | ||
"""Installation using setup.py is no longer supported. | ||
Use `python -m pip install .` instead.""" | ||
|
||
from setuptools import setup | ||
import re | ||
import os | ||
import sys | ||
|
||
from setuptools import setup | ||
|
||
with open('README.md') as f: | ||
long_description = f.read() | ||
|
||
|
||
def get_version(package): | ||
"""Return package version as listed in `__version__` in `init.py`.""" | ||
with open(os.path.join(package, '__init__.py')) as f: | ||
init_py = f.read() | ||
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1) | ||
|
||
|
||
def get_packages(package): | ||
"""Return root package and all sub-packages.""" | ||
return [dirpath | ||
for dirpath, dirnames, filenames in os.walk(package) | ||
if os.path.exists(os.path.join(dirpath, '__init__.py'))] | ||
|
||
sys.exit(__doc__) | ||
|
||
# Fake reference so GitHub still considers it a real package for statistics purposes. | ||
setup( | ||
name="mkdocs", | ||
version=get_version("mkdocs"), | ||
url='https://www.mkdocs.org', | ||
project_urls={ | ||
'Source': 'https://github.com/mkdocs/mkdocs', | ||
}, | ||
license='BSD', | ||
description='Project documentation with Markdown.', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
author='Tom Christie', | ||
author_email='[email protected]', # SEE NOTE BELOW (*) | ||
packages=get_packages("mkdocs"), | ||
include_package_data=True, | ||
package_data={'mkdocs': ['py.typed']}, | ||
install_requires=[ | ||
'click>=7.0', | ||
'Jinja2>=2.11.1', | ||
'Markdown>=3.2.1,<3.4', | ||
'PyYAML>=5.1', | ||
'watchdog>=2.0', | ||
'ghp-import>=1.0', | ||
'pyyaml_env_tag>=0.1', | ||
'importlib_metadata>=4.3; python_version < "3.10"', | ||
'typing_extensions>=3.10; python_version < "3.8"', | ||
'packaging>=20.5', | ||
'mergedeep>=1.3.4', | ||
'colorama>=0.4; platform_system == "Windows"', | ||
], | ||
extras_require={"i18n": ['babel>=2.9.0']}, | ||
python_requires='>=3.7', | ||
entry_points={ | ||
'console_scripts': [ | ||
'mkdocs = mkdocs.__main__:cli', | ||
], | ||
'mkdocs.themes': [ | ||
'mkdocs = mkdocs.themes.mkdocs', | ||
'readthedocs = mkdocs.themes.readthedocs', | ||
], | ||
'mkdocs.plugins': [ | ||
'search = mkdocs.contrib.search:SearchPlugin', | ||
], | ||
}, | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Console', | ||
'Environment :: Web Environment', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'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 :: 3.10', | ||
'Programming Language :: Python :: 3 :: Only', | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
'Topic :: Documentation', | ||
'Topic :: Text Processing', | ||
], | ||
zip_safe=False, | ||
) | ||
|
||
# (*) Please direct queries to the discussion group: | ||
# https://groups.google.com/forum/#!forum/mkdocs |
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