Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 706618

Summary: dev-python/zipp-2.0.1: version appears to be 0.0.0
Product: Gentoo Linux Reporter: Benda Xu <heroxbd>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED WORKSFORME    
Severity: major CC: andrewammerlaan, mgorny, sbraz
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705872    

Description Benda Xu gentoo-dev 2020-01-27 06:42:26 UTC
zipp-2.0.1 does not handle its version correctly.  After merge, the file /usr/lib64/python3.6/site-packages/zipp-0.0.0-py3.6.egg-info gives:

Metadata-Version: 2.1
Name: zipp
Version: 0.0.0


Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-01-27 06:55:20 UTC
To be honest, I was wondering about adding a QA check to the eclass for this.  However, I'm not sure if there aren't packages that intentionally release '0.0.0' version ;-).
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-01-27 07:12:21 UTC
I don't seem to be able to reproduce.  /tmp/portage/dev-python/zipp-2.0.1/image/usr/lib64/python3.6/site-packages/zipp-2.0.1-py3.6.egg-info/PKG-INFO has 2.0.1.
Comment 3 Nowa Ammerlaan gentoo-dev 2020-01-27 08:09:16 UTC
Works for me, I don't get the same error when running the tests on scikit-build you're getting (https://github.com/gentoo/gentoo/pull/14344)

This is PKG-INFO on my system:
andrew@andrew-gentoo-pc scikit-build % cat /usr/lib/python3.7/site-packages/zipp-2.0.1-py3.7.egg-info/PKG-INFO
Metadata-Version: 2.1
Name: zipp
Version: 2.0.1
Summary: Backport of pathlib-compatible object wrapper for zip files
....

Maybe it works again if you re-emerge?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-01-27 08:13:44 UTC
Also check if you don't have orphan .egg-info.
Comment 5 Benda Xu gentoo-dev 2020-01-27 09:14:06 UTC
Interesting.  I can still reproduce this bug with zipp 2.0.1, but zipp-1.0.0 works fine.
Comment 6 Nowa Ammerlaan gentoo-dev 2020-01-27 09:22:41 UTC
I just looked through the 1.0.0 and 2.0.1 ebuilds and the 2.0.1 version is missing this:

python_prepare_all() {
	sed -i "s:use_scm_version=True:version='${PV}',name='${PN//-/.}':" setup.py || die
	sed -r -i "s:setuptools_scm[[:space:]]*([><=]{1,2}[[:space:]]*[0-9.a-zA-Z]+|)[[:space:]]*::" \
		setup.cfg || die
	distutils-r1_python_prepare_all
}

The setup.py/setup.cfg files in the release tarball do not contain a 'version=' line. This seems to compensate for that in the 1.0.0 ebuild, maybe this should be added to the 2.0.1 ebuild to?

Though I am still a bit confused as to why this works for me and Michał Górny but not for you, maybe a missing build dependency?
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-01-27 09:28:39 UTC
It has a dep on setuptools_scm, so it should just work™.
Comment 8 Nowa Ammerlaan gentoo-dev 2020-01-28 15:25:14 UTC
Version 2.1.0 just got pushed to gentoo, does it have the same issue for you?
Comment 9 Benda Xu gentoo-dev 2020-01-29 11:42:08 UTC
I did a `emerge -e @world` and problem solved.  No need to dig too much into the corner case cause.

Thank you guys!