FS#74128 - [python-flask-compress] Version missing from egg-info breaks dependents

Attached to Project: Community Packages
Opened by Robin Ekman (rekman) - Tuesday, 15 March 2022, 14:44 GMT
Last edited by Levente Polyak (anthraxx) - Wednesday, 30 March 2022, 23:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details


Additional info:
* package version(s) 1.10.1-1

Steps to reproduce:
Install any program that depends on a specific version of flask-compress and run. In my case, flexget from AUR. It should fail with an error similar to
> pkg_resources.ContextualVersionConflict: (Flask-Compress 0.0.0 (/usr/lib/python3.10/site-packages), Requirement.parse('flask-compress>=1.2.1'), {'FlexGet'})
I've attached a full stack trace, but it should be superfluous.

The underlying reason is that the package was built without python-setuptools-scm installed. This prevents setuptools from deducing the version of the library:

>/usr/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'use_scm_version'
> warnings.warn(msg)


Consequently the package metadata files end up in usr/lib/python3.10/site-packages/Flask_Compress-0.0.0-py3.10.egg-info/ and PKG-INFO contains
>Version: 0.0.0
This obviously breaks the dependency flask-compress>=1.2.1.

To fix:
* Add python-setuptools-scm to makedeps
* Rebuild the package

I have verified this by locally running
> sudo pacman -S --needed python-setuptools-scm
> wget https://github.com/archlinux/svntogit-community/raw/packages/python-flask-compress/trunk/PKGBUILD
> makepkg -i
after which the dependent runs.
   log (3.5 KiB)
This task depends upon

Closed by  Levente Polyak (anthraxx)
Wednesday, 30 March 2022, 23:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.11-1

Loading...