1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
import os
from pathlib import Path
import subprocess
import sys
def build_wheel(wheel_directory, config_settings=None, metadata_directory=None):
env = os.environ.copy()
if sys.executable is not None:
env['PYTHON'] = sys.executable
subprocess.run(['scons', '-Q', 'bdist_wheel', '--build-dir=' + wheel_directory], check=True, env=env)
try:
fp, = Path(wheel_directory).glob('*.whl')
except ValueError:
raise RuntimeError('No .whl file found in build directory')
return str(fp)
def build_sdist(sdist_directory, config_settings=None):
raise NotImplementedError
|