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

1.31.0: create temporary directory in source tree trashes pep517 build #151

Open
kloczek opened this issue Mar 31, 2024 · 4 comments
Open

Comments

@kloczek
Copy link

kloczek commented Mar 31, 2024

Looks like some bits in pyproject.toml are still missing and create some termopary directory before start build trashes pep517 build.

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
error: Multiple top-level packages discovered in a flat-layout: ['pg8000', 'SPECPARTS'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel

In this case during package using rpm is created SPECPARTS directory.

@tlocke
Copy link
Owner

tlocke commented Apr 1, 2024

Hi @kloczek, I tried to reproduce the problem by downloading the source distribution from https://files.pythonhosted.org/packages/70/0f/b3b82c2ab2eaa1df73ea8070d7cb78f6c24e3490c810a6f7bdd222118c6b/pg8000-1.31.0.tar.gz Then I did the following commands:

tar -xzf pg8000-1.31.0.tar.gz
cd pg8000-1.31.0/
python3 -m venv venv
source venv/bin/activate
pip install build
python -m build 

and this completed successfully, so I think I must have done something different to you?

@kloczek
Copy link
Author

kloczek commented Apr 1, 2024

Please try:

tar -xzf pg8000-1.31.0.tar.gz
cd pg8000-1.31.0/
mkdir TEMP                                # <<<< HERE
python3 -m venv venv
source venv/bin/activate
pip install build
python -m build 

@tlocke
Copy link
Owner

tlocke commented Apr 1, 2024

Ah, I see now. I've done a new release 1.31.1, which uses a file layout where all the source files are within a src directory, and so building should work now if there are extra top-level directories.

@kloczek
Copy link
Author

kloczek commented Apr 1, 2024

👍
it would be good to switch from versioningit tohatch-vcs. (which is native for hatchling) as well as versioningit has some issues on building without git metadata.
#152

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

No branches or pull requests

2 participants