dev-python/pyside6-tools does not install pyside6-uic. There is, in fact, a cmake option called NO_QT_TOOLS, but it's explicitly enabled because pyside tools conflict with tools from Qt, still, I installed a full set of Qt packages (qt-creator[designer,qmldesigner] and so) but none of those provides any uic binary. Disabling NO_QT_TOOLS cmake doesn't seem to be enough to enable installation of pyside6 tools in any case. Reproducible: Always
Disabling NO_QT_TOOLS just results in installing some symlinks that will cause file conflicts. The real problem here is that you can't find the uic tool, this should be provided by some qt packages, though I also do not know which. @Qt team could you help with this?
(In reply to Andrew Ammerlaan from comment #1) > Disabling NO_QT_TOOLS just results in installing some symlinks that will > cause file conflicts. > > The real problem here is that you can't find the uic tool, this should be > provided by some qt packages, though I also do not know which. @Qt team > could you help with this? It's installed by qtbase, but it's not a user-facing-tool[1] (aka meant to be found through cmake or qmake if needed, not normally executed directly in PATH), so there's intentionally no /usr/bin symlink and it's available at /usr/lib64/qt6/libexec/uic [1] https://doc.qt.io/qt-6/packaging-recommendations.html
For comparison, PyQt6 installs a pyuic6 rather than plain "uic".
(In reply to Andrew Ammerlaan from comment #1) > Disabling NO_QT_TOOLS just results in installing some symlinks that will > cause file conflicts. > > The real problem here is that you can't find the uic tool, this should be > provided by some qt packages, though I also do not know which. @Qt team > could you help with this? Sorry, I should have been more clear. One of the installed files, pyside_tool.py expects uic executable to be installed and available on the system, which is not the case. I guess that pyside6 should install uic file or rather depend on the package that provides uic executable. Given that in the ebuild description, it mentions explicitly pyside6-lupdate it made me think that the tools would be installed with "pyside6-" prefix, but pyside6-lupdate is not installed nor any of the tools are installed with that prefix. My main issue is that uic is not installed but it seems that the problem is more broadly than just that. A part from that, all the tools that are installed are broken (none of those seems to be able to execute directly). The only way to execute the installed commands are callng to "python /usr/lib/python-exec/python3.xx/tool.py" and even in that case all tested programs break for not being able to import different python modules. Maybe this requires a bug for it's own.
(In reply to David Roman from comment #4) > Sorry, I should have been more clear. One of the installed files, > pyside_tool.py expects uic executable to be installed and available on the > system, which is not the case. Does it work if you install qtchooser? Or if you add /usr/lib64/qt6/libexec to your PATH? > I guess that pyside6 should install uic file > or rather depend on the package that provides uic executable. Given that in > the ebuild description, it mentions explicitly pyside6-lupdate it made me > think that the tools would be installed with "pyside6-" prefix, but > pyside6-lupdate is not installed nor any of the tools are installed with > that prefix. My main issue is that uic is not installed but it seems that > the problem is more broadly than just that. pyside6-lupdate (and uic) is just a symlink to qtchooser, see also: https://bugs.gentoo.org/907409 This is why we don't install it. AFAIK it doesn't add functionality and it causes file conflicts (at least it used to cause file conflicts, no idea if it still does) > A part from that, all the tools that are installed are broken (none of those > seems to be able to execute directly). The only way to execute the installed > commands are callng to "python /usr/lib/python-exec/python3.xx/tool.py" and > even in that case all tested programs break for not being able to import > different python modules. Maybe this requires a bug for it's own. Which modules are you missing? Could you upload some example output?
Created attachment 873413 [details] pyside6 tools logs
(In reply to Andrew Ammerlaan from comment #5) > (In reply to David Roman from comment #4) > > Sorry, I should have been more clear. One of the installed files, > > pyside_tool.py expects uic executable to be installed and available on the > > system, which is not the case. > > Does it work if you install qtchooser? Or if you add /usr/lib64/qt6/libexec > to your PATH? > > > I guess that pyside6 should install uic file > > or rather depend on the package that provides uic executable. Given that in > > the ebuild description, it mentions explicitly pyside6-lupdate it made me > > think that the tools would be installed with "pyside6-" prefix, but > > pyside6-lupdate is not installed nor any of the tools are installed with > > that prefix. My main issue is that uic is not installed but it seems that > > the problem is more broadly than just that. > > pyside6-lupdate (and uic) is just a symlink to qtchooser, see also: > https://bugs.gentoo.org/907409 > > This is why we don't install it. AFAIK it doesn't add functionality and it > causes file conflicts (at least it used to cause file conflicts, no idea if > it still does) > > > A part from that, all the tools that are installed are broken (none of those > > seems to be able to execute directly). The only way to execute the installed > > commands are callng to "python /usr/lib/python-exec/python3.xx/tool.py" and > > even in that case all tested programs break for not being able to import > > different python modules. Maybe this requires a bug for it's own. > > Which modules are you missing? Could you upload some example output? I uploaded a log with the log of the different installed tools. For now installing qtchooser don't seems likely to fix the issue.
Created attachment 873420 [details] pyside6-tools ebuild The major difficulty is that I honestly have no clue how this is supposed to work. This ebuild simplifies things and uses the upstream cmake file to install. This comes with a whole new set of problems. But maybe this ebuild behaves more like you would expect, could you give it a try?
The results seems to be the same. Maybe I'm misunderstanding something. Also I am confused by the fact that qt-creator, when creating a python project with pyside, references pyside6-uic tool, but CMakeSources.txt from pyside6-tools does not seem to install such a program, or at least with that name. Other tools, like qml.py, seems to be called "pyside6-name" in the source code but are installed like "qml.py". Are qml.py (pyside6-tools) and /usr/bin/qml5 from qtdeclarative intended to do the same job? It sems that qml.py does something very similar than qml5 but it extends it to work with python or something like this? Maybe is my lack of expertise with pyside, but I find this very messy.
(In reply to David Roman from comment #9) > The results seems to be the same. Maybe I'm misunderstanding something. Also > I am confused by the fact that qt-creator, when creating a python project > with pyside, references pyside6-uic tool, but CMakeSources.txt from > pyside6-tools does not seem to install such a program, or at least with that > name. Other tools, like qml.py, seems to be called "pyside6-name" in the > source code but are installed like "qml.py". I dug a bit into this and it seems like those 'pyside6-name' things are only installed by the pip wheel. If you install that in a python venv then you find that all those 'pyside6-name' things actually do is 'from PySide6.Scripts.pyside_tool import name'. This seems the way it is intended to be used because executing anything directly (even pyside_tool.py) just produces errors. The question then is is how we can make this work in our ebuild, I honestly have no clue yet. cmake --install doesn't help because it installs those scripts to /usr/bin where it can't be found by python's import. > Are qml.py (pyside6-tools) and /usr/bin/qml5 from qtdeclarative intended to > do the same job? It sems that qml.py does something very similar than qml5 > but it extends it to work with python or something like this? I think so, I still don't understand what it is pyside_tool.py is supposed to do. But the whole thing seems to be just a wrapper. > Maybe is my lack of expertise with pyside, but I find this very messy. It is definitely not you, pyside is one big headache. If possible, you might want to give PyQt6 a try. I also wonder if we need pyside6-tools packaged at all? If all it does is wrap things then does packaging this add any value or is it just a big confusing complication?
(In reply to Andrew Ammerlaan from comment #10) > I dug a bit into this and it seems like those 'pyside6-name' things are only > installed by the pip wheel. If you install that in a python venv then you > find that all those 'pyside6-name' things actually do is 'from > PySide6.Scripts.pyside_tool import name'. This seems the way it is intended > to be used because executing anything directly (even pyside_tool.py) just > produces errors. I see, that makes sense. > It is definitely not you, pyside is one big headache. If possible, you might > want to give PyQt6 a try. I used PyQt in the past, but wanted to try the official tools instead of third-party projects. Seems I would have to stick to PyQt, or create a python venv. > I also wonder if we need pyside6-tools packaged at all? If all it does is > wrap things then does packaging this add any value or is it just a big > confusing complication? For me it was confusing, but I don't know which use cases it could have. At least if those scripts have to be imported maybe it makes sense to remove the symlinks from /usr/bin?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc139b269e3ccd66f17509cc1a1c2f9415f5f677 commit bc139b269e3ccd66f17509cc1a1c2f9415f5f677 Author: Andrew Ammerlaan <andrewammerlaan@gentoo.org> AuthorDate: 2023-10-25 19:59:53 +0000 Commit: Andrew Ammerlaan <andrewammerlaan@gentoo.org> CommitDate: 2023-10-25 20:04:59 +0000 dev-python/pyside6-tools: correctly install the scripts None of these should be called directly, they are supposed to be imported via pyside_tool.py. This matches the install layout of the pypi wheel. There are also some wrappers installed in the pypi wheel but they don't appear to be very useful. Bug: https://bugs.gentoo.org/916213 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> ...-tools-6.6.0.ebuild => pyside6-tools-6.6.0-r1.ebuild} | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
The new ebuild installs all the pyside6-tools files exactly as 'pip install' would (I have verified this with diff -r). I omitted the wrappers because it is still unclear to me what we would need them for and how they should be generated and installed. Please let me know if there are any additional problems.
(In reply to David Roman from comment #11) > I used PyQt in the past, but wanted to try the official tools instead of > third-party projects. Seems I would have to stick to PyQt, or create a > python venv. Packaging-wise official tools been mostly nothing but a nightmare that breaks for one reason or another, not to mention that they mostly drop support without a commercial license for old Qt branches while python tend to need active development to keep up with new python versions (aka pyside2 is a mess and it's questionable how long will be able to keep it packaged). Generally I'd recommend to stick to PyQt.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1bf9c3ea3f709ace61dbe1857b0474e929ac837 commit d1bf9c3ea3f709ace61dbe1857b0474e929ac837 Author: Andrew Ammerlaan <andrewammerlaan@gentoo.org> AuthorDate: 2023-10-26 14:28:03 +0000 Commit: Andrew Ammerlaan <andrewammerlaan@gentoo.org> CommitDate: 2023-10-26 14:34:50 +0000 dev-python/pyside2-tools: also install pyside_tool.py This mirrors the recent changes to pyside6-tools Bug: https://bugs.gentoo.org/916213 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> .../files/pyside2-tools-5.15.11-no-copy-uic.patch | 43 ++++++++++++++++++++++ ...5.11.ebuild => pyside2-tools-5.15.11-r1.ebuild} | 23 +++++------- 2 files changed, 52 insertions(+), 14 deletions(-)
Hello, I have dev-python/pyside6-6.8.1.1 with the `uitools` USE flag enabled, and dev-python/pyside6-tools-6.8.1.1 installed as well, but I am missing pyside6-uic and pyside6-rcc (two things I need for a project I'm working on.)
(In reply to Alec Ari from comment #16) > Hello, > > I have dev-python/pyside6-6.8.1.1 with the `uitools` USE flag enabled, and > dev-python/pyside6-tools-6.8.1.1 installed as well, but I am missing > pyside6-uic and pyside6-rcc (two things I need for a project I'm working on.) It's just a symlink, the tool you are looking for is packaged elsewhere, see the discussion above.
Well I saw this comment: >I dug a bit into this and it seems like those 'pyside6-name' things are only installed by the pip wheel. If pyside6-uic and pyside6-ucc are symlinks, and pyside2-tools is removed from Gentoo, where is the replacement? What `pip` command do you run to grab pyside6-uic and pyside6-ucc as this is not clearly stated in the above comments, I've read through it several times now.
(In reply to Alec Ari from comment #18) > Well I saw this comment: > > >I dug a bit into this and it seems like those 'pyside6-name' things are only installed by the pip wheel. > > If pyside6-uic and pyside6-ucc are symlinks, and pyside2-tools is removed > from Gentoo, where is the replacement? What `pip` command do you run to grab > pyside6-uic and pyside6-ucc as this is not clearly stated in the above > comments, I've read through it several times now. Those files are installed by the pip wheel, and they are just symlinks to qtchooser, which makes them a bit pointless. The cmake build system does not implement generating those same symlinks. Though it could be that the situation has changed since I last checked. In what way is pyside2-tools different from pyside6-tools on your end? You can grab the pip wheel with 'pip install --user pyside6-tools', but as those files are just symlinks I doubt it will help you.
This is tricky.. I'm trying to get qtpyvcp working in Gentoo for LinuxCNC but I need to run 'qcompile .' on the tree which calls for the pyside6 commands such as rcc and uic. As LinuxCNC is not part of the Gentoo tree (but I have a working package in my overlay) and qtpyvcp is sort of an additional layer for the package (it's used to create custom GUIs for LinuxCNC) where and how should I start? The branch name is 'pyside6' and the tree is here: https://github.com/kcjengr/qtpyvcp/tree/pyside6 Docs on how to build with pip: https://www.qtpyvcp.com/install/dev_install.html Any ideas? Sometimes it helps to post the actual full problem, not trying to get off-topic. Just need to know where to look and get started, perhaps open a new bug report? Open to any suggestions. Thank you so much!
(Did you try "You can grab the pip wheel with 'pip install --user pyside6-tools', but as those files are just symlinks I doubt it will help you."?)
(In reply to Alec Ari from comment #20) > Any ideas? Sometimes it helps to post the actual full problem, not trying to > get off-topic. Just need to know where to look and get started, perhaps open > a new bug report? Open to any suggestions. I'm afraid I can't be of much help until I understand for myself how Qt intends for this to work. The fedora spec[1] has something that looks a lot like a solution starting on line 255, maybe you could give something like that a try. [1] https://src.fedoraproject.org/rpms/python-pyside6/blob/rawhide/f/python-pyside6.spec
OK so it needs to be: `pip install --user pyside6-utils` qtpyvcp is working now!
(In reply to Alec Ari from comment #23) > OK so it needs to be: `pip install --user pyside6-utils` > > qtpyvcp is working now! I am confused. That is an entirely different (non-offical Qt) package: https://github.com/Woutah/pyside6-utils
Maybe it's leftover cruft from before then.. I'm not sure, I've been hacking away at qtpyvcp for a month now and honestly I lost track. I thought that was the package that gave me pyside6-uic and pyside-rcc but perhaps not. My system at this point has been through the ringer.
OK, I figured it out. Installing `pyside6-utils` via `pip` (the unrelated package) pulls in dependencies that have pyside6-uic and pyside6-rcc. These files actually come from the `pyside6` pip package. `pip install Pyside6` brings in `pyside6-uic` and `pyside6-rcc` Sorry about that, I just didn't want to leave misinformation in here. `pyside6-utils` isn't needed at all, but will just solve it's own dependencies and some of those (in this case, Pyside6) happen to have the binaries I'm looking for. Cheers!
This should now work properly in version 6.8.2 if the tools USE flag is enabled.