-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Python packages installing absolute paths to $out/lib/python-xxx/site-packages #23438
Comments
Don't know why so much noise, however let me know: 1) if it's really fixed and 2) if you prefer not to use realpath |
Let me guess, they determine whether we're installing in a "virtualenv" and want to keep the That seems to be the case in Cloud Init https://git.launchpad.net/cloud-init/tree/setup.py?id=0.7.9#n97 |
Would it be "bad" if we fix |
@FRidh I don't think this only happens with virtualenv. Look at the setup.py of the pkg I linked (capstone) for example |
@FRidh I'm not even sure if there is a way to write packages such that they behave the same under wheel and non-wheel method, without explicitly checking if building a wheel. |
I don't seem to understand the issue here. If there are differences between wheel and non-wheel, then that is something for |
@FRdih yes I agree with that. Notifying upstream about the issue is a valid solution here, but as it stands, such packages are often subtly broken. Should we distribute broken packages in nixpkgs? |
I pinged the maintainers of the packages to give you a chance to check if this impacts your package and then take appropriate actions. I'm not using all of these packages, but in my experience, this particular issue often leads to strange problems that packages cannot find their data files later. So feel free to ignore this if everything is fine. |
Great. For Short-circuited the simplest-to-kill part of all that. Thanks for noticing. |
Any news on this issue? |
@mmahut this is still an issue, I updated the first post with the current list of affected packages |
This is actually a duplicate of #4968. |
Actually, let's use this one instead as it is more up to date. |
Huh, I could've swore we fixed this for ulauncher. I'll look into it. |
It's on my radar. I'll look into it over the weekend. |
Adding two more packages 😕 |
They lead to collisions. Probably there should be some cleanup for these kind of files? cc @FRidh
Posting the upstream issue here as well to make it easier to find: pypa/setuptools#130 |
It's quite easy to accidentally package something missing its runtime dependencies due to its |
I marked this as stale due to inactivity. → More info |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/errno-13-when-trying-to-build-a-python-application/10741/8 |
I marked this as stale due to inactivity. → More info |
still bad |
I marked this as stale due to inactivity. → More info |
still bad |
Yes, it's still an upstream issue. There is no spec for dealing with these files when using wheels. |
Adding two more
|
3 more packages that seem to have the same issue:
Background: As an not so convenient work around, I am able to run the python containing the right environment from:
Which leads to success:
|
I believe that the issue I'm seeing is different than this issue, although all of the other documentation led me to believe otherwise. I determine that the above work when I remove the explicit installation of python3. So, all three of the packages appear fine. |
There's some python packages in nixpkgs that fail due to the use of the
wheel
python build system. Here's one case that I manually fixed: capstone-engine/capstone#783.The reason for this seems to be that with wheels, paths in in
data_files
in thesetup.py
are always interpreted relative to theSITE_PACKAGES
directory, even if they start with a/
. Some packages, however, try to manually construct an absolute path, which is how we end up with double absolute paths.Here's a list of affected packages (
nix-locate 'site-packages/nix/store'
):yc9vgl2bjvd42qlxpydwwk56819qjk59-electrum-dash-2.4.1/lib/python2.7/site-packages/nix
/cc @npkslpi5ih76qqy6ciiam5r1aa4xjgnml4-getmail-4.53.0/lib/python2.7/site-packages/nix
/cc @domenkozar @7c6f434cr9myky0b01yjhk6fl1yfxpwcz8i38ila-xpra-0.17.6/lib/python2.7/site-packages/nix
/cc @offlinehackerfr598z84y99c0rfxvlakj50rldvjmxqc-python3.5-qnotero-1.0.0/lib/python3.5/site-packages/nix
/cc @nico202idyrkzskcm0wsrr54q51c05r0dk5wkbl-cloud-init-0.7.9/lib/python2.7/site-packages/nix
/cc @madjarkmgrq1a2rhdd0mww18mhqlrfaz72xqni-rubber-1.4/lib/python2.7/site-packages/nix
/cc @ttuegel @peterhoegbpr1321mk0v53k06fj8cby4pzmqlky6n-knockknock-rbf14bbff/lib/python2.7/site-packages/nix
@copumpkinv8r2cw2jp19v3gl9lxk3q6i3h7f8i86q-pithos-1.1.2/lib/python3.5/site-packages/nix
/cc @obadz @jgeerdsrvhnn46nxf6v57ins74qfvvnddpxv4wr-ulauncher-4.4.0.r1/lib/python2.7/site-packages/nix
@aaronjanse @worldofpeacezm1fflgbmw3d6g7xr4i3ab8xgvm93qmb-setools-2017-11-10/lib/python3.7/site-packages/nix
(no maintainer listed)4f0qs8089zc3wnx1nd58w4lrd74d5pba-pypolicyd-spf-2.0.2/lib/python3.7/site-packages/nix
@abbradarqv7ixwb3slpcba2lc9fbvnkw77lg6ffy-nicotine-plus-1.4.1/lib/python2.7/site-packages/nix
@klntskyla2nk7cjmkmrz3q4h67flb8089jd2ns1-nagstamon-3.2.1/lib/python3.7/site-packages/nix
@pSubiizf6hlz6r1sxbsc980xw9y39sif5vwa-gshogi-0.5.1/lib/python3.7/site-packages/nix
@ciil6a8vpv1g9xmxch20wqq56chhlgy0v84v-electrum-ltc-3.1.3.1/lib/python3.7/site-packages/nix
@asymmetricI haven't checked it this is a problem for the function of the packages (it could still be harmless). Perhaps we should fix these before the release, like #23253? (/cc @globin)
The text was updated successfully, but these errors were encountered: