最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

pip - python venv install skips component file "pointer.png" - Stack Overflow

programmeradmin3浏览0评论

This is a strange issue. I maintain the pi3d python module and it contains this file github/tipam/pi3d/blob/master/src/pi3d/util/icons/pointer.png

When I clone the repo locally it has the .png file but when the package is installed using pip it seems to be missing. This didn't used to be a problem. Is it something to do with the fact that pip insists on installing to a venv now, i.e. if I made pip install with --no-warn-script-location would it include the missing file?

This is a strange issue. I maintain the pi3d python module and it contains this file github/tipam/pi3d/blob/master/src/pi3d/util/icons/pointer.png

When I clone the repo locally it has the .png file but when the package is installed using pip it seems to be missing. This didn't used to be a problem. Is it something to do with the fact that pip insists on installing to a venv now, i.e. if I made pip install with --no-warn-script-location would it include the missing file?

Share Improve this question asked Feb 15 at 16:59 paddygpaddyg 2,24521 silver badges25 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

It's because it's not present in tool.setuptools.package-data in pyproject.toml file.

[tool.setuptools.package-data]
"*" = ["*.fs", "*.vs", "*.inc", "*.gif"]

With the previous configuration, you add all this extensions in your package as you can see in the next screenshot (content of the package uploaded on pypi).

So adding the png extension should work:

[tool.setuptools.package-data]
"*" = ["*.fs", "*.vs", "*.inc", "*.gif", "*.png"]
发布评论

评论列表(0)

  1. 暂无评论