This repository has been archived by the owner. It is now read-only.

Python 3 bindings for Qt #17902

wants to merge 4 commits into


None yet
4 participants

Add formula for building PyQt against Python 3.
Add formula for building SIP against Python 3 (PyQt dependency).
Add Python 3 to superenv.


samueljohn commented Feb 17, 2013

Thanks a lot for your work here.

How would this conflict with sip, pyqt ?

Actually I am up to something similar (adding python and python3 to superenv) but, I'd like to avoid having all the XXX-python3 types of formulae (that may be quite a lot).

Therefore, I am implementing a a special depends_on :python2 and depends_on :python3 and a

python do

block as written there: mxcl#16439 (comment)

I really want to avoid having almost duplicate formulae that only differ in the version of python called. We can do better. However, for pyqt and sip we may need to duplicate the formulae, because both seem to install binaries and directories (outside of the site-packages) of the same name.
I wonder if we can perhaps fix that, e.g. by putting using #{share}/sip3 for python 3, so it won't conflict.

I am a new Homebrew user ... I just installed Homebrew, Python, and PyQt via Homebrew because I was asked to see if I could help a in-house application written in Python3 and PyQT4.9 work on Macs. The original script works on Windows. Anyway ... do you have an idea when these bindings would be ready for python3?


samueljohn commented Feb 19, 2013

I am on it, so I guess later this week.

If you are really pressed, you may brew pull 17902 to apply the changes from this pull request here and see if they work for you. @metaspace may perhaps assist you if you have trouble with the formulae of this PR. Please note this is not yet official and the official solution will probably look a bit different. Further the formulae here may require you to brew unlink pyqt sip first.
To undo the brew pull you have to cd $(brew --prefix) and git reset --hard origin/master.

Are you thinking that later this week will be official or what is the normal timeframe for an official formula release? I am not trying to push. I just want to get a sense of timing so that I can decide if I have time to wait for the official formula or if I should go ahead and use the pull request. Thanks!


samueljohn commented Feb 20, 2013

Hard to tell. First, I have to invest enough of my spare time to
finish it. Then somebody from the core team has to review an pull in.
I can't give a reliable ETA.


dacresni commented Feb 21, 2013

@qrider70 do you have a test environment you can test it in?

@samueljohn, I understand. :)

@dacresni, unfortunately, I don't have a test environment at the moment. Just my regular laptop that I work on.

qrider70 commented Mar 1, 2013

A question ... if it looks like it will be a while (and if I'm uncertain about the risk of being able to roll back the pull request if something goes wrong), how difficult is it to roll back the pyqt formula and install something like this: I'm still unsure how I'd uninstall this so that I could go back to homebrew once you have this figured out.

I prefer homebrew because it is my understanding that homebrew will make it possible to have more recent updates. But sooner or later, I'm going to need to move forward on the project, so trying to assess my options and thought I'd ask you since you know more about this process than I do and this is my one obstacle at the moment. Thanks!


samueljohn commented Mar 1, 2013

I am coding right now ... it has proven to be more difficult than I initially thought but I am positive to open a pull request (that you can try out) later tomorrow. Need to sort out a few issues before...

qrider70 commented Mar 1, 2013

Ok. I still have time to wait. I don't want to seem pushy or not respectful of your time constraints. It was just that I received that link from my coworker and so I was trying to evaluate the options without putting myself in a position where I might have to extricate myself from multiple installations that could cause more problems than it helped. :) Thanks!

How are the sorting of issues coming? :)


samueljohn commented Mar 16, 2013

I have it basically working.
See mxcl#16439 (comment)

It's not yet in homebrew core but you can try and pull my branch as described over there.

@ghost ghost assigned samueljohn Mar 16, 2013

I agree that having a separate recipe for each python version is not the best way to go. I just needed the bindings fast, so I hacked it in.

@samueljohn, looking forward to see your changes upstream. Thanks for the effort =)


samueljohn commented Mar 19, 2013

Closing in favor of #18588. However, thanks for your work!

@samueljohn samueljohn closed this Mar 19, 2013

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.