-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add target scripts flag #10472
base: main
Are you sure you want to change the base?
Add target scripts flag #10472
Conversation
I really don't see the point of this change. In general, the scripts won't work, because the installed libraries won't be in the Python interpreter's In addition, the change would need tests. We'd need to test that the target script directory is respected for both script files (specified using the setuptools |
Well I didn't create the original issue, so there's definitely more people interested in this. The objective of this ticket was to be able to create a "Python directory" structure from the --target flag. For instance:
Which is prevented by the current --target mechanism as it places everything in the equivalent to "lib/pythonX.Y/site-packages" directory. Basically the package itself would be siblings to bin, include and share (and whatever other data directory). I agree, however, that for most cases it would be easy to find other ways to achieve their objective. Even in our case, there's a workaround (using 'cp ...' or 'mv ...' in our installation scripts; not very elegant, but does the job). For some people, the changes in 4152 to install all data directories (including bin as a data directory) were more than enough, handling further details or inconveniences by themselves (setting PATH, copy/move of scripts, etc.). We can live with Pip being locally patched as part of our framework installation, so if this is rejected, we would just have to fallback to that or wait for more flexibility from Pip in a different way (--prefix + purelib/platlib relative/absolute location, etc.) if it ever happens. I understand you require tests for this, I of course performed manual tests in my environment, but nothing using setuptools and/or script wrappers, just called pip directly:
I also performed tests using absolute paths (in this case instead of test and bin, I used '~/tmp/test' and '~/tmp/bin'. If you don't feel comfortable with the change, simply reject it, I only thought we could help the community with the change. If it was just for us, we would have patched it away as we have done with several third party technologies that don't completely fit our needs or are bugged in some way. Thanks for your time anyway. |
Brief Explanation Argumentation Testing |
This pull request is to add --target-scripts flag similar to the requested in #3934. It allows to install the scripts of a package in a different location than the libraries, if desired. If the flag is not passed, the old behavior is maintained. This flag can only be called if the --target flag is present.