mitya57/secretstorage

re-release on pypi while building using fresh setuptools

yarikoptic opened this issue · 5 comments

apparently (according to experts, see below) having python_requires='>=3.5', was not sufficient "by itself" to produce a pypi release so that previous versions would be automagically installed when using python2. Without it having current release python 3 only breaks any other module which might depend on secretstorage somewhere down the chain

here is a cut/paste from the #pypa IRC

21:22   yoh: Question about pip:  Shouldn't presence of python_requires='>=3.5',
21:22   yoh: force installation of previous version (which still supports python 2) if pip is ran within 
             python2 virtualenv?
21:23  <-- Sasazuka [~Sasazuka@unaffiliated/sasazuka] has quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:24   yoh: secretstorage module seems has done everything "by the book" (has aforementioned python_requires, 
             also python 3 only classifiers...  but  pip install -r requirements.txt started to fail for us on 
             travis while building using python2
21:37   toad_polo: yoh: I suspect they built their release with an old version of setuptools
21:37   toad_polo: See this: https://pypi.org/project/python-dateutil/
21:38   toad_polo: There's a "requires" line under the "maintainer" line.
21:38   toad_polo: No such line here: https://pypi.org/project/SecretStorage/
----------------------------------------------------------------------------------------------------------------
21:56   njs: yoh: make sure you're using a recent version of pip
21:58   njs: also
22:14  * yoh asks for a pardon for staying silent -- bus went into the woods
22:14   yoh: njs: our pip is the most recent ;) 
22:16   yoh: so, if I got it right, the verdict is that I should ask secretstorage folks to release a new minor 
             version which would just be a rebuild using some recent setuptools
22:16   yoh: toad_polo: ^, thanks ;)

oh, unfortunately that was not all:

22:21   toad_polo: yoh: Might be more complicated than that, unfortunately.
22:22   toad_polo: Since it will fall back to the last one that isn't excluded... Which is the current version.
22:23   toad_polo: I think maybe a post release (same release version) might work, but I'm not sure.
22:28   njs: deleting the old version from pypi is somehting else to consider
23:22   techalchemy: i'd strongly lean toward the post-release solution unless the bug with pypi i never 
                     reported about released postreleases with no initial release available is now fixed in 
                     warehouse

Hmm, I used the latest setuptools (39.0.1) and all my metadata looks correct:

$ wget -q https://files.pythonhosted.org/packages/ce/69/d63eac636da20720b393a541adfc5bd3ece2b35f9e7a8c66b2eccee3cc19/SecretStorage-3.0.0.tar.gz
$ tar xzf SecretStorage-3.0.0.tar.gz 
$ grep ^Requires-Python SecretStorage-3.0.0/PKG-INFO 
Requires-Python: >=3.5
$ grep ^Requires-Python SecretStorage-3.0.0/SecretStorage.egg-info/PKG-INFO 
Requires-Python: >=3.5
$ wget -q https://files.pythonhosted.org/packages/02/de/e4590cf025c714635637d4b2d19acfb1015f2d0c6cfe843b2b8f776ec819/SecretStorage-3.0.0-py2.py3-none-any.whl
$ unzip SecretStorage-3.0.0-py2.py3-none-any.whl
$ grep ^Requires-Python SecretStorage-3.0.0.dist-info/METADATA
Requires-Python: >=3.5

Where can be the problem?

See #12 , Maybe it is the same problem

I have now uploaded version 3.0.1 using twine instead of setup.py upload, that seemed to help.

FWIW confirming (https://travis-ci.org/nipy/heudiconv/builds/370368742) that the issue seems to be fixed. Thank you!