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
renzhc
diffusers_dcu
Commits
470d51c8
"vscode:/vscode.git/clone" did not exist on "61dec53356949ce6cd4e5bfbf64abf6ee7b5d5d9"
Unverified
Commit
470d51c8
authored
Aug 25, 2023
by
Sayak Paul
Committed by
GitHub
Aug 25, 2023
Browse files
improve setup.py (#4748)
parent
d6141205
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
setup.py
setup.py
+15
-4
No files found.
setup.py
View file @
470d51c8
...
...
@@ -44,6 +44,11 @@ To create the package for pypi.
For the sources, run: "python setup.py sdist"
You should now have a /dist directory with both .whl and .tar.gz source versions.
Long story cut short, you need to run both before you can upload the distribution to the
test pypi and the actual pypi servers:
python setup.py bdist_wheel && python setup.py sdist
8. Check that everything looks correct by uploading the package to the pypi test server:
twine upload dist/* -r pypitest
...
...
@@ -54,14 +59,20 @@ To create the package for pypi.
Check that you can install it in a virtualenv by running:
pip install -i https://testpypi.python.org/pypi diffusers
If you are testing from a Colab Notebook, for instance, then do:
pip install diffusers && pip uninstall diffusers
pip install -i https://testpypi.python.org/pypi diffusers
Check you can run the following commands:
python -c "from diffusers import pipeline; classifier = pipeline('text-classification'); print(classifier('What a nice release'))"
python -c "python -c "from diffusers import __version__; print(__version__)"
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('fusing/unet-ldm-dummy-update'); pipe()"
python -c "from diffusers import DiffusionPipeline; pipe = DiffusionPipeline.from_pretrained('hf-internal-testing/tiny-stable-diffusion-pipe', safety_checker=None); pipe('ah suh du')"
python -c "from diffusers import *"
9. Upload the final version to actual pypi:
twine upload dist/* -r pypi
10.
Copy
the release notes
from RELEASE.md to the tag i
n github once everything is looking hunky-dory.
10.
Prepare
the release notes
and publish them o
n github once everything is looking hunky-dory.
11. Run `make post-release` (or, for a patch release, `make post-patch`). If you were on a branch for the release,
you need to go back to main before executing this.
...
...
@@ -234,10 +245,10 @@ install_requires = [
setup
(
name
=
"diffusers"
,
version
=
"0.21.0.dev0"
,
# expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
description
=
"
Diffusers
"
,
description
=
"
State-of-the-art diffusion in PyTorch and JAX.
"
,
long_description
=
open
(
"README.md"
,
"r"
,
encoding
=
"utf-8"
).
read
(),
long_description_content_type
=
"text/markdown"
,
keywords
=
"deep learning"
,
keywords
=
"deep learning
diffusion jax pytorch stable diffusion audioldm
"
,
license
=
"Apache"
,
author
=
"The HuggingFace team"
,
author_email
=
"patrick@huggingface.co"
,
...
...
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