FS#35041 - [abs] prefix for Python packages

Attached to Project: Arch Linux
Opened by Daniel Müllner (muellner) - Tuesday, 30 April 2013, 17:54 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 15 May 2017, 17:18 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To matt mooney (mfm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

abs version: 2.4.4-1

The file /usr/share/pacman/PKGBUILD-python.proto contains a template for a PKGBUILD for Python packages. I propose to replace the line

python setup.py install --root="$pkgdir/" --optimize=1

with

python setup.py install --prefix=/usr --root="$pkgdir/" --optimize=1

Rationale: Users might specify a different installation path in their .pydistutils.cfg file. This makes sense, e.g. to install packages from PyPi or other sources in the user's home directory by default. However, Arch Linux packages should be considered as part of the system and be installed in the standard system path under /usr/lib/pythonXXX. (I myself had several AUR packages installed under /home/USER/.local/lib before I noticed what was going on.)

In addition to changing the "abs" package, also the Wiki page at

https://wiki.archlinux.org/index.php/Python_Package_Guidelines

should reflect the change. I can do this if the proposal is accepted.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 15 May 2017, 17:18 GMT
Reason for closing:  None
Additional comments about closing:  Removed from repos
Comment by Samantha McVey (samcv) - Thursday, 09 June 2016, 07:32 GMT
I can confirm the the file /usr/share/pacman/PKGBUILD-python.proto still has "python setup.py install --root="$pkgdir/" --optimize=1" in it as the opener wrote in 2013. The wiki also still makes no mention of using --prefix=/usr/ and its possible neccesity if the user has changed the defaults in their user config file. The users request seems reasonable since packages are supposed to be systemwide and not user specific, and will not break any current packages. I think it is reasonable to enable creators of packages to be aware of this when creating packages using the ABS, as they may not know a users settings can cause packages to installed into a non-consistant location.
For future reference, here is the documentation I found on how python2 deals with the the python install command as well as the multiple settings files applicable as well as other ways to set the prefixes.
https://docs.python.org/2/install/
I was only able to find information on the .pydistutils.cfg for python2, it is possible it may not be in future versions past the 2 branch.

Loading...