Skip to content

Commit 813ec5b

Browse files
authored
Add release directions + license to setup.py (#483)
* Add release directions * Add license * Add release deps + change email
1 parent 3543e0a commit 813ec5b

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

setup.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@
1414
extras["all"] = extras["testing"] + extras["quality"]
1515
extras["dev"] = extras["all"]
1616

17+
# Should only be utilized by core-devs for release
18+
extras["release"] = ["twine"]
19+
1720

1821
setup(
1922
name="hf-doc-builder",
2023
version="0.5.0.dev0",
2124
author="Hugging Face, Inc.",
22-
author_email="[email protected]",
25+
license="Apache",
26+
author_email="[email protected]",
2327
description="Doc building utility",
2428
long_description=open("README.md", "r", encoding="utf-8").read(),
2529
long_description_content_type="text/markdown",
@@ -31,3 +35,31 @@
3135
install_requires=install_requires,
3236
entry_points={"console_scripts": ["doc-builder=doc_builder.commands.doc_builder_cli:main"]},
3337
)
38+
39+
# Release checklist
40+
# 1. Checkout the release branch (for a patch the current release branch, for a new minor version, create one):
41+
# git checkout -b vXX.xx-release
42+
# The -b is only necessary for creation (so remove it when doing a patch)
43+
# 2. Change the version in __init__.py and setup.py to the proper value.
44+
# 3. Commit these changes with the message: "Release: v<VERSION>"
45+
# 4. Add a tag in git to mark the release:
46+
# git tag v<VERSION> -m 'Adds tag v<VERSION> for pypi'
47+
# Push the tag and release commit to git: git push --tags origin vXX.xx-release
48+
# 5. Run the following commands in the top-level directory:
49+
# rm -rf dist
50+
# rm -rf build
51+
# python setup.py bdist_wheel
52+
# python setup.py sdist
53+
# 6. Upload the package to the pypi test server first:
54+
# twine upload dist/* -r testpypi
55+
# 7. Check that you can install it in a virtualenv by running:
56+
# pip install hf-doc-builder
57+
# pip uninstall hf-doc-builder
58+
# pip install -i https://testpypi.python.org/pypi hf-doc-builder
59+
# It's recommended to check that there are no issues building the docs,
60+
# so try running a command like `doc-builder`
61+
# 8. Upload the final version to actual pypi:
62+
# twine upload dist/* -r pypi
63+
# 9. Add release notes to the tag in github once everything is looking hunky-dory.
64+
# 10. Go back to the main branch and update the version in __init__.py, setup.py to the new version ".dev" and push to
65+
# main.

0 commit comments

Comments
 (0)