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

packing fails because of metadata change and outdated pkginfo version #122

Closed
mj0nez opened this issue May 20, 2024 · 2 comments · Fixed by #124
Closed

packing fails because of metadata change and outdated pkginfo version #122

mj0nez opened this issue May 20, 2024 · 2 comments · Fixed by #124

Comments

@mj0nez
Copy link
Owner

mj0nez commented May 20, 2024

A failed CI run:

Run tox -e test_packaging
  tox -e test_packaging
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.11.9/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.9/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.9/x64/lib
test_packaging: install_deps> python -I -m pip install -r dev_requirements/requirements-packaging.txt
test_packaging: freeze> python -m pip freeze --all
test_packaging: bleach==6.0.0,build==1.2.1,certifi==2023.7.22,cffi==1.15.1,charset-normalizer==3.1.0,cryptography==41.0.6,docutils==0.20.1,idna==3.4,importlib-metadata==6.7.0,jaraco.classes==3.2.3,jeepney==0.8.0,keyring==23.13.1,markdown-it-py==3.0.0,mdurl==0.1.2,more-itertools==9.1.0,packaging==23.1,pip==24.0,pkginfo==1.9.6,pycparser==2.21,Pygments==2.15.1,pyproject_hooks==1.0.0,readme-renderer==37.3,requests==2.31.0,requests-toolbelt==1.0.0,rfc3986==2.0.0,rich==13.4.2,SecretStorage==3.3.3,setuptools==69.5.1,six==1.16.0,twine==5.1.0,urllib3==2.0.7,webencodings==0.5.1,wheel==0.43.0,zipp==3.15.0
test_packaging: commands[0]> python -m build
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - hatch-fancy-pypi-readme
  - hatch-vcs
  - hatchling>=1.8.0
* Getting build dependencies for sdist...
* Building sdist...
/tmp/build-env-d_2jz3yr/lib/python3.11/site-packages/setuptools_scm/git.py:167: UserWarning: "/home/runner/work/bdew-datetimes/bdew-datetimes" is shallow and may cause errors
  warnings.warn(f'"{wd.path}" is shallow and may cause errors')
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - hatch-fancy-pypi-readme
  - hatch-vcs
  - hatchling>=1.8.0
* Getting build dependencies for wheel...
* Building wheel...
Successfully built bdew_datetimes-0.1.dev1+g08179a6.tar.gz and bdew_datetimes-0.1.dev1+g08179a6-py3-none-any.whl
test_packaging: commands[1]> twine check 'dist/*'
Checking dist/bdew_datetimes-0.1.dev1+g08179a6-py3-none-any.whl: ERROR    InvalidDistribution: Metadata is missing required fields: Name,        
         Version.                                                               
         Make sure the distribution includes the files where those fields are   
         specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2,   
         2.0, 2.1, 2.2.                                                         
test_packaging: exit 1 (0.42 seconds) /home/runner/work/bdew-datetimes/bdew-datetimes> twine check 'dist/*' pid=1837
  test_packaging: FAIL code 1 (11.32=setup[6.78]+cmd[4.12,0.42] seconds)
  evaluation failed :( (11.47 seconds)
Error: Process completed with exit code 1.

Some other issue describing the bug: pypa/twine#1059

@hf-kklein
Copy link
Contributor

pip-compile --upgrade requirements-packaging.in

should fix it.

See e.g. Hochfrequenz/python_template_repository@a6d4a82 and many other Hochfrequenz repos ;)

We all used the same template, we all faced the same problem.

@mj0nez
Copy link
Owner Author

mj0nez commented Jun 16, 2024

Took me a moment to see the wrong name in the action :)

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.

2 participants