Skip to content

Is it allowed to build packages that contain symlinks to external files? #683

Answered by takluyver
kalekundert asked this question in Q&A
Discussion options

You must be logged in to vote

I'd be inclined to say it's a fluke that it worked with pip. I'd guess the difference is that flit build and python -m build both build an sdist first, then unpack that and build the wheel from that, whereas pip probably builds a wheel directly from the source tree you point it to.

One difficulty here is that the packaging tools don't know what you want a symlink to mean. In your explanation, it's clear that you want the symlink to be materialised in the packaged/installed files, but someone else might put a symlink inside their source code and expect it to still be a symlink when it's installed. It could also potentially be a security risk - if I prepare a git repo or an sdist containing…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@kalekundert
Comment options

@takluyver
Comment options

Answer selected by kalekundert
Comment options

You must be logged in to vote
1 reply
@kalekundert
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants