-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install from sdist
using force-include with hatchling>=1.19
#1305
Comments
Just ran into this as well. |
What would you recommend as a fix? |
I think the best way to solve this is to validate that the force-include files exist at their mapped location in the sdist rather than in the source location. E.g. you have the following force-include [tool.hatch.build.targets.sdist.force-include]
"lib/fonts/FooSans" = "src/footest/FooSans"
"lib/stylelib" = "src/footest/stylelib" for the below repo: .
├── README.md
├── lib
│ ├── fonts
│ │ └── FooSans
│ │ └── foo.otf
│ └── stylelib
│ └── foo.mplstyle
├── pyproject.toml
├── src
│ └── footest
│ ├── __init__.py
│ └── __pycache__
│ └── __init__.cpython-310.pyc
└── tox.ini When building a .
├── PKG-INFO
├── README.md
├── pyproject.toml
├── src
│ └── footest
│ ├── FooSans
│ │ └── foo.otf
│ ├── __init__.py
│ └── stylelib
│ └── foo.mplstyle
└── tox.ini Where the moves have already happened. Thus any validation should look for Now, if there is no way to determine if you are building from an Alternatively, don't apply the force-inclusion when building the |
Following up on #1130 since I don't know if its being tracked due to being closed.
I think this issue of being unable to install from
sdist
withforce-includes
forhatchling>=1.19
. Either the toml needs to be configures to install fromsdist
or install fromrepo
, but is currently unable to do both.I created a test repo https://github.com/hguturu/hatching_test/ to reproduce.
The workaround highlighted in #1130 fixes the
dist
problem, but then we are not able to directly install from the repo usingpip install .
.My understanding of why this happening due to the change in
hatchling>=1.19
to not silently fail if force include is missing. #1130 (comment)The text was updated successfully, but these errors were encountered: