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

Cannot build wheel for package due to folder name being different to package name #831

Closed
willh-cmyk opened this issue Apr 11, 2024 · 3 comments
Labels

Comments

@willh-cmyk
Copy link
Contributor

Bug description

I'm getting this error when building wheels for my multistage docker build:

ValueError: Unable to determine which files to ship inside the wheel using the following heuristics: https://hatch.pypa.io/latest/plugins/builder/wheel/#default-file-selection

The most likely cause of this is that there is no directory that matches the name of your project (jupyterhub_kubespawner).

At least one file selection option must be defined in the `tool.hatch.build.targets.wheel` table, see: https://hatch.pypa.io/latest/config/build/

As an example, if you intend to ship a directory named `foo` that resides within a `src` directory located at the root of your project, you can define the following:

[tool.hatch.build.targets.wheel]
packages = ["src/foo"]

How to reproduce

Run the following:

pip wheel -- no-binary :all: --no-deps --wheel-dir=/tmp/wheels jupyterhub_kubespawner==6.2.0

Expected behaviour

The wheel to build successfully and the .whl file to be written to /tmp/wheels.

Actual behaviour

The command fails because the package name is different to the folder name. The package name is jupyterhub_kubespawner and the folder name is kubespawner.

Your personal set up

  • OS:
  • Version(s): Ubuntu 22.04.4

Jupyterhub:

  • Version(s): 4.1.5

Python:

  • Version(s): 3.11.5
Full environment

I can't provide this information.

@willh-cmyk willh-cmyk added the bug label Apr 11, 2024
Copy link

welcome bot commented Apr 11, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@willh-cmyk
Copy link
Contributor Author

PR request to fix submitted here: #832

@consideRatio
Copy link
Member

@willh-cmyk thank you!!! ❤️ 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants