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

Fix editable install on windows #3117

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Fix editable install on windows #3117

merged 1 commit into from
Sep 27, 2024

Conversation

ankith26
Copy link
Member

An (untested) attempt to making editable installs work on windows.

Basically the idea is to special case the DLL handling code which already exists, to handle editable installs differently. With an editable install no DLL moving happens, so we just have to hunt for the DLLs in the source tree and track the folders.

@ankith26 ankith26 requested a review from a team as a code owner September 23, 2024 15:02
@ankith26 ankith26 force-pushed the ankith26-fix-editable branch from 18a496c to 54487ce Compare September 23, 2024 15:25
@ankith26
Copy link
Member Author

I just tested this on a fresh Windows 11 VM and it seems to work okay

src_py/__init__.py Outdated Show resolved Hide resolved
src_py/__init__.py Outdated Show resolved Hide resolved
@ankith26 ankith26 force-pushed the ankith26-fix-editable branch from 54487ce to d35a672 Compare September 23, 2024 19:51
@ankith26
Copy link
Member Author

While this strategy works, I believe it can be improved further. I'll experiment with this a bit more.

@ankith26 ankith26 force-pushed the ankith26-fix-editable branch from d35a672 to 9a2c587 Compare September 24, 2024 11:48
@ankith26 ankith26 force-pushed the ankith26-fix-editable branch from 9a2c587 to 98170b3 Compare September 24, 2024 12:04
@ankith26
Copy link
Member Author

Okay, I think this PR should be done from my side.

The new strategy basically makes the meson buildconfig keep track of the DLL dirs in a JSON file, and then at runtime this file can be handled if it is available (in the editable case only)

Copy link
Contributor

@bilhox bilhox left a comment

Choose a reason for hiding this comment

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

Tested on Windows, and it works fine, thanks for the PR!

@bilhox bilhox added this to the 2.5.2 milestone Sep 27, 2024
Copy link
Member

@oddbookworm oddbookworm left a comment

Choose a reason for hiding this comment

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

LGTM!

@oddbookworm oddbookworm merged commit ddc900e into main Sep 27, 2024
24 checks passed
@damusss damusss deleted the ankith26-fix-editable branch September 27, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants