Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Darwin build #12

Merged
merged 6 commits into from
May 6, 2021
Merged

Fix Darwin build #12

merged 6 commits into from
May 6, 2021

Conversation

jayvdb
Copy link
Contributor

@jayvdb jayvdb commented Apr 2, 2021

With this, and a few other changes in other related repos, pyqt5-tools designer works on Mac

Skip early Qt versions due to failures.
@altendky
Copy link
Owner

altendky commented Apr 2, 2021

Thanks for the help! Hopefully I can give it a try today. My recollection was that my hangup was with identifying all the dependencies that needed to be included so I'm a bit confused that there isn't more work for that. But, maybe I was just heading down the wrong path... But really, this is years in the waiting so, excited! :] Thanks!

@jayvdb
Copy link
Contributor Author

jayvdb commented Apr 3, 2021

There is some unsolved problems with qt 5.14.1 and earlier, which I have excluded from CI. Probably you were hitting those problems, which are thankfully solved in qt 5.14.2+ , and hopefully dont re-appear in v6. If you have problems with v6, disable mac for #11 and I'll investigate them after you've merged.

@jayvdb
Copy link
Contributor Author

jayvdb commented Apr 5, 2021

ping @altendky, did you get a chance to look at this, and altendky/pyqt-plugins#14 . I'd like to keep working on a solution based on this, esp adding qmlformat and qmllint to pyqt-tools, but I need the mac support for this to be viable.

@altendky
Copy link
Owner

altendky commented Apr 5, 2021

I spent most of the weekend on another project, but yes, I did start into this and ran into unrelated build issues in qt-tools that I need to deal with, or maybe shortcut around.

@jayvdb
Copy link
Contributor Author

jayvdb commented Apr 6, 2021

I took the shortcut in qt-tools ; these packages are wickedly interwoven.

@jayvdb
Copy link
Contributor Author

jayvdb commented Apr 16, 2021

ping @altendky ;-)

@jayvdb
Copy link
Contributor Author

jayvdb commented Apr 29, 2021

@altendky , is there anything I can do to help this along, in this repo or the associated repos?

@altendky
Copy link
Owner

Sorry for leaving you hanging. :[ The reminders have been polite, appropriate, and appreciated. I've been focused on another project and have a third kind of hanging in the corners too that needs attention. I'll at least put in a few hours this morning and see where I can get.

@SKing606
Copy link

SKing606 commented May 5, 2021

Hey guys, nothing to do with this project, but how can I make pyqt5-tools work on my mac? It always gives me errors when i type "pip3 install pyqt5-tools"

@jayvdb
Copy link
Contributor Author

jayvdb commented May 5, 2021

We're waiting on altendky/pyqt-plugins#15 being ready.

@altendky
Copy link
Owner

altendky commented May 5, 2021

With @jayvdb, I think we've got all layers... working? I have disabled 5.14.0 and 5.14.1 on macOS. @jayvdb, did you have any understanding of what the issue is with them? I didn't dig into it. Is it Qt? PyQt? Python 3.5 failures on Windows I think are caused by path length limits that go away once lower layers are released so I'm planning on ignoring those unless they continue after the sub-layers do get published.

@altendky
Copy link
Owner

altendky commented May 5, 2021

@SKing606 also note that there is altendky/pyqt-tools#12. Maybe we get lucky and it gets closed soon.

@altendky
Copy link
Owner

altendky commented May 5, 2021

@jayvdb, would you have time to try out the wheels in the artifacts for the following builds? You should be able to download the .zip, extract the .whl, then yourenv/bin/pip install this.whl that.whl another.whl and_one_more.whl or yourenv/bin/pip install wheels/*.whl or whatever.

https://github.com/altendky/qt-applications/actions/runs/811033536
https://github.com/altendky/qt-tools/actions/runs/811034438
https://github.com/altendky/pyqt-plugins/actions/runs/814153572
https://github.com/altendky/pyqt-tools/actions/runs/814051651

@jayvdb
Copy link
Contributor Author

jayvdb commented May 5, 2021

Hmm, not quite that easy

❯ pip3 install *.whl
Processing ./pyqt5_plugins-5.15.2.2.1.0.post24+g13d0938-cp38-cp38-macosx_10_14_x86_64.whl
Processing ./pyqt5_tools-5.15.2.3.0.3.post7+g414a399-py3-none-any.whl
Processing ./qt5_applications-5.14.2.2.1.post7+g6183dab-py3-none-macosx_10_14_x86_64.whl
Processing ./qt5_tools-5.15.2.1.0.1.post15+g37577ca-py3-none-any.whl
Collecting qt5-tools@ git+https://github.com/altendky/qt-tools@add_macos
  Cloning https://github.com/altendky/qt-tools (to revision add_macos) to /private/var/folders/hz/tflgsmps1g95cdq5hdptdhc00000gp/T/pip-install-g_yvs09p/qt5-tools_47ec580441a947fbbf592182405d8ce4
  Running command git clone -q https://github.com/altendky/qt-tools /private/var/folders/hz/tflgsmps1g95cdq5hdptdhc00000gp/T/pip-install-g_yvs09p/qt5-tools_47ec580441a947fbbf592182405d8ce4
  Running command git checkout -b add_macos --track origin/add_macos
  Switched to a new branch 'add_macos'
  Branch 'add_macos' set up to track remote branch 'add_macos' from 'origin'.
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
dbus[9377]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
dbus[9377]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Collecting pyqt5==5.15.2
  Using cached PyQt5-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-abi3-macosx_10_13_intel.whl (47.6 MB)
ERROR: Cannot install pyqt5-plugins==5.15.2.2.1.0.post24+g13d0938 and qt5-tools 5.15.2.1.0.1.post15+g37577ca (from /Users/john.vandenberg/tmp/qtapps/qt5_tools-5.15.2.1.0.1.post15+g37577ca-py3-none-any.whl) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested qt5-tools 5.15.2.1.0.1.post15+g37577ca (from /Users/john.vandenberg/tmp/qtapps/qt5_tools-5.15.2.1.0.1.post15+g37577ca-py3-none-any.whl)
    pyqt5-plugins 5.15.2.2.1.0.post24+g13d0938 depends on qt5-tools 5.15.2.1.0.1.post14+gdada9aa (from git+https://github.com/altendky/qt-tools@add_macos)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

@jayvdb
Copy link
Contributor Author

jayvdb commented May 6, 2021

Manually removed those deps from the *.whl/*.dist-info/METADATA

❯ pip3 install *.whl
Processing ./pyqt5_plugins-5.15.2.2.1.0.post24+g13d0938-cp38-cp38-macosx_10_14_x86_64.whl
Processing ./qt5_applications-5.14.2.2.1.post7+g6183dab-py3-none-macosx_10_14_x86_64.whl
Processing ./qt5_tools-5.15.2.1.0.1.post15+g37577ca-py3-none-any.whl
dbus[34943]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
dbus[34943]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Collecting pyqt5==5.15.2
  Using cached PyQt5-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-abi3-macosx_10_13_intel.whl (47.6 MB)
Requirement already satisfied: click in /Users/john.vandenberg/.local/lib/python3.8/site-packages (from pyqt5-plugins==5.15.2.2.1.0.post24+g13d0938) (7.1.2)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in /Users/john.vandenberg/.local/lib/python3.8/site-packages (from pyqt5==5.15.2->pyqt5-plugins==5.15.2.2.1.0.post24+g13d0938) (12.8.1)
Installing collected packages: qt5-applications, qt5-tools, pyqt5, pyqt5-plugins
  Attempting uninstall: pyqt5
    Found existing installation: PyQt5 5.15.4
    Uninstalling PyQt5-5.15.4:
      Successfully uninstalled PyQt5-5.15.4
Successfully installed pyqt5-5.15.2 pyqt5-plugins-5.15.2.2.1.0.post24+g13d0938 qt5-applications-5.14.2.2.1.post7+g6183dab qt5-tools-5.15.2.1.0.1.post15+g37577ca

@jayvdb
Copy link
Contributor Author

jayvdb commented May 6, 2021

python3.8 -m pyflakes py2many.py setup.py pykt pygo pydart/ pyjl pyrs py2many/ py14 pynim
Python 3.8.5 (default, Sep  4 2020, 02:22:02)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import qt5_applications
>>> qt5_applications._applications
<module 'qt5_applications._applications' from '/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/qt5_applications/_applications.py'>
>>> qt5_applications._applications.application_paths
{'assistant': 'Assistant.app', 'designer': 'Designer.app', 'linguist': 'Linguist.app', 'canbusutil': 'canbusutil', 'lconvert': 'lconvert', 'licheck_mac': 'licheck_mac', 'lprodump': 'lprodump', 'lrelease': 'lrelease', 'lrelease-pro': 'lrelease-pro', 'lupdate': 'lupdate', 'lupdate-pro': 'lupdate-pro', 'macchangeqt': 'macchangeqt', 'macdeployqt': 'macdeployqt', 'moc': 'moc', 'pixeltool': 'pixeltool.app', 'qcollectiongenerator': 'qcollectiongenerator', 'qdbus': 'qdbus', 'qdbuscpp2xml': 'qdbuscpp2xml', 'qdbusviewer': 'qdbusviewer.app', 'qdbusxml2cpp': 'qdbusxml2cpp', 'qdistancefieldgenerator': 'qdistancefieldgenerator', 'qdoc': 'qdoc', 'qgltf': 'qgltf', 'qhelpgenerator': 'qhelpgenerator', 'qlalr': 'qlalr', 'qmake': 'qmake', 'qml': 'qml.app', 'qmlcachegen': 'qmlcachegen', 'qmleasing': 'qmleasing', 'qmlimportscanner': 'qmlimportscanner', 'qmllint': 'qmllint', 'qmlmin': 'qmlmin', 'qmlplugindump': 'qmlplugindump', 'qmlpreview': 'qmlpreview', 'qmlprofiler': 'qmlprofiler', 'qmlscene': 'qmlscene', 'qmltestrunner': 'qmltestrunner', 'qscxmlc': 'qscxmlc', 'qtattributionsscanner': 'qtattributionsscanner', 'qtdiag': 'qtdiag', 'qtpaths': 'qtpaths', 'qtplugininfo': 'qtplugininfo', 'qvkgen': 'qvkgen', 'rcc': 'rcc', 'repc': 'repc', 'tracegen': 'tracegen', 'uic': 'uic', 'xmlpatterns': 'xmlpatterns', 'xmlpatternsvalidator': 'xmlpatternsvalidator'}
>>> qt5_applications._application_path('designer')
PosixPath('/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/qt5_applications/Qt/bin/Designer.app')
>>> import qt5_tools.entrypoints
>>> qt5_tools.entrypoints
<module 'qt5_tools.entrypoints' from '/usr/local/Caskroom/miniconda/base/lib/python3.8/site-packages/qt5_tools/entrypoints.py'>

@altendky
Copy link
Owner

altendky commented May 6, 2021

@jayvdb thanks for trying this out. I get the issue with the dependencies and yeah, another bit there to make more pleasant for development. I'm not sure what you are showing with the second message or whether it seems to be working for you.

@jayvdb
Copy link
Contributor Author

jayvdb commented May 6, 2021

Yea, just showing that it is working after installing. Happy to run any other snippets you want in order to verify it is working correctly.

@altendky
Copy link
Owner

altendky commented May 6, 2021

@jayvdb I was thinking using the pyqt5-tools layer and making sure applications open, the demo cli options work such as designer showing the example widget in the widget list, etc.

@altendky
Copy link
Owner

altendky commented May 6, 2021

@jayvdb, pending your go ahead that at least your installation "works" I think I'm ready to start into the release process on this. Mostly just qt-applications is the important layer to not re-release due to its big size. So, we shouldn't need to do this for all the layers. Just this first and then again at the end with a just-from-PyPI installation.

Thanks for your work on this. Been a lot of years waiting to get support for all three platforms. :]

@jayvdb
Copy link
Contributor Author

jayvdb commented May 6, 2021

My installation works. :shipit:

@altendky altendky merged commit f427553 into altendky:main May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants