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

Invalid wheel filename if version contains some extra text part #383

Closed
WojciechMula opened this issue Dec 3, 2020 · 3 comments · Fixed by #395
Closed

Invalid wheel filename if version contains some extra text part #383

WojciechMula opened this issue Dec 3, 2020 · 3 comments · Fixed by #395

Comments

@WojciechMula
Copy link

Hi, consider a version like "1.0.0-dev0+test.feature.1", which matches PEP 440. The problem is that flit yields filename "project-1.0.0-dev0_test.feature.1.py-wheel-all.whl" -- the '+' sign is replaced with '_'. Such filename is rejected by pypi server with message: "filename project-1.0.0-dev0_test.feature.1.py-wheel-all.whl does not contain version "1.0.0-dev0+test.feature.1".

I believe this is exactly the same problem poetry had: python-poetry/poetry#756.

@grst
Copy link

grst commented Jan 30, 2021

Same issue here! Here's a repex:

git clone https://github.com/grst/wheel-bug.git
cd wheel-bug
flit install
Extras to install for deps 'all': {'.none'}                                                                                                                                                                                                                                                                                                                    I-flit.install
Processing /home/sturm/projects/2021/wheel-bug
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: testpkg
  Building wheel for testpkg (PEP 517) ... done
  Created wheel for testpkg: filename=testpkg-0.6.1.dev5_ga652c20-py3-none-any.whl size=1181 sha256=cb8856b9035b1cf8021533a8ce7a07f02402c942603ce53e17a5ceea7e9cd787
  Stored in directory: /home/sturm/.cache/pip/wheels/34/c8/42/38155569da3179727ba8f011d468b6a0e6f789986ec22ae3d0
  WARNING: Built wheel for testpkg is invalid: Wheel has unexpected file name: expected '0.6.1.dev5+ga652c20', got '0.6.1.dev5-ga652c20'
Failed to build testpkg
ERROR: Could not build wheels for testpkg which use PEP 517 and cannot be installed directly
Traceback (most recent call last):
  File "/home/sturm/anaconda3/envs/test_flit/bin/flit", line 10, in <module>
    sys.exit(main())
  File "/home/sturm/anaconda3/envs/test_flit/lib/python3.8/site-packages/flit/__init__.py", line 170, in main
    Installer.from_ini_path(args.ini_file, user=args.user, python=python,
  File "/home/sturm/anaconda3/envs/test_flit/lib/python3.8/site-packages/flit/install.py", line 415, in install
    self.install_with_pip()
  File "/home/sturm/anaconda3/envs/test_flit/lib/python3.8/site-packages/flit/install.py", line 353, in install_with_pip
    check_call(cmd, shell=shell)
  File "/home/sturm/anaconda3/envs/test_flit/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/sturm/anaconda3/envs/test_flit/bin/python3.8', '-m', 'pip', 'install', '.']' returned non-zero exit status 1.

@flying-sheep
Copy link
Contributor

flying-sheep commented Feb 11, 2021

Yup, this is a huge problem, it means that people can’t use flit in CI.

Fixed in #388

@takluyver
Copy link
Member

I believe pip is going against the spec here. I've filed an issue in pip to discuss it: pypa/pip#9628

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.

4 participants