-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
latest pypi release shows wrong version on pip freeze
#123
Comments
This issue caused Weasyprint to not install for me citing that it needed a version of cairocffi >= 0.9.0. For the time being I fixed the issue by specifying the version for cairocffi to be 1.0.0 in requirements.txt. |
We now need a more recent of setuptools (you can get rid of this problem by upgrading setuptools before installing). I should update the version needed in the requirements. |
this really should have been a major, not a patch release. |
1.0.0 is a major, isn't it? |
1.0.0 works fine, 1.0.1 has the breaking change. |
Oh, then it's probably because we didn't release a wheel. I have to find a solution about that. |
Adding the needed version of setuptools to |
Looks like it's not fixed: https://travis-ci.org/Kozea/WeasyPrint/jobs/493713422 |
Well, it's a bit more complicated. Installation works with old versions of setuptools, but launching tests doesn't. Launching |
This still doesn't work for me with 1.0.1 and 1.0.2. The change in the setup script requires the newer setuptools during install but setuptools is also listed (without version in I'm now getting:
This is on a docker ubuntu 16.04 image, pre-installed setuptools == 20.7.0. |
Can you try to download the current tree, pin the |
I just tried, but it doesn't work :( |
Then I'm afraid setuptools == 20.7.0 is really too old. |
Which awesome feature did you start using between 1.0.0 and 1.0.1 that requires the newer setuptools? 1.0.0. does work. |
The real difference is that we don't distribute wheels anymore, as cffi requires a compilation step during installation. Installing from source requires a more recent version of setuptools. |
Ah, yes. When I use |
In case anyone ends up here like I did, there's some awful pip behavior on display. If you install And it's actually even worse: if you uninstall and reinstall cairocffi with the upgraded setuptools, you'll still get the broken build because pip cached it. For me, doing |
1.0.2 is supposed to prevent this, as setuptools >= 39.2.0 is required in setup.cfg. Why didn't pip upgrade setuptools before installing cairocffi? |
@liZe My exact steps were:
As you can see, pip does upgrade setuptools while installing cairocffi, but it makes that broken build of cairocffi first. And then proceeds to keep using the cached broken build even though setuptools is upgraded. This is very much a pip bug (or bugs), not a cairocffi one. I just thought I'd comment here since this comes up when you search for "file-.cairocffi-VERSION", and it's not easy to debug. |
I'm not a pip expert; does it have a way to specify a build time dependency instead of a run time dependency? Cause it seems like that's exactly what you need. Also, it needs to not be using a cached build with version numbers that aren't at all what you asked for, but that's a separate issue. |
Oh, yes… Pip upgrades setuptools before building cairocffi, but as installing and building is done in the same process (that uses the old version of setuptools), it doesn't work. Pip should reload setuptools before building, but nobody cares because upgrading setuptools before installing a package is a really easy workaround. Maybe we could open an issue. |
(By the way, many package managers for Linux distributions upgrade (with deps) and reload themselves before upgrading the other packages.) |
(Oh, I'm well aware. Sometimes I wish the Python community just used portage or some other established tool.) |
😍 |
Version 1.7.0 ............. Released on 2024-04-27 * Drop Python 3.7 support, add Python 3.12 support * `#221 <https://github.com/Kozea/cairocffi/pull/225>`_: Add environment variable to set folder where DLLs are installed on Windows * `#225 <https://github.com/Kozea/cairocffi/pull/225>`_: Use Ruff instead of Flake8 and isort Version 1.6.1 ............. Released on 2023-07-24 * `#217 <https://github.com/Kozea/cairocffi/issues/217>`_: Repair installation with PyInstaller Version 1.6.0 ............. Released on 2023-06-12 **This version uses a new CFFI mode that may break your program.** CairoCFFI now uses Flit for packaging and is also distributed as a Python wheel. Please test carefully and don’t hesitate to report issues before using it in production. * `#216 <https://github.com/Kozea/cairocffi/pull/216>`_: Use ABI-level in-line CFFI mode Version 1.5.1 ............. Released on 2023-04-15 * `#212 <https://github.com/Kozea/cairocffi/issues/212>`_: Bring back XCB support during wheel generation Version 1.5.0 ............. Released on 2023-03-17 * `#106 <https://github.com/Kozea/cairocffi/issues/106>`_, `#200 <https://github.com/Kozea/cairocffi/issues/200>`_: Fallback to manual PNG file creation on hardened systems * `#210 <https://github.com/Kozea/cairocffi/pull/210>`_: Use pyproject.toml for packaging and remove other useless files Version 1.4.0 ............. Released on 2022-09-23 * `#205 <https://github.com/Kozea/cairocffi/pull/205>`_: Use pikepdf to parse generated PDF * `#171 <https://github.com/Kozea/cairocffi/pull/171>`_: Don’t use deprecated pytest-runner anymore Version 1.3.0 ............. Released on 2021-10-04 * `2cd512d <https://github.com/Kozea/cairocffi/commit/2cd512d>`_: Drop Python 3.6 support * `#196 <https://github.com/Kozea/cairocffi/pull/196>`_: Fix import `constants.py` import * `#169 <https://github.com/Kozea/cairocffi/pull/169>`_: Add extra library name "cairo-2.dll" * `#178 <https://github.com/Kozea/cairocffi/pull/178>`_: Workaround for testing date string with cairo 1.17.4 * `#186 <https://github.com/Kozea/cairocffi/pull/186>`_: Fix link in documentation * `#195 <https://github.com/Kozea/cairocffi/pull/195>`_: Fix typo in documentation * `#184 <https://github.com/Kozea/cairocffi/pull/184>`_, `a4fc2a7 <https://github.com/Kozea/cairocffi/commit/a4fc2a7>`_: Clean .gitignore Version 1.2.0 ............. Released on 2020-10-29 * `#152 <https://github.com/Kozea/cairocffi/pull/152>`_: Add NumPy support * `#143 <https://github.com/Kozea/cairocffi/issues/143>`_: Make write_to_png function work on hardened systems * `#156 <https://github.com/Kozea/cairocffi/pull/156>`_: Use major version name to open shared libraries * `#165 <https://github.com/Kozea/cairocffi/pull/165>`_: Don’t list setuptools as required for installation Version 1.1.0 ............. Released on 2019-09-05 * `#135 <https://github.com/Kozea/cairocffi/pull/135>`_, `#127 <https://github.com/Kozea/cairocffi/pull/127>`_, `#119 <https://github.com/Kozea/cairocffi/pull/119>`_: Clean the way external libraries are found * `#126 <https://github.com/Kozea/cairocffi/pull/126>`_: Remove const char* elements from cdef * Support Cairo features up to 1.17.2 * Fix documentation generation Version 1.0.2 ............. Released on 2019-02-15 * `#123 <https://github.com/Kozea/cairocffi/issues/123>`_: Rely on a recent version of setuptools to handle VERSION Version 1.0.1 ............. Released on 2019-02-12 * `#120 <https://github.com/Kozea/cairocffi/issues/120>`_: Don't delete _generated modules on ffi_build import Version 1.0.0 ............. Released on 2019-02-08 6 years after its first release, cairocffi can now be considered as stable. * Drop Python 2.6, 2.7 and 3.4 support * Test with Python 3.7 * Clean code, tests and packaging
see below for my installation process on ubuntu 18.10.
pip freeze
gives mecairocffi===file-.cairocffi-VERSION
.The text was updated successfully, but these errors were encountered: