[Bug 658604] New: Python distutils setup does not allow user installation of Python packages
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c0 Summary: Python distutils setup does not allow user installation of Python packages Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: Other OS/Version: openSUSE 11.3 Status: NEW Severity: Major Priority: P5 - None Component: Other AssignedTo: jmatejek@novell.com ReportedBy: speilicke@novell.com QAContact: qa@suse.de Found By: --- Blocker: --- Currently, /usr/lib64/python/distutils/distutils.cfg has the following line: [install] prefix=/usr/local While the intent to not mess up the system-wide site-packages dir, it effectively disables user-installation of Python packages as one needs root-access to install files there. But it is common to supply the parameter '--user' to either easy_install or pip in order to use the local site-packages ($HOME/.local/lib/python...) instead of the system wide. However, this does not work if a prefix is hard-coded. Only easy_install allows to override by providing a custom '--prefix' option. The following request was one approach (revoked): https://build.opensuse.org/request/diff/54916 On the other hand we could also do this (in distutils.cfg): [install] user=1 Which makes user-installation the default. This could actually work because root would always want to install packages instead of /usr/local junk. Users would also prefer packages but rather have sth. in their $HOME than having to bug root for /usr/local. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c Jan Matejek <jmatejek@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c1 Jan Matejek <jmatejek@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P2 - High --- Comment #1 from Jan Matejek <jmatejek@novell.com> 2010-12-10 14:58:18 UTC --- iiuc, the problem is that even with user=1, prefix still takes precedence and tries to install into /usr/local so either we need to change the default install scheme (not distutils.cfg) to point to /usr/local (and please note that in many configurations, root actually wants to install manually into /usr/local), leaving the "prefix" option untouched. or the precedence must be changed, so that prefix is ignored when user=1 option 2 doesn't seem too smart, so we're left with option 1 that actually does seem doable, because new pythons have pretty smart way of configuring default install locations. i'll look into it for the new python 3.2 package, then we can backport to 2.7 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c2 --- Comment #2 from Jan Matejek <jmatejek@novell.com> 2010-12-10 15:10:50 UTC --- ..of course, if this is important to you, feel free to poke around python 2.7 in the meantime. you can probably achieve this by modifying Lib/sysconfig.py and/or Lib/distutils/command/install.py -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c3 --- Comment #3 from Sascha Peilicke <speilicke@novell.com> 2010-12-10 15:42:13 UTC --- To be honest, I don't like it that much to deviate from Python defaults. Altough it is clear that /usr/lib/python/site-packages is only suitable for packages, I still think the default is not too bad. At least easy_install and pip hinder the user from installing packages that are already in one of his accessible site-dirs. However, the real issue seems to be "python setup.py install". I'll see what I can come up with... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c4 --- Comment #4 from Jan Matejek <jmatejek@novell.com> 2010-12-10 16:12:45 UTC --- yeah, well, i don't like to deviate from defaults either, but the fact is that those defaults are not very good in the first place. i mean, all major distros still need to patch python to learn about /usr/lib64, because upstream still hasn't figured out how to do it on their side. same thing with separating purelib and platlib for noarch-ness. it still messes up quite a number of packages that don't expect that purelib and platlib can be two different places. this /usr/local stuff is minor compared to that, but as long as we're changing the defaults anyway, we can as well do this properly (and exercise the new install path configuration in the process) also, if you aren't watching it already, i can highly recommend python's distutils-sig mailing list. they are doing very neat things with distutils -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c5 Adam Spiers <aspiers@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aspiers@suse.com --- Comment #5 from Adam Spiers <aspiers@suse.com> 2012-01-21 15:01:28 UTC --- Still an issue in 12.1. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c6 --- Comment #6 from Adam Spiers <aspiers@suse.com> 2012-09-21 15:50:41 UTC --- Just got bitten by this again. Jan, are you likely to be able to fix this any time soon? If not please unassign from yourself and maybe Sascha and/or myself can do something about it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c7 Adam Spiers <aspiers@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Major |Critical --- Comment #7 from Adam Spiers <aspiers@suse.com> 2012-09-22 20:56:01 UTC --- Just for the record, an easy workaround is to comment out prefix=/usr/local in /usr/lib64/python/distutils/distutils.cfg -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c8 --- Comment #8 from Jan Matejek <jmatejek@suse.com> 2012-09-26 15:39:39 UTC --- Well as i said before, feel free to try and fix this... I'm attempting to come up with a fix for the new python3 package, and to be honest, it made me reconsider that old decision to use the /usr/local prefix in the first place. I still think it is technically correct, but then again practicality beats purity and right now i'm inclined to fix it by dropping distutils.cfg, as per Sascha's original SR. I'll post on opensuse-packaging about it and if nobody steps up to defend the greatness and coolness of the current approach, i'll do it. (OTOH, interestingly, i never ran into this; i don't really see the value of user install scheme. either you have systemwide packages, or you have virtualenvs. it makes sense on shell accounts where you don't have root, but who does that these days...) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c9 --- Comment #9 from Adam Spiers <aspiers@suse.com> 2012-09-26 15:47:57 UTC --- (In reply to comment #8)
I'll post on opensuse-packaging about it and if nobody steps up to defend the greatness and coolness of the current approach, i'll do it.
That would be great, thanks.
(OTOH, interestingly, i never ran into this; i don't really see the value of user install scheme. either you have systemwide packages, or you have virtualenvs. it makes sense on shell accounts where you don't have root,
Also on multi-user systems where you are trying an unstable package and don't want to break everyone else's account, or on NFS home where you want to install once to instantly have it available across a number of machines ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c10 --- Comment #10 from Jan Matejek <jmatejek@suse.com> 2012-10-09 16:24:14 UTC --- SR 137630 fixes this for python3 still waiting on package rebuild in bleeding_edge_python_Factory before submitting python2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=658604 https://bugzilla.novell.com/show_bug.cgi?id=658604#c11 Jan Matejek <jmatejek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #11 from Jan Matejek <jmatejek@suse.com> 2012-10-16 16:04:55 UTC --- and fix for python2 is now in Factory too -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com