maintainer-feedback requested: [Bug 219641] devel/py-qt5-core: does not install using python3.5

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon May 29 17:27:52 UTC 2017


gdinolt at pacbell.net has reassigned Bugzilla Automation <bugzilla at FreeBSD.org>'s
request for maintainer-feedback to kde at FreeBSD.org:
Bug 219641: devel/py-qt5-core: does not install using python3.5
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219641



--- Description ---
devel/py-qt5-core builds as expected with python3.5 but does not install
because the work/.PLIST.mktmp file refers to files that don't exist in the
stage directory. 

By default, when python3.5 compiles, for example, file Qt5.py for installation,
it generates 

lib/python3.5/site-packages/PyQt5/__pycache__/Qt5.cpython-35.opt-1.pyc	     
lib/python3.5/site-packages/PyQt5/__pycache__/Qt5.cpython-35.pyc 

in the stage directory.

When the 'add-plist-python' target from /usr/ports/Mk/Uses/python.mk is called
to modify pkg-plist it generates the wrong output:

lib/python3.5/site-packages/PyQt5/__pycache__/Qt.cpython-35.pyc
lib/python3.5/site-packages/PyQt5/__pycache__/Qt.opt-1.cpython-35.pyc

Note that '.opt-1.' appears before cpython-35.pyc rather than as shown above.

A fix is to modify the 'add-plist-python' target in python.mk.

I updated the target to:

add-plist-python:
	@${AWK} '\
		/\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0,
/\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] =
1}; od = match($$0, /opt-1/);\
		if ( od != 0 ) sub(/\.opt-1\./, "." mt "&"); else \
		sub(/\.pyc$$/,	"." mt "&");  sub(/[^\/]+\.py[co]$$/, pc "/&");
print; next} \
		/^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/"
pc}; print $$0; next} \
		/^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0
"/" pc}; print $$0; next} \
		{print} \
		' \
		pc="__pycache__" mt="$$(${PYMAGICTAG})"
pyo="${PYTHON_PYOEXTENSION}" \
		${TMPPLIST} > ${TMPPLIST}.pyc_tmp
	@${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST}

I have not tested with other versions of python.


More information about the kde-freebsd mailing list