You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the source tree contains a directory symlink such as b -> a, then setuptools randomly includes the directory as either a or b (and no symlink). The actual result seems to depend on the filesystem order: if the symlink is created first, then the original directory (i.e. a) is included in the sdist. However, if the symlink is created after the directory, the directory is included as b instead of a.
Expected behavior
I expected the original directory to be preserved in the source distribution at its original location. I don't have a hard opinion whether the symlink should be replaced by a copy of the directory, or be ignored — but it definitely shouldn't cause the original directory to disappear.
Interesting finding!
I think historically, packaging was moving away from symlinks due to wheels needing to be unpacked into file systems that don't support them. But for sdists, it's always been rather undefined. This allowed people to justify not publishing wheels even — we even did this in ansible-core for a very long time.
setuptools version
78.1.0
Python version
3.13.2
OS
Gentoo Linux amd64
Additional environment information
No response
Description
When the source tree contains a directory symlink such as
b -> a
, then setuptools randomly includes the directory as eithera
orb
(and no symlink). The actual result seems to depend on the filesystem order: if the symlink is created first, then the original directory (i.e.a
) is included in the sdist. However, if the symlink is created after the directory, the directory is included asb
instead ofa
.Expected behavior
I expected the original directory to be preserved in the source distribution at its original location. I don't have a hard opinion whether the symlink should be replaced by a copy of the directory, or be ignored — but it definitely shouldn't cause the original directory to disappear.
How to Reproduce
Output
The text was updated successfully, but these errors were encountered: