[pacman-dev] Fix/enforce PATH with makepkg (required for Python packages)

Daniel Hahler genml+pacman-dev at thequod.de
Wed Jan 20 17:56:07 UTC 2016


On 19.01.2016 22:48, Allan McRae wrote:
> On 20/01/16 07:01, Daniel Hahler wrote:
>> Usually Python packages use `python` in their PKGBUILD, which results in any
>> activated virtualenv to be used, e.g. from `pep257`:
>>
>> ```
>> package() {
>>   cd "${srcdir}/${pkgname}-${pkgver}"
>>   python setup.py install --root="${pkgdir}" --optimize=1
>>
>>   install -m 755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
>>   install -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE-MIT
>> }
>> ```
>>
>> Activating a virtualenv will add the "python" binary in front of $PATH.
>>
>> I've reported this initially for pacaur at https://github.com/rmarquis/pacaur/issues/400, but it's a problem with makepkg after all.
>>
> 
> makepkg is working as specified.

Does this mean that pacaur (and other consumers) should handle fixing the PATH themselves?

(In the case of pacaur, a package is meant to be installed system-wide and therefore the system's "python" should be used also.)

>> I am using this workaround in /etc/xdg/pacaur/config currently:
>> PATH=/usr/bin:$PATH


Cheers,
Daniel.


More information about the pacman-dev mailing list