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

Packaging version issue with latest release 1.1.0 #14

Closed
ntarocco opened this issue Oct 14, 2020 · 7 comments · Fixed by #15
Closed

Packaging version issue with latest release 1.1.0 #14

ntarocco opened this issue Oct 14, 2020 · 7 comments · Fixed by #15

Comments

@ntarocco
Copy link

Hello,
it looks like that there is an issue with the latest version just released, the version in the package is 0.0.0.

Test:

$ git clone https://github.com/RonnyPfannschmidt/iniconfig.git
$ cd iniconfig
$ pip install .
Processing /path/iniconfig
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: iniconfig
  Building wheel for iniconfig (PEP 517) ... done
  Created wheel for iniconfig: filename=iniconfig-0.0.0-py2.py3-none-any.whl size=4989 sha256=8465f477143b0ac27c24a47e789989be0759b724d7a2298568686875020185a0
  Stored in directory: /private/var/folders/rh/jlkzwq5x70l_b6sjv3y31d9r0000gn/T/pip-ephem-wheel-cache-6cbof_4l/wheels/e9/49/c4/a61f9331f192b395ce56fbff2aa7a0c19a4ab737ec2df5866a
Successfully built iniconfig
Installing collected packages: iniconfig
Successfully installed iniconfig-0.0.0

Are you able to reproduce the same?

@florimondmanca
Copy link
Contributor

florimondmanca commented Oct 14, 2020

Hi!

I was not able to reproduce initially: I had iniconfig==1.0.1 installed, then did pip install iniconfig==1.1.0, and the package installed as expected, with the correct version.

However, from a fresh install (pip uninstall iniconfig -y then pip cache purge), I can reproduce:

pip install -U iniconfig  
Collecting iniconfig
  Using cached iniconfig-1.1.0.tar.gz (8.1 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
ERROR: Requested iniconfig from https://files.pythonhosted.org/packages/44/39/e96292c7f7068e58877f476908c5974dc76c37c623f1fa332fe4ed6dfbec/iniconfig-1.1.0.tar.gz#sha256=150a59361017218f4621a68ea9984772675a7f6e074ff7d02e115152f1804dc6 has different version in metadata: '0.0.0'

The ERROR above is due to me having configured PIP_USE_FEATURE=2020-resolver. We can also see this in several of our builds that install pytest on Linux-based CI pipelines where we install using pip install --use-feature=2020-resolver ... (link above). If not using the new resolver, then I get the same output as you, @ntarocco.

Will try to git bisect to find out where this comes from…

@domdfcoding
Copy link

I believe the issue is caused by 848ea5a, which removed setuptools_scm as a build requirement, meaning setuptools can no longer determine the version number from the git tag.

@florimondmanca
Copy link
Contributor

florimondmanca commented Oct 14, 2020

I was able to trace it down to this commit: 848ea5a (between 1.0.0 and 1.0.1)

On which I get:

pip install .
Processing /Users/florimond.manca/Desktop/iniconfig
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: iniconfig
  Building wheel for iniconfig (PEP 517) ... done
  Created wheel for iniconfig: filename=iniconfig-0.0.0-py3-none-any.whl size=4214 sha256=1294c1b540bb580162ef535af76e21aaa805924512b203ac14d8c54d2a9ec6bc
  Stored in directory: /private/var/folders/cj/rxdv0rzd56706lx_321wjs800000gn/T/pip-ephem-wheel-cache-l5xkw49q/wheels/d3/bf/5d/2d4271ded7e402a7bcd65d83e19a1c585441e87b93ee984898
Successfully built iniconfig
Installing collected packages: iniconfig
Successfully installed iniconfig-0.0.0

On the previous commit 982a6b3, I get

pip install .
Processing /Users/florimond.manca/Desktop/iniconfig
Using legacy 'setup.py install' for iniconfig, since package 'wheel' is not installed.
Installing collected packages: iniconfig
    Running setup.py install for iniconfig ... done
Successfully installed iniconfig-1.0.1.dev6+g982a6b3

So it looks like 848ea5a, merged via #10, is the culprit?

@florimondmanca
Copy link
Contributor

which removed setuptools_scm as a build requirement

Doesn't seem accurate, since the build requirement is now in pyproject.toml > build-system.requires: https://github.com/RonnyPfannschmidt/iniconfig/pull/10/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R2

However the use_scm_version=True flag was dropped, so maybe that's the root cause of this issue? https://github.com/RonnyPfannschmidt/iniconfig/pull/10/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L20

@florimondmanca
Copy link
Contributor

Yup, adding use_scm_version=True back fixes it:

$ pip install .
Processing /Users/florimond.manca/Desktop/iniconfig
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: iniconfig
  Building wheel for iniconfig (PEP 517) ... done
  Created wheel for iniconfig: filename=iniconfig-1.0.1.dev7+g848ea5a.d20201014-py3-none-any.whl size=4498 sha256=8b829d850afbb7fd68059dcb024ea74e5fe348b4231f1e1624c4d3c4e95f3eff
  Stored in directory: /private/var/folders/cj/rxdv0rzd56706lx_321wjs800000gn/T/pip-ephem-wheel-cache-4a7od81k/wheels/d3/bf/5d/2d4271ded7e402a7bcd65d83e19a1c585441e87b93ee984898
Successfully built iniconfig
Installing collected packages: iniconfig
  Attempting uninstall: iniconfig
    Found existing installation: iniconfig 1.0.1.dev6+g982a6b3
    Uninstalling iniconfig-1.0.1.dev6+g982a6b3:
      Successfully uninstalled iniconfig-1.0.1.dev6+g982a6b3
Successfully installed iniconfig-1.0.1.dev7+g848ea5a.d20201014

Example patch:

index 159e68b..ab298f2 100644
--- a/setup.py
+++ b/setup.py
@@ -14,6 +14,7 @@ def main():
         readme = fp.read()
     setup(
         name='iniconfig',
+        use_scm_version=True,
         py_modules=['iniconfig'],
         description='iniconfig: brain-dead simple config-ini parsing',
         long_description=readme

@Czaki
Copy link

Czaki commented Oct 14, 2020

I also get fail of builds (on readthedocs)

Collecting iniconfig
  Downloading iniconfig-1.1.0.tar.gz (8.1 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
ERROR: Requested iniconfig from https://files.pythonhosted.org/packages/44/39/e96292c7f7068e58877f476908c5974dc76c37c623f1fa332fe4ed6dfbec/iniconfig-1.1.0.tar.gz#sha256=150a59361017218f4621a68ea9984772675a7f6e074ff7d02e115152f1804dc6 (from pytest->-r requirements/requirements_test.txt (line 1)) has different version in metadata: '0.0.0'

@stephanschielke
Copy link

Pinning the version in our requirements works for us as a temporary hotfix.
iniconfig==1.0.0

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 a pull request may close this issue.

5 participants