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

Set version_info/version in install_as_pycairo #10

Closed
lazka opened this issue May 10, 2013 · 8 comments
Closed

Set version_info/version in install_as_pycairo #10

lazka opened this issue May 10, 2013 · 8 comments

Comments

@lazka
Copy link
Collaborator

lazka commented May 10, 2013

I'm playing around with matplotlib atm, which uses version_info and version to check if the installed pycairo is recent enough.

I suggest adding something like this in install_as_pycairo():

globals()["version_info"] = (1, 10, 0)
globals()["version"] = "1.10.0"
SimonSapin added a commit that referenced this issue May 11, 2013
@SimonSapin
Copy link
Member

Hi. Thanks for the bug report. I just made a change, does it fix the issue for you? (Please try the git version.)

@SimonSapin
Copy link
Member

Well, that sucks. I put the cairocffi version number in there but matplotlib probably does comparison with some known pycairo version, so it's not gonna work.

Ideally they should really do feature detection rather than version detection. Do you have some idea of what features/versions they expect? Maybe try raising an issue on matplotlib?

I'd rather not make up a "pycairo-equivalent" version number. It would make sense: the feature set of pycairo and cairocffi are neither quite a subset of the other.

@lazka
Copy link
Collaborator Author

lazka commented May 12, 2013

No, doesn't work. It expects (1, 2, 0) (it should be tuple of ints, not a list of strings btw).

What do you think about installing a proxy module in install_as_pycairo? http://bpaste.net/show/D5IoxyppXA6LgKvRXqfO/

@SimonSapin
Copy link
Member

OK, try this now. I don't really like where this is going but I changed it to 1.10.0 and tuple-of-ints as you suggested. I'm not sure a module proxy would really help.

TODO for me: document this.

@lazka
Copy link
Collaborator Author

lazka commented May 12, 2013

Thanks.

@lazka lazka closed this as completed May 12, 2013
@SimonSapin
Copy link
Member

I take it this resolved the issue with Matplotlib?

@lazka
Copy link
Collaborator Author

lazka commented May 13, 2013

Yes.

@anntzer
Copy link

anntzer commented Feb 17, 2018

fwiw I'm going to bump mpl's min pycairo version to 1.11.0 and make the check only happen for pycairo, not cairocffi, so this hack may be removed (once mpl is fixed)...

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

No branches or pull requests

3 participants