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

Make wheel header installation test more explicit #8534

Merged
merged 3 commits into from
Jul 8, 2020

Conversation

chrahunt
Copy link
Member

@chrahunt chrahunt commented Jul 3, 2020

We have one test that headers in a wheel are handled correctly. Previously, this test was just checking that the .dist-info folder was getting created. Now we check that the header file is actually installed. I also took the opportunity to replace a custom-created wheel with our make_wheel helper.

For reference, the contents of the removed tests/data/packages/headers.dist-0.1-py2.py3-none-any.whl:

-------------------------------- headersdist.py --------------------------------

-------------------- headers.dist-0.1.data/headers/header.h --------------------

------------------- headers.dist-0.1.dist-info/metadata.json -------------------
{"license": "UNKNOWN", "name": "headers.dist", "metadata_version": "2.0", "author": "UNKNOWN", "home_page": "UNKNOWN", "summary": "A distribution with headers", "author_email": "UNKNOWN", "version": "0.1", "platform": "UNKNOWN"}
----------------------- headers.dist-0.1.dist-info/WHEEL -----------------------
Wheel-Version: 1.0
Generator: bdist_wheel
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any


--------------------- headers.dist-0.1.dist-info/METADATA ----------------------
Metadata-Version: 2.0
Name: headers.dist
Version: 0.1
Summary: A distribution with headers
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Platform: UNKNOWN

UNKNOWN



---------------------- headers.dist-0.1.dist-info/RECORD -----------------------

headersdist.py and metadata.json did not seem relevant to the current test, so they have been omitted in the wheel we now construct at runtime.

Progresses #6030.

@chrahunt chrahunt added type: refactor Refactoring code skip news Does not need a NEWS file entry (eg: trivial changes) labels Jul 3, 2020
@chrahunt chrahunt changed the title Thoroughly test header installation Make wheel header installation test more explicit Jul 3, 2020
Since this is the special part of this test. This gives us more
confidence that we're doing the right thing when removing the standalone
wheel file next.
This is a little more specific than checking that we happened to create
an already-empty file, and is a better mirror for reality.
@chrahunt chrahunt force-pushed the thoroughly-test-header-installation branch from bd9b536 to b5f02f9 Compare July 4, 2020 18:24
@chrahunt chrahunt marked this pull request as ready for review July 4, 2020 19:12
@chrahunt
Copy link
Member Author

chrahunt commented Jul 8, 2020

Thank you for reviewing!

@chrahunt chrahunt merged commit 2f9b50c into pypa:master Jul 8, 2020
@chrahunt chrahunt deleted the thoroughly-test-header-installation branch July 8, 2020 21:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip news Does not need a NEWS file entry (eg: trivial changes) type: refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants