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

Keep the link when building wheels. #453

Closed
wqh17101 opened this issue Apr 14, 2022 · 9 comments
Closed

Keep the link when building wheels. #453

wqh17101 opened this issue Apr 14, 2022 · 9 comments

Comments

@wqh17101
Copy link

Hi there,
I have a dir to pack. And there are some links in it.Like

a.so
a.so.1 -> a.so
b.so
b.so.1 -> b.so

but when i build wheels, it generated a package that

a.so
a.so.1 
b.so
b.so.1

It lost their links. It cause that the size of package is double than expected.

@wqh17101
Copy link
Author

Maybe

with open(filename, "rb") as f:
cause the problem.

@agronholm
Copy link
Contributor

The wheel spec does not have a specified way to describe symbolic links in RECORD. Besides, symlinks are not properly supported on Windows, causing potential compatibility conflicts. If you wish to get a decision about symlink support, I suggest that you open a new discussion in the packaging forum of discuss.python.org.

@pfmoore
Copy link
Member

pfmoore commented Apr 14, 2022

There's an existing discussion here. Better to contribute there than to open a new topic and split the conversation.

@leofang
Copy link

leofang commented Jul 19, 2022

xref: #203

@rgommers
Copy link

rgommers commented Dec 8, 2022

Here is another use case besides shipping shared libraries: support for editable installs when the build system uses out-of-place builds. Out-of-place builds are the only option in Meson, and also good practice for CMake. For out-of-place builds, you ends up with compiled extension modules and generated files in the build directory, and .py files in the source directory. To put those together into a working editable install, the most straightforward solution is putting symlinks to all files in a wheel and installing those. xref mesonbuild/meson-python#47 for more details.

@agronholm
Copy link
Contributor

There's no point in asking for this here, when the wheel spec itself doesn't even support symlinks. If that is ever added to the spec, a new issue should be created.

@agronholm agronholm closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2022
@rgommers
Copy link

rgommers commented Dec 8, 2022

@agronholm I just provided a second use case, which seemed to be missing so far. Guess I'll take it over to the Discourse thread.

You may want to close gh-400 as well.

@pfmoore
Copy link
Member

pfmoore commented Dec 8, 2022

@rgommers Symlink support in wheels seems to me like a very useful thing to have. But as @agronholm says, it's not currently part of the wheel spec, so it would need a PEP and a new wheel version. You might be interested in this post I just made, and its associated thread, as well as the thread I linked to previously.

@rgommers
Copy link

rgommers commented Dec 8, 2022

@pfmoore thanks! Our comments just crossed paths, I posted it in the Discourse thread you linked above. I'll keep an eye on both threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants