Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
286 views
in Technique[技术] by (71.8m points)

How to include symlinks and the linked file in a python wheel using Poetry?

I have a python package that I want to include some specific files from a submodule without including the entire package, so the structure looks like:

foo_project
 |
 +-- submodule_files
     +-- bar.json
     +-- other_stuff
 +-- foo
     +-- __init__.py
     +-- foo.py
     +-- <symlink to bar.json>

The poetry toml file has

packages = [
    { include = "foo" }
]

When the wheel is created using poetry build, the linked files are copied, but not the links themselves

 foo_wheel
 |
 +-- submodule_files
     +-- bar.json
 +-- foo
     +-- __init__.py
     +-- foo.py

(left out info directory in wheel for brevity)

Therefore once installed, the python package is missing the extra files


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...