Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to distribution lit tool as a wheel (/'bdist') on Pypi #63369

Closed
EFord36 opened this issue Jun 17, 2023 · 0 comments · Fixed by #88072
Closed

Request to distribution lit tool as a wheel (/'bdist') on Pypi #63369

EFord36 opened this issue Jun 17, 2023 · 0 comments · Fixed by #88072

Comments

@EFord36
Copy link

EFord36 commented Jun 17, 2023

Hi,

At the moment, lit is available on Pypi as a 'source distribution'/'sdist' i.e. a tarball source (here), but not as a 'built distribution'/'bdist' (normally a 'wheel').

It is recommended to upload built versions as well, e.g. from the python packaging tutorial:

You should always upload a source distribution and provide built distributions for the platforms your project is compatible with.

This is potentially as simple as changing this line

from:

python3 setup.py sdist

to:

python3 setup.py sdist bdist_wheel

(although I don't know lit well so it could be more complicated if the codebase is much more complex than just pure python).

This is particularly a problem in my case, using a http proxy in a corporate environment. In this case, I actually have to 'build' the wheel myself on my laptop and copy it over into the relevant environment, and specify a dependency on that built wheel. So the lack of a wheel causes considerable pain for me here.

Full details of http proxy issues with pip installs of sdist-only packages

Pip will 'build' dependencies like lit that only provide an 'sdist' in an 'isolated environment' now, which means downloading and installing their declared build dependencies (setuptools in lit's case). Unfortunately, that 'isolated environment' does not include http proxies: see this issue for pip pypa/pip#6018. This means that setuptools cannot be downloaded, so the whole install fails.

Some more benefits of uploading wheels, from https://pythonwheels.com:

Advantages of wheels
Faster installation for pure Python and native C extension packages.
Avoids arbitrary code execution for installation. (Avoids setup.py)
Installation of a C extension does not require a compiler on Linux, Windows or macOS.
Allows better caching for testing and continuous integration.
Creates .pyc files as part of installation to ensure they match the Python interpreter used.
More consistent installs across platforms and machines.

seldridge added a commit to seldridge/llvm-project that referenced this issue Apr 8, 2024
Add wheel publishing in addition to existing source distribution
publishing of lit.

Fixes llvm#63369.

Signed-off-by: Schuyler Eldridge <[email protected]>
seldridge added a commit that referenced this issue Apr 9, 2024
Add wheel publishing in addition to existing source distribution
publishing of lit.

Fixes #63369. This also uses the exact fix proposed by @EFord36 in
#63369.

Signed-off-by: Schuyler Eldridge <[email protected]>
llvmbot pushed a commit to llvmbot/llvm-project that referenced this issue Apr 9, 2024
Add wheel publishing in addition to existing source distribution
publishing of lit.

Fixes llvm#63369. This also uses the exact fix proposed by @EFord36 in
llvm#63369.

Signed-off-by: Schuyler Eldridge <[email protected]>
(cherry picked from commit 8a8ab8f)
tstellar pushed a commit to llvmbot/llvm-project that referenced this issue Apr 10, 2024
Add wheel publishing in addition to existing source distribution
publishing of lit.

Fixes llvm#63369. This also uses the exact fix proposed by @EFord36 in
llvm#63369.

Signed-off-by: Schuyler Eldridge <[email protected]>
(cherry picked from commit 8a8ab8f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants