-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
tools/upip: Skip empty entries when looking for install path. #7536
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7536 +/- ##
==========================================
+ Coverage 98.27% 98.28% +0.01%
==========================================
Files 154 154
Lines 19995 19994 -1
==========================================
+ Hits 19650 19652 +2
+ Misses 345 342 -3
Continue to review full report at Codecov.
|
f330dba
to
233012a
Compare
Oh, I have no problems importing frozen modules in script/repl when there's the "empty" path somewhere in sys.path but perhaps it would be better to have some other value there instead to specify where frozen modules should exist in the import priority order? The workaround of overriding the upip install path in code doesn't help from command line, though I guess there's a command line option to set that too. I was hoping to avoid having to hardcode a target path into upip scripts though. |
Yes, that's definitely needed. See #6419. |
233012a
to
57bd653
Compare
57bd653
to
402b998
Compare
@andrewleech is this still relevant now that we have |
Nope, the ordering of the default paths on UNIX port does pretty much fix this too - though can have a potentially unexpected result if you run upip from source python file - installed modules will be stored next to the upip script rather than any of the hardcoded import paths |
This problem with upip still needs to be fixed, but in a different way. See #8105. I'll close this in favour of that. |
…n-main Translations update from Hosted Weblate
I'm not sure if I'm doing things backwards here, but I've got a local build of the unix port with the sys.path overridden to include relative project folders as such:
Note the setting/string starts with an empty entry
:
I recently started building with a manifest to include frozen modules such as upip, uasyncio etc and found I needed the empty path at the start to ensure that the fronzen modules were used by default.
This empty path however broke upip as it uses the first path entry as the default install target.
This PR addresses this by skipping any empty entries like this.