Set version_info/version in install_as_pycairo #10

Closed
lazka opened this Issue May 10, 2013 · 7 comments

Comments

Projects
None yet
2 participants
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

Member

SimonSapin commented May 11, 2013

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

Member

SimonSapin commented May 11, 2013

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.

Collaborator

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/

Member

SimonSapin commented May 12, 2013

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.

Collaborator

lazka commented May 12, 2013

Thanks.

@lazka lazka closed this May 12, 2013

Member

SimonSapin commented May 12, 2013

I take it this resolved the issue with Matplotlib?

Collaborator

lazka commented May 13, 2013

Yes.

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