setup.py generated by `poetry build` does not have included file in package_data
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
OS version and name: Ubuntu 19.04
-
Poetry version: 0.12.17
Issue
I have a web project that builds a static JS file, which I have explicitly ignored in my .gitignore
file, but that I do want to include in builds of my project. Adding that file to the include
directive in my pyproject.toml
works correctly in that the file is included in the sdist tar, HOWEVER, it’s missing from the package_data
entry in the generated setup.py
, so when I install the package, the file is not included and the installed package is broken.
Here’s the setup. I have two files in a package sub-directory:
web/static
|-- app.js
|-- utils.js
Then in .gitignore
this line:
web/static/app.js
In pyproject.toml
:
packages = [
{include = "web"}
]
include = ["web/static/app.js"]
Running poetry build -f sdist
succeeds. But then setup.py
looks like this:
packages = \
['web']
package_data = \
{'': ['*'],
'web': ['static/utils.js']}
I would expect that a file specified in include
would have an entry there, or be covered by another rule, but that’s not the case and it breaks things for me.
Let me know if you need more info or how I can help. Poetry is awesome.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:31
- Comments:28 (8 by maintainers)
Top GitHub Comments
I’m having the same issue.
@abn just wanted say a big THANK YOU! I really appreciate the well thought out responses. Poetry is in good hands.