Skip to content
Snippets Groups Projects
Commit d87523fc authored by Stuart Prescott's avatar Stuart Prescott Committed by Stefano Rivera
Browse files

Teach dh_python3 to merge .dist-info directories

When building for multiple interpreters, the wheel info in .dist-info varies
and so dh_python3 would normally leave files behind in /usr/lib/pythonX.Y/.

With this adaptation to dh_python3, the contents of the .dist-info directories
will be merged:

 - WHEEL file: the Tag line that indicates the architecture the wheel was
   built for is copied across. The Tag line can be repeated for multiple
   build tags.
   https://github.com/pypa/wheel/blob/7ab18e4eb9ab30f60a82fad33357be666ca26637/src/wheel/cli/pack.py#L42

 - RECORD file: additional files that are only in one wheel are added to the
   index (for .so files that differ between interpreters). The sha256 hash
   of the WHEEL file is also inside RECORD and that must be updated if the
   WHEEL file was changed to include multiple Tag lines.

These changes are aimed mostly at modules where C extensions are build and so
the contents of the wheel varies according to which interpreter was used.
When there's only one interpreter version in the archive, only one interpreter
version supported by the package, or the package is pure Python, this code
should not be invoked at all.
parent 5317bb85
No related branches found
No related tags found
1 merge request!21generic PEP517 plugin for pybuild (alternate build+unpack, test, copy approach)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment