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

1.2.17 pypi ships without LICENSE.rst file. #83

Closed
Odilhao opened this issue Jan 26, 2025 · 3 comments · Fixed by #84
Closed

1.2.17 pypi ships without LICENSE.rst file. #83

Odilhao opened this issue Jan 26, 2025 · 3 comments · Fixed by #84

Comments

@Odilhao
Copy link

Odilhao commented Jan 26, 2025

Looks like starting with version 1.2.16, the pypi tar.gz distribution is not shipping with LICENSE.rst is this expected?

We just caught this up in our automation at Foreman.

tar -tvf deprecated-1.2.17.tar.gz | grep LICENSE

tar -tvf deprecated-1.2.16.tar.gz | grep LICENSE

tar -tvf deprecated-1.2.15.tar.gz | grep LICENSE
-rw-r--r-- laurent/staff  1081 2024-11-14 09:48 deprecated-1.2.15/LICENSE.rst
@laurent-laporte-pro
Copy link
Owner

laurent-laporte-pro commented Jan 27, 2025

Hi @Odilhao,

Thank you for reporting this issue.

During the build process for the .tar.gz and .whl packages of the Deprecated project, I encountered a compatibility issue related to the LICENSE.rst file. Specifically, the presence of this file caused a problem in the wheel. This seems to be tied to the transition in the wheel format from version 2.1 to 2.2 (see the Metadata-Version: 2.2 field in the METADATA file within dist-info).

At the time, removing the LICENSE.rst file allowed the build to succeed, which is why the recent releases omitted it. However, it seems this approach is not sufficient, as it has introduced an issue to build the Fedora package in automation.

After investigating, I believe the issue was caused by an outdated Deprecated.egg-info directory during the build process. I’ve since cleaned up the environment, rebuilt the packages, and confirmed that the problem is resolved.

I will release version v1.2.18 shortly, which will include the missing LICENSE.rst file. Thank you for catching this, and I appreciate your patience.

Regards

@laurent-laporte-pro
Copy link
Owner

Actually, I still have the issue when publishing on PyPi (test) with uv:

% uv publish --index testpypi                                           
warning: `uv publish` is experimental and may change without warning
Publishing 2 files https://test.pypi.org/legacy/
Enter username ('__token__' if using a token): __token__
Enter password: 
Uploading deprecated-1.2.17-py2.py3-none-any.whl (9.8KiB)
error: Failed to publish `dist/Deprecated-1.2.17-py2.py3-none-any.whl` to https://test.pypi.org/legacy/
  Caused by: Upload failed with status code 400 Bad Request. Server says: 400 license-file introduced in metadata version 2.4, not 2.2. See https://packaging.python.org/specifications/core-metadata for more information.

But I don’t have the issue with twine:

% twine upload -r testpypi dist/*
Uploading distributions to https://test.pypi.org/legacy/
Uploading Deprecated-1.2.17-py2.py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.5/21.5 kB • 00:00 • 38.7 MB/s
Uploading deprecated-1.2.17.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB • 00:07 • 390.7 kB/s

View at:
https://test.pypi.org/project/Deprecated/1.2.17/

@Odilhao
Copy link
Author

Odilhao commented Jan 27, 2025

Thanks @laurent-laporte-pro , I can see now the package test passing with the addition of LICENSE file.

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