235e0c94a6
The hook is optional, see https://www.python.org/dev/peps/pep-0517/#prepare-metadata-for-build-wheel > If a build frontend needs this information and the method is not defined, > it should call build_wheel and look at the resulting metadata directly. This is not yet automatically detected because the feature is provisional. Use `%pyproject_buildrequires -w` to opt-in. Resolves: rhbz#2060109
26 lines
546 B
Python
26 lines
546 B
Python
import sys
|
|
import subprocess
|
|
|
|
|
|
def build_wheel(*, wheeldir, stdout=None):
|
|
command = (
|
|
sys.executable,
|
|
'-m', 'pip',
|
|
'wheel',
|
|
'--wheel-dir', wheeldir,
|
|
'--no-deps',
|
|
'--use-pep517',
|
|
'--no-build-isolation',
|
|
'--disable-pip-version-check',
|
|
'--no-clean',
|
|
'--progress-bar', 'off',
|
|
'--verbose',
|
|
'.',
|
|
)
|
|
cp = subprocess.run(command, stdout=stdout)
|
|
return cp.returncode
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(build_wheel(wheeldir=sys.argv[1]))
|