Skip to content

Preserve the executable bit from wheel contents #90

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

Merged
merged 1 commit into from
Jan 19, 2022

Conversation

pradyunsg
Copy link
Member

This is a property of individual files in the wheel, and thus needs to be parsed
by the WheelSource, and needs special handling in WheelDestination. It also
needs to be propagated through the entire pipeline, since the information needs
to be exchanged between the two components.

Closes #68

This is a property of individual files in the wheel, and thus needs to be parsed
by the `WheelSource`, and needs special handling in `WheelDestination`. It also
needs to be propagated through the entire pipeline, since the information needs
to be exchanged between the two components.
@davidfritzsche
Copy link

@pradyunsg This feature would be very helpful for a project I'm working on for $WORK. Thanks for the great installer tool.

@frostming
Copy link
Contributor

May I know when will this fix be released?

import zipfile
from contextlib import contextmanager
from typing import BinaryIO, Iterator, List, Tuple, cast

import installer.records
import installer.utils

WheelContentElement = Tuple[Tuple[str, str, str], BinaryIO]
WheelContentElement = Tuple[Tuple[str, str, str], BinaryIO, bool]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YMMV, but when I add the third field, I tend to start wondering if it would be clearer with a dataclass rather than a tuple.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I had the same thought too. :)

However, I want this to be decoupled such that the source can be implemented without a dependency on this package. I'm basically thinking that wheel would end up implementing this interface, in their public API, and then we'd have a nice amount of synergy.

@pradyunsg
Copy link
Member Author

May I know when will this fix be released?

Sometime next month. Most of my OSS time this month is gonna go into pip's release.

@pradyunsg pradyunsg merged commit 2458962 into main Jan 19, 2022
@pradyunsg pradyunsg deleted the preserve-executable-bit branch January 19, 2022 20:10
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 this pull request may close these issues.

The executable bit is lost for scripts in data directory
4 participants