Skip to content

ENH: add support for symbolic links in package repository #728

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dnicolodi
Copy link
Member

@dnicolodi dnicolodi commented Mar 30, 2025

Symbolic links are included as regular files in the sdist archive. Only symbolic links pointing to files withing the archive are supported. Replaces #713.

@dnicolodi dnicolodi force-pushed the sdist-symlinks branch 2 times, most recently from ef8925e to 9ac7f0a Compare March 30, 2025 14:11
@rgommers rgommers added the enhancement New feature or request label Apr 24, 2025
Copy link
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @dnicolodi, this looks pretty good to me. The one thing I'd suggest is to emit warnings for symlinks that get ignored, rather than silently skipping over them. Something like:

WARNING: symlink pointing outside package ignored: symlinks-1.0.0/baz.py

WDYT?

@dnicolodi
Copy link
Member Author

I think the warning is a good idea. Probably it is a good idea to warn also for other archive members that are not handled: anything that is not a file and symbolic links to directories even if withing the archive. The reason for not adding the warning was that the latest release that (accidentally) supported symlinks didn't warn either. I'll add the warnings.

@dnicolodi dnicolodi force-pushed the sdist-symlinks branch 3 times, most recently from de51b39 to 4365161 Compare April 24, 2025 20:50
@dnicolodi
Copy link
Member Author

Warnings added.

Symbolic links are included as regular files in the sdist archive.
Only symbolic links pointing to files withing the archive are
supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants