forked from huggingface/doc-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (56 loc) · 2.77 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Doc-builder package setup.
# The line above is checked by some of the utilities in this repo, do not change it.
from setuptools import find_packages, setup
install_requires = ["black", "GitPython", "tqdm", "pyyaml", "packaging", "nbformat", "huggingface_hub", "pillow"]
extras = {}
extras["transformers"] = ["transformers[dev]"]
extras["testing"] = ["pytest", "pytest-xdist", "torch", "transformers", "tokenizers", "timm", "google-api-python-client", "requests"]
extras["quality"] = ["black~=22.0", "isort>=5.5.4", "flake8>=3.8.3"]
extras["all"] = extras["testing"] + extras["quality"]
extras["dev"] = extras["all"]
# Should only be utilized by core-devs for release
extras["release"] = ["twine"]
setup(
name="hf-doc-builder",
version="0.6.0.dev0",
author="Hugging Face, Inc.",
license="Apache",
author_email="docs@huggingface.co",
description="Doc building utility",
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
keywords="doc documentation doc-builder huggingface hugging face",
url="https://github.com/huggingface/doc-builder",
package_dir={"": "src"},
packages=find_packages("src"),
extras_require=extras,
install_requires=install_requires,
entry_points={"console_scripts": ["doc-builder=doc_builder.commands.doc_builder_cli:main"]},
)
# Release checklist
# 1. Checkout the release branch (for a patch the current release branch, for a new minor version, create one):
# git checkout -b vXX.xx-release
# The -b is only necessary for creation (so remove it when doing a patch)
# 2. Change the version in __init__.py and setup.py to the proper value.
# 3. Commit these changes with the message: "Release: v<VERSION>"
# 4. Add a tag in git to mark the release:
# git tag v<VERSION> -m 'Adds tag v<VERSION> for pypi'
# Push the tag and release commit to git: git push --tags origin vXX.xx-release
# 5. Run the following commands in the top-level directory:
# rm -rf dist
# rm -rf build
# python setup.py bdist_wheel
# python setup.py sdist
# 6. Upload the package to the pypi test server first:
# twine upload dist/* -r testpypi
# 7. Check that you can install it in a virtualenv by running:
# pip install hf-doc-builder
# pip uninstall hf-doc-builder
# pip install -i https://testpypi.python.org/pypi hf-doc-builder
# It's recommended to check that there are no issues building the docs,
# so try running a command like `doc-builder`
# 8. Upload the final version to actual pypi:
# twine upload dist/* -r pypi
# 9. Add release notes to the tag in github once everything is looking hunky-dory.
# 10. Go back to the main branch and update the version in __init__.py, setup.py to the new version ".dev" and push to
# main.