jupyterhub / kubespawner

Kubernetes spawner for JupyterHub
https://jupyterhub-kubespawner.readthedocs.io
BSD 3-Clause "New" or "Revised" License
531 stars 299 forks source link

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

Closed willh-cmyk closed 2 months ago

willh-cmyk commented 2 months ago

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

Python:

Full environment I can't provide this information.
welcome[bot] commented 2 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
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! :wave:
Welcome to the Jupyter community! :tada:

willh-cmyk commented 2 months ago

PR request to fix submitted here: https://github.com/jupyterhub/kubespawner/pull/832

consideRatio commented 2 months ago

@willh-cmyk thank you!!! :heart: :tada: