pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Python packages and PYTHONDONTWRITEBYTECODE
Hello again,
Just for reference, in case anyone else experiences this.
I was wondering why Python modules were failing to install, with errors about missing .pyc files like this:
pkg_create: can't stat `/Users/dev/usr/pkgsrc/textproc/py-libxml2/work/.destdir/Users/dev/pkg/lib/python3.12/site-packages/__pycache__/drv_libxml2.cpython-312.pyc'
But there were no .pyc files in work/.destdir or in PLIST...
It turns out I had PYTHONDONTWRITEBYTECODE=1 in my ~/.profile, because I don't like .pyc files. But pkgsrc expects these files.
So I added this line to usr/pkgsrc/lang/python/extension.mk before do-install:
INSTALL_ENV+= PYTHONDONTWRITEBYTECODE=0
Now I can have PYTHONDONTWRITEBYTECODE=1 in ~/.profile and also keep pkgsrc happy.
Home |
Main Index |
Thread Index |
Old Index