wheel icon indicating copy to clipboard operation
wheel copied to clipboard

Cannot configure build base

Open rossburton opened this issue 3 years ago • 1 comments

We want to do 100% out-of-tree builds, before wheel we used setup.py install --build-base ${B}. However now we use bdist_wheel which calls build and install itself, but doesn't support passing a build directory.

There are already bdist_dir and dist_dir arguments, how about consolidating those to a build-base argument which is used to construct those two arguments and also passed to the build/install commands?

rossburton avatar Feb 28 '22 12:02 rossburton

Note that this is in violation of PEP517. https://peps.python.org/pep-0517/#build-wheel says:

The source directory may be read-only. Backends should therefore be prepared to build without creating or modifying any files in the source directory, but they may opt not to handle this case, in which case failures will be visible to the user. Frontends are not responsible for any special handling of read-only source directories.

From a wheel git clone:

$ python3 setup.py sdist
$ tar zxvf dist/wheel-0.37.1.tar.gz
$ chmod -R -w wheel-0.37.1
$ cd wheel-0.37.1
$ python3 setup.py bdist_wheel
running bdist_wheel
running build
running build_py
Generating grammar tables from /usr/lib/python3.8/lib2to3/Grammar.txt
Generating grammar tables from /usr/lib/python3.8/lib2to3/PatternGrammar.txt
creating build
error: could not create 'build': Permission denied

rossburton avatar Mar 16 '22 13:03 rossburton