Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

build fails to build the wheel for the archspec project #628

Closed
yurivict opened this issue Jun 26, 2023 · 7 comments
Closed

build fails to build the wheel for the archspec project #628

yurivict opened this issue Jun 26, 2023 · 7 comments

Comments

@yurivict
Copy link

We use the tarball https://pypi.org/packages/source/a/archspec/archspec-0.2.1.tar.gz from PYPI.

This command builds the wheel file:

cd /usr/ports/devel/py-archspec/work-py39/archspec-0.2.1 && /usr/bin/env XDG_DATA_HOME=/usr/ports/devel/py-archspec/work-py39 XDG_CONFIG_HOME=/usr/ports/devel/py-archspec/work-py39 XDG_CACHE_HOME=/usr/ports/devel/py-archspec/work-py39/.cache HOME=/usr/ports/devel/py-archspec/work-py39 PATH=/usr/local/libexec/ccache:/usr/ports/devel/py-archspec/work-py39/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/usr/ports/devel/py-archspec/work-py39/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " MANPREFIX="/usr/local" CCACHE_DIR="/tmp/.ccache" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" /usr/local/bin/python3.9 -m build --no-isolation --wheel

The resulting wheel file doesn't contain any project files:

[yuri@yv /usr/ports/devel/py-archspec]$ tar tzf ./work-py39/archspec-0.2.1/dist/archspec-0.2.1-py3-none-any.whl
archspec/json/.git
archspec-0.2.1.dist-info/METADATA
archspec-0.2.1.dist-info/WHEEL
archspec-0.2.1.dist-info/entry_points.txt
archspec-0.2.1.dist-info/RECORD

pip install -U archspec installs all archspec files correctly.

build-0.10.0
Python-3.9
FreeBSD 13.2

@layday
Copy link
Member

layday commented Jun 26, 2023

Same as #570 (comment)?

@yurivict
Copy link
Author

The .gitignore file in the root of the repository has:

/*/*/work
/*/*/work-*

This is supposed to only affect x/y/work and x/y/work-xx.
Why does it matter for deeper work* files in the build directories? .gitignore doesn't prescribe to ignore these.

@yurivict
Copy link
Author

The core reason is a bug in Poetry that they didn't fix for a long time: python-poetry/poetry#5547

@layday
Copy link
Member

layday commented Jun 26, 2023

Why does it matter for deeper work* files in the build directories?

What do you mean? If you are ignoring /x/y/work then by extension you are ignoring /x/y/work/**.

@yurivict
Copy link
Author

I agree.

Then Poetry shouldn't parse any .gitignore files because the project isn't built from the git repository, and the .gitignore files up in the hierarchy are irrelevant.

@henryiii
Copy link
Contributor

Parsing the .gitignore isn't wrong, it's a great and stable default - but looking up the tree and parsing .gitignores above the project is (at least by default!).

@jameshilliard
Copy link
Contributor

looking up the tree and parsing .gitignores above the project is (at least by default!)

Yeah, so searching up the tree until a .git directory is found is how git was designed to work, what poetry forgot to add is a sanity check to determine if the build directory is actually tracked by git or not. Adding a simple sanity check like python-poetry/poetry-core#611 should prevent poetry from matching a bogus parent .git directory path.

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

No branches or pull requests

4 participants