Closed jenshnielsen closed 6 months ago
Hi,
It looks like a limitation of poetry: https://github.com/python-poetry/poetry/issues/4494
I tried the following configuration from this link https://github.com/chaoss/grimoirelab-toolkit/issues/44#issuecomment-927710018:
include = [
{ path = "AUTHORS.rst", format = "sdist" },
{ path = "LICENSE", format = "sdist" },
{ path = "README.md", format = "sdist" },
]
It does remove the files at the source directory, but AUTHORS.rst
is missing for both wheel and sdist file. LICENSE
is correctly found in site-packages/requirements_parser-0.5.0.dist-info/LICENSE
and README
is in site-packages/requirements_parser-0.5.0.dist-info/METADATA
.
It looks like it could be packaged correctly if the project was using setuptools directly with a custom configuration, instead of relying on poetry for that. https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
@madpah Any suggestion? Could it be packaged without AUTHORS.rst
as a quick fix? If so, I can open a PR for that.
I have the same issue when I try to update the Debian package[1] to 0.0.5.
E: python3-requirement-parser: unknown-file-in-python-module-directory [usr/lib/python3/dist-packages/AUTHORS.rst]
E: python3-requirement-parser: unknown-file-in-python-module-directory [usr/lib/python3/dist-packages/LICENSE]
E: python3-requirement-parser: unknown-file-in-python-module-directory [usr/lib/python3/dist-packages/README.md]
I: python3-requirement-parser: extra-license-file [usr/lib/python3/dist-packages/LICENSE]
I: python3-requirement-parser: package-contains-documentation-outside-usr-share-doc [usr/lib/python3/dist-packages/AUTHORS.rst]
I: python3-requirement-parser: package-contains-documentation-outside-usr-share-doc [usr/lib/python3/dist-packages/LICENSE]
I: python3-requirement-parser: package-contains-documentation-outside-usr-share-doc [usr/lib/python3/dist-packages/README.md]
The solution provided by @FlorentJeannoto fixes the messages above.
[1] https://packages.debian.org/sid/python3-requirement-parser
build backend has not proper functionality for it, yet. a fix depends on https://github.com/python-poetry/poetry/issues/8441
See the attached example of uninstalling requirements-parser
Notice that authors.rst, license and readme.md are uninstalled from the top level dir outside the requirements package. This is problematic since these files are very likely to collide with other projects