poetry2nix icon indicating copy to clipboard operation
poetry2nix copied to clipboard

Symbolic links ignored when building a python package

Open lenianiva opened this issue 1 year ago • 1 comments

Describe the issue

I have a project structured like this

|- proto
|   |- interface.capnp
|- python
|   |- {pyproject.toml, poetry.lock, ...}
|   |- projectname
|   |   |- __init__.py
|   |   |- interface.capnp -> ../../proto/interface.capnp

The file python/projectname/interface.capnp is a symbolic link to proto/interface.capnp.

This is when the issue arises. With the project structure as-is, building the project directly would give a python package that does not have the interface.capnp, because poetry does not do it by default

On the other hand, I could devise a build script that copies proto/interface.capnp to python/projectname/interface.capnp, but this would require python/projectname/interface.capnp (a copy of an existing file) be checked into the project repository.

lenianiva avatar Feb 07 '24 13:02 lenianiva