Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Set version_info/version in install_as_pycairo #10

Closed
lazka opened this Issue · 7 comments

2 participants

@lazka
Collaborator

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
Owner

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

@SimonSapin
Owner

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
Collaborator

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
Owner

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
Collaborator

Thanks.

@lazka lazka closed this
@SimonSapin
Owner

I take it this resolved the issue with Matplotlib?

@lazka
Collaborator

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.