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

Read version in setup.py #179

Closed
wants to merge 1 commit into from
Closed

Read version in setup.py #179

wants to merge 1 commit into from

Conversation

Afoucaul
Copy link

Since October 2020, pip became more strict toward version declaration. As a result, install cairocffi with the latest version (20.3.3) fails with the following error:

WARNING: Requested cairocffi>=0.9.0 from https://files.pythonhosted.org/packages/84/ca/0bffed5116d21251469df200448667e90acaa5131edea869b44a3fbc73d0/cairocffi-1.2.0.tar.gz#sha256=9a979b500c64c8179fec286f337e8fe644eca2f2cd05860ce0b62d25f22ea140 (from weasyprint), but installing version file-.cairocffi-VERSION
ERROR: Requested cairocffi>=0.9.0 from https://files.pythonhosted.org/packages/84/ca/0bffed5116d21251469df200448667e90acaa5131edea869b44a3fbc73d0/cairocffi-1.2.0.tar.gz#sha256=9a979b500c64c8179fec286f337e8fe644eca2f2cd05860ce0b62d25f22ea140 (from weasyprint) has different version in metadata: 'file-.cairocffi-VERSION'

This is mentioned in #172, which suggests using --use-deprecated=legacy-resolver. This is unstable, as this flag is intended to be remove in a future release.

On the other hand, using pip 20.2.1 works, but says:

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

As a fix, I propose to simply read the version number from cairocffi/VERSION in setup.py. I've succesfully tested this by installing my fork via pip's VCS support.

Solves #172

@liZe
Copy link
Member

liZe commented Apr 14, 2021

Hi! Thanks for the pull request.

We’re not sure about what the future of cairocffi will be. We (CourtBouillon, the current maintainer) are about to drop Cairo from WeasyPrint dependencies (Kozea/WeasyPrint#1232), and we’ll soon decide what is better for the future of cairocffi. Until then, we don’t really want to change the way the library works, and we prefer to keep the status quo.

@liZe
Copy link
Member

liZe commented Mar 11, 2023

Fixed by e17b488.

@liZe liZe closed this Mar 11, 2023
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.

2 participants