You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When wheels are available on PyPI, this typically makes pip install x significantly faster compared when only source distributions (.tar.gz) are available on PyPI. There are also other benefits to wheels compared with from source.
When you today do pip install dash you see output like
Building wheel for dash (setup.py): started
Building wheel for dash (setup.py): finished with status 'done'
...
as well as for dash-renderer, dash-core-components, dash-table, dash-html-components etc.
I could not find where in your CI (/CD) workflow deployments to PyPI are done on git tags/releases. Maybe deployments are currently done manually? If not, I can contribute with PRs in relevant repositories if location in CI/CD is pointed out.
Creating universal wheels, and not only source distribution, is typically as easy as changing from python setup.py sdist to python setup.py sdist bdist_wheel. This should make pip install dash significantly faster.
Reacted by Yuhan GUO, Dominic Davis-Foster and jo47011
Bumping this issue with some additional context/input, as I think this is an easy low hanging fruit to further improve dash user experience 🚀
In order to see how much faster installation is when a wheel is available compared to only sdist/tar.gz, I tested pipinstalling a wheel and sdist build of dash, respectively, using the current dev branch. On my machine I saw a 50% reduction in dash installation time (and I expect ~similar installation time improvements for the dependencies dash-core-components, dash-html-components, dash-table etc.)
Having a wheel available on PyPI also avoids some users getting an error during installation of the form (which pip recovers from by falling back to source installation, but still can confuse users):
pip install dash
...
Building wheels for collected packages: dash
Building wheel for dash (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/[...]/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jifoji898/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-jifoji898/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-89ud89a
cwd: /tmp/pip-req-build-jifoji898/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for dash
Running setup.py clean for dash
Failed to build dash
Installing collected packages: dash
Running setup.py install for dash ... done
Successfully installed dash-1.20.0
...
I don't know your release procedure (manual/automatic), but appending bdist_wheel --universal to the python setup.py sdist command (and potentially a pip install wheel prior to that command on the build computer/node) should be ~enough.
Are the artifacts after commands with sdist in the CI like here
Activity
silverguo commentedon Nov 2, 2020
Definitely looking forward to have the wheels uploaded to pip for
dash.Happy to help if needed.
anders-kiaer commentedon Apr 13, 2021
Bumping this issue with some additional context/input, as I think this is an easy low hanging fruit to further improve
dashuser experience 🚀In order to see how much faster installation is when a
wheelis available compared to onlysdist/tar.gz, I testedpipinstalling awheelandsdistbuild ofdash, respectively, using the currentdevbranch. On my machine I saw a 50% reduction indashinstallation time (and I expect ~similar installation time improvements for the dependenciesdash-core-components,dash-html-components,dash-tableetc.)Having a wheel available on PyPI also avoids some users getting an error during installation of the form (which
piprecovers from by falling back to source installation, but still can confuse users):You also reduce the risk of different installation errors. An example is the one
blackhas experienced lately (blackis one of the few top 360 Python packages not currently having awheel), where one of thepipmaintainers give a general reminder that also Python projects (without e.g. C-code to compile) should havewheelsavailable, which ispip's preferred/default format to download and install: psf/black#1847 (comment).I don't know your release procedure (manual/automatic), but appending
bdist_wheel --universalto thepython setup.py sdistcommand (and potentially apip install wheelprior to that command on the build computer/node) should be ~enough.Are the artifacts after commands with
sdistin the CI like heredash/.circleci/config.yml
Line 124 in 597dc22
Thanks 🙂
anders-kiaer commentedon Mar 3, 2022
Starting with version
2.0, the PyPI release ofdashnow has wheels:https://pypi.org/project/dash/2.0.0/#files
🎉