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

Daniel Hahler genml+pacman-dev at thequod.de
Tue Jan 19 21:01:24 UTC 2016


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.

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