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

Question: why not using setuptools/setup.py? #2

Closed
LewisGaul opened this issue Jul 12, 2021 · 2 comments
Closed

Question: why not using setuptools/setup.py? #2

LewisGaul opened this issue Jul 12, 2021 · 2 comments
Labels
question Further information is requested

Comments

@LewisGaul
Copy link

Feel free to ignore if unhelpful, but I was wondering why a custom make_wheels.py script is being used rather than a standard setup.py script (or perhaps setup.cfg or pyproject.toml) with setuptools? I imagine there's a good reason that I'm not seeing :)

Perhaps worth pointing out that https://github.com/pypa/wheel#wheel states:

It should be noted that wheel is not intended to be used as a library, and as such there is no stable, public API.

The reason I was wondering is I was thinking it might be helpful to give the ziglang package a zig entrypoint, i.e. when installing into a venv with pip install ziglang you would get a venv/bin/zig executable, which would be on PATH when the venv was active. Definitely not necessary for the intended use-case, and not obviously desirable in general, but was just a thought that this could be used as a slight abuse of PyPI/pip just for installing zig!

@whitequark whitequark added the question Further information is requested label Jul 13, 2021
@whitequark
Copy link
Collaborator

whitequark commented Jul 13, 2021

Feel free to ignore if unhelpful, but I was wondering why a custom make_wheels.py script is being used rather than a standard setup.py script (or perhaps setup.cfg or pyproject.toml) with setuptools?

That's what I started with, but it turned out to require more effort to develop (you have to unpack the upstream distribution to the filesystem and appropriately clean up afterwards, for one).

Also, you don't get reproducible wheels that way.

It should be noted that wheel is not intended to be used as a library, and as such there is no stable, public API.

(I also patch internal methods of WheelFile, so it's not like we can rely on API stability guarantees.)

The reason I was wondering is I was thinking it might be helpful to give the ziglang package a zig entrypoint

Also something I was thinking about. Consider, however, that it would be unfortunate if the ziglang package, when installed by a dependency of some Python project in your $HOME/.local/bin (perhaps you ran pip install --local), would override your system-wide zig binary.

Of course, the entry point installed by the ziglang PyPI package could be namespaced. But python -m is already a form of namespacing--one that is perfectly in sync with the way you already run Python.

@LewisGaul
Copy link
Author

Makes sense, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants