Page MenuHomeFreeBSD

Make it possible to install py-qt5 for multiple python versions at the same time
ClosedPublic

Authored by tcberner on Dec 5 2016, 9:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 3:43 AM
Unknown Object (File)
Mon, Nov 18, 3:40 AM
Unknown Object (File)
Fri, Nov 15, 2:12 PM
Unknown Object (File)
Fri, Nov 15, 5:03 AM
Unknown Object (File)
Tue, Nov 12, 3:41 AM
Unknown Object (File)
Mon, Nov 11, 10:54 PM
Unknown Object (File)
Sat, Nov 2, 11:14 PM
Unknown Object (File)
Wed, Oct 23, 2:31 PM

Details

Summary
  • Pass the versioned sip-binary to configure.py
  • Add USE_PYTHON=concurrent to py-qt5-core to install pyuic5 versioned too
  • Make the sip-directory versioned
Test Plan

I only tested devel/py-sip and devel/py-qt5-core with
DEFAULT_VERSIONS+=python=3.5 python3=3.5 in make.conf
and a make PYTHON_VERSION=2.7 so far.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tcberner retitled this revision from to Make it possible to install py-qt5 for multiple python versions at the same time.
tcberner updated this object.
tcberner edited the test plan for this revision. (Show Details)
tcberner added reviewers: kde, rakuco, mat, adridg.
tcberner edited edge metadata.

Add concurrent to py-qt5-core too (I added it to py-qt4-core by mistake...
which also needs it.. so lets call it an opportunity ^^)

Of course every py-qt port also requires a PORTREVISION bump (as SIPDIR changed).

  • Deinstalled py27-qt5*
  • Don't have Python 3.5 installed
  • cd devel/py-qt5
  • make PYTHON_VERSION=3.5
  • builds and installs a bunch of ports, including many py35-qt5-*
  • fails in misc/py-qt5-demo

However, building misc/py-qt5-demo on its own (while setting PYTHON_VERSION) does work.

You're absolutely right. There is other stuff that needs to be versioned too, like QSCIDIR.

In devel/py-qt5:

# make PYTHON_VERSION=3.5

yields tons of error messages in misc/py-qt5-demo like this:

pkg-static: Unable to access file /zbigone/src/ports-playground/misc/py-qt5-demo/work/stage/usr/local/share/examples/py-qt5/xmlpatterns/schema/ui_schema.pyc: No such file or directory

Which is fair, since the file is generated like this:

/zbigone/src/ports-playground/misc/py-qt5-demo/work/stage/usr/local/share/examples/py-qt5/xmlpatterns/schema/__pycache__/ui_schema.cpython-35.pyc

So there's more pkg-plist munging to be done, since the do-install step (which uses compileall.py) isn't producing what the plist expects.

In D8714#184358, @groot_kde.org wrote:

Which is fair, since the file is generated like this:

/zbigone/src/ports-playground/misc/py-qt5-demo/work/stage/usr/local/share/examples/py-qt5/xmlpatterns/schema/__pycache__/ui_schema.cpython-35.pyc

So there's more pkg-plist munging to be done, since the do-install step (which uses compileall.py) isn't producing what the plist expects.

FYI, USES=python already has support for that: USE_PYTHON=py3kplist.

Hope this helps.

tcberner edited edge metadata.

Add a versioned PLIST_SUB for the api-files installed by the ports.

Instead of installing them to share/qt[45]/qsci/api put them into share/qt[45]/qsci-${PYTHON_VER}/api
(maybe a path structured similarly to PYQT_SIPDIR would be nicer: share/py-qsci-${PYTHON_VER}/PyQt[45]).

I still need to think how to handle for example devel/py-qt5-designerplugin, which installs a shared library, independent of the python version.

Also, maybe there is a better way for all of this...

tcberner edited edge metadata.

Now it should be coinstallable: install everything with default (python27), set PYTHON_VERSION to 3.5 and install the other ports seems to work as expected.

  • The shared libraries in lang/py-qt5-qml and devel/py-qt[45]-designerplugin have been renamed to carry the python version in them... -- I thought about only adding these ports if the PYTHON_VERSION is the DEFAULT_PYTHON_VERSIONS... but that does not seem proper either. Maybe these renames have to be followed up somehwere else, so far I haven't spotted an issue (rebuilt everything needing pyqt).
  • Moved api, doc, sip files around a bit so they are versioned by both the Qt version and the python version used
  • Added SIPDIR to desktuils/calibre's MAKE_ENV.

Will this land any time soon?

Current PyQT glue is outright broken with Python 3.

Isn't this largely obsoleted by flavors now? Or have flavors not reached the PyQt bits, and this stuff needs to be reworked to fit?

Isn't this largely obsoleted by flavors now? Or have flavors not reached the PyQt bits, and this stuff needs to be reworked to fit?

As I know, at least two problems (223409 and 219641) are still relevant.

Update pyqt5 to 5.10.1 and use subdirectories per python version.

To check, it would probably be easier to use poudriere bulk -i and only set BUILD_ALL_PYTHON_FLAVORS in make.conf.

In D8714#339535, @mat wrote:

To check, it would probably be easier to use poudriere bulk -i and only set BUILD_ALL_PYTHON_FLAVORS in make.conf.

Thanks, I'll give it a go

Update diff against current tree.

Add bumps to pyqt dependencies.

Fix patch with respect to use of PYQT_APIDIR.

  • Readd USE_PYTHON flags (I should have checked the output of arc patch ;-) ...)
  • Fix deskutils/calibre
This revision was not accepted when it landed; it landed in state Needs Review.Nov 22 2018, 8:18 PM
This revision was automatically updated to reflect the committed changes.