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: cleanup stale artifacts on compilation #53

Open
trim21 opened this issue May 31, 2024 · 2 comments
Open

fix: cleanup stale artifacts on compilation #53

trim21 opened this issue May 31, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@trim21
Copy link

trim21 commented May 31, 2024

I'm using hatch-cython with cibuildwheel, and wheel include extra so/pyd files.

Looks like there are some bug in cleanup code.

This is not a big problem, because python will only import file with currect version tag...

image

image

@trim21 trim21 changed the title cleanup broken on windows cleanup broken May 31, 2024
@joshua-auchincloss
Copy link
Owner

Hey @trim21, thanks for reporting this! Agree, I think the cleanup process could be improved on. At the moment, I think you have to run hatch clean against the project to clean up {.so,.pxd} artifacts. In an ideal world, we would clean up your artifacts prior to packaging only leaving the specified targets from c & cython compilations in the wheel.

Quick q so I can look at the version this impacts, which distribution version are you using?

@trim21
Copy link
Author

trim21 commented Jun 3, 2024

I didn't set a version number so I guess I'm using latest version of hatch-cython

https://github.com/trim21/bencode-py/blob/c6141c555affb5c4c956f0432d14a8427bac9d26/pyproject.toml#L57

for workaround, I write a cleanup script to let cibuildwheel run it before building.

https://github.com/trim21/bencode-py/blob/bac01bcb0f73737b82ddffd18b7d068430eae3a0/cleanup.py

@joshua-auchincloss joshua-auchincloss changed the title cleanup broken fix: cleanup stale artifacts on compilation Jun 6, 2024
@joshua-auchincloss joshua-auchincloss added enhancement New feature or request good first issue Good for newcomers labels Jun 6, 2024
@joshua-auchincloss joshua-auchincloss self-assigned this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants