Skip to content
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

Fixing an installation issue #27

Merged
merged 2 commits into from
Dec 14, 2023
Merged

Fixing an installation issue #27

merged 2 commits into from
Dec 14, 2023

Conversation

H-Dempsey
Copy link
Contributor

@H-Dempsey H-Dempsey commented Dec 13, 2023

Hi @hkchengrex,

I just tried to use your Google Colab notebook, and I ran into this error after running pip install -e .

Obtaining file:///content/Cutie
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  error: subprocess-exited-with-error
  
  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing editable metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I discovered that there is a breaking change for hatchling>=1.19.0.
This pull request changes hatchling to version 1.18.0, rather than making it the most recent version.
This fixed my installation issue.

This tool has been incredibly useful to me, thank you for making this.

Harry

There is a breaking change with hatchling>=1.19.0 (pypa/hatch#1130). This commit keeps hatchling at 1.18.0.
@ofek
Copy link

ofek commented Dec 13, 2023

@hkchengrex
Copy link
Owner

Hello @H-Dempsey, thank you for the pull request.
From the linked issue, it appears to me that the error is related to force-include -- which we do not use so I am a little confused.

This allows the latest version of hatchling to work on this project. An error is raised is there are no file selection options. I have added in the file selection options.

https://github.com/pypa/hatch/releases/tag/hatchling-v1.19.0
@H-Dempsey
Copy link
Contributor Author

Hi all,

I am sorry, I should have created a pull request that addressed the issue for the latest version of hatchling, rather than specifying an earlier version.
Thank you for your comment @ofek.

I ended up creating a link to the wrong issue.
Here is a fix to a similar issue that has also worked for me with the latest version of hatchling.

All I had to do was add the following to the pyproject.toml file.
From hatchling>=1.19.0, we need to specify the file selection options.

[tool.hatch.build.targets.wheel]
packages = ["cutie"]

The Colab installation works for me now!

Harry

@hkchengrex
Copy link
Owner

Makes sense. Thanks a lot, Harry.

@hkchengrex hkchengrex merged commit 59d9413 into hkchengrex:main Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants