verify installation of a dummy Python package before actually installing a Python package#475
Closed
boegel wants to merge 1 commit intoeasybuilders:developfrom
Closed
verify installation of a dummy Python package before actually installing a Python package#475boegel wants to merge 1 commit intoeasybuilders:developfrom
boegel wants to merge 1 commit intoeasybuilders:developfrom
Conversation
…ing a Python package
Contributor
There was a problem hiding this comment.
patch setuptools? (the one used is one EB installed right?)
Contributor
There was a problem hiding this comment.
also, move in separate method
Contributor
There was a problem hiding this comment.
use filehandle, so you'll open it only once (and close it explicitly)
second, don't read in the whole file, use readline or eg first 4k bytes.
after the read and match if found, don't forget to fh.seek(0) before reading the whole script.
although i'd prefer fileinput thoe all this....
8 tasks
Member
Author
|
No longer relevant, so closing. Let is serve as documentation on how |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After spending about 2h on trying to figure out why a particular
setuptoolsinstallation was blatently ignoring--prefix, I was sufficiently frustrated to come up with this: a verification of whether whicheversetuptoolsis active honors--prefixbefore actually installing a Python package with it.Up until now, I've run into two different ways of making
setuptoolsblatently ignore--prefix:distutils.cfgor$HOME/.pydistutils.cfgconfiguration files which effectively override any specified--prefixcomand line option (cfr. https://docs.python.org/2/install/#distutils-configuration-files)setuptoolsinstallation that was installed with--userinto$HOME/.local, causing it to install everything to$HOME/.localregardless of what--prefixspecifies (yes, you read that right)Since there's little we can do to prevent the use of a (basically broken)
setuptoolsinstallation (there's no way I'm aware of in which we can install our own and be 100% sure it'll be used), we better have a way of verifying whether theactivesetuptools does the right thing.related: easybuilders/easybuild#31, #373 and last nights discussion with @kcgthb on the
#easybuildIRC channel@stdweird, @JensTimmerman: thoughts on this?
cc: @kcgthb, @chwilk, @DimitriSteyaert, @pforai, @ocaisa