Feature: Install klayout/pya python module as a system-level python module
Description:
Currently, the python module(s) are not installed at a system level, which causes issues in the case where one runs scripts that depend on being launched outside of klayout.
Additional info:
- package version(s): 0.30.4-1
- config and/or log files:
- link to upstream bug report, if any:
Steps to reproduce:
- Launch
python
-
import klayout
-->ModuleNotFoundError: No module named 'klayout'
-
import pya
-->ModuleNotFoundError: No module named 'pya'
Proposal
In klayout-qt6
(which I will remove, due to being redundant now) I did the following:
package_python-klayout-qt6() {
depends=("${pkgbase}=${pkgver}")
local site="$(python -c 'import site; print(site.getsitepackages()[0])')"
install -d "${pkgdir}${site}"
# Symlink from the base package to site installation
for lib in klayout pya; do
ln -s "/usr/lib/pymod/${lib}" "${pkgdir}${site}/${lib}"
done
Thanks in advance!