Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
4c295a26
Unverified
Commit
4c295a26
authored
Mar 29, 2023
by
Sylvain Gugger
Committed by
GitHub
Mar 29, 2023
Browse files
Update release instructions (#22454)
parent
97440e9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
setup.py
setup.py
+8
-2
No files found.
setup.py
View file @
4c295a26
...
@@ -38,6 +38,10 @@ To create the package for pypi.
...
@@ -38,6 +38,10 @@ To create the package for pypi.
7. Build both the sources and the wheel. Do not change anything in setup.py between
7. Build both the sources and the wheel. Do not change anything in setup.py between
creating the wheel and the source distribution (obviously).
creating the wheel and the source distribution (obviously).
Clean up your build and dist folders (to avoid re-uploading oldies):
rm -rf dist
rm -rf build
For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
For the wheel, run: "python setup.py bdist_wheel" in the top level directory.
(this will build a wheel for the python version you use to build it).
(this will build a wheel for the python version you use to build it).
...
@@ -46,10 +50,10 @@ To create the package for pypi.
...
@@ -46,10 +50,10 @@ To create the package for pypi.
8. Check that everything looks correct by uploading the package to the pypi test server:
8. Check that everything looks correct by uploading the package to the pypi test server:
twine upload dist/* -r
pypi
test
twine upload dist/* -r test
pypi
(pypi suggest using twine as other methods upload files via plaintext.)
(pypi suggest using twine as other methods upload files via plaintext.)
You may have to specify the repository url, use the following command then:
You may have to specify the repository url, use the following command then:
twine upload dist/* -r
pypi
test --repository-url=https://test.pypi.org/legacy/
twine upload dist/* -r test
pypi
--repository-url=https://test.pypi.org/legacy/
Check that you can install it in a virtualenv by running:
Check that you can install it in a virtualenv by running:
pip install -i https://testpypi.python.org/pypi transformers
pip install -i https://testpypi.python.org/pypi transformers
...
@@ -58,6 +62,8 @@ To create the package for pypi.
...
@@ -58,6 +62,8 @@ To create the package for pypi.
python -c "from transformers import pipeline; classifier = pipeline('text-classification'); print(classifier('What a nice release'))"
python -c "from transformers import pipeline; classifier = pipeline('text-classification'); print(classifier('What a nice release'))"
python -c "from transformers import *"
python -c "from transformers import *"
If making a patch release, double check the bug you are patching is indeed resolved.
9. Upload the final version to actual pypi:
9. Upload the final version to actual pypi:
twine upload dist/* -r pypi
twine upload dist/* -r pypi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment