poetry2nix
poetry2nix copied to clipboard
Symbolic links ignored when building a python package
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.