@@ -194,7 +194,9 @@ def build(options: BuildOptions) -> None:
|
|||||||
if os.path.exists(built_wheel_dir):
|
if os.path.exists(built_wheel_dir):
|
||||||
shutil.rmtree(built_wheel_dir)
|
shutil.rmtree(built_wheel_dir)
|
||||||
os.makedirs(built_wheel_dir)
|
os.makedirs(built_wheel_dir)
|
||||||
call(['pip', 'wheel', options.package_dir, '-w', built_wheel_dir, '--no-deps'] + get_build_verbosity_extra_flags(options.build_verbosity), env=env)
|
# os.path.abspath is need. Without it pip wheel may try to fetch package from pypi.org
|
||||||
|
# see https://github.com/joerick/cibuildwheel/pull/369
|
||||||
|
call(['pip', 'wheel', os.path.abspath(options.package_dir), '-w', built_wheel_dir, '--no-deps'] + get_build_verbosity_extra_flags(options.build_verbosity), env=env)
|
||||||
built_wheel = glob(os.path.join(built_wheel_dir, '*.whl'))[0]
|
built_wheel = glob(os.path.join(built_wheel_dir, '*.whl'))[0]
|
||||||
|
|
||||||
# repair the wheel
|
# repair the wheel
|
||||||
|
|||||||
@@ -180,7 +180,9 @@ def build(options: BuildOptions) -> None:
|
|||||||
if os.path.exists(built_wheel_dir):
|
if os.path.exists(built_wheel_dir):
|
||||||
shutil.rmtree(built_wheel_dir)
|
shutil.rmtree(built_wheel_dir)
|
||||||
os.makedirs(built_wheel_dir)
|
os.makedirs(built_wheel_dir)
|
||||||
shell(['pip', 'wheel', options.package_dir, '-w', built_wheel_dir, '--no-deps'] + get_build_verbosity_extra_flags(options.build_verbosity), env=env)
|
# os.path.abspath is need. Without it pip wheel may try to fetch package from pypi.org
|
||||||
|
# see https://github.com/joerick/cibuildwheel/pull/369
|
||||||
|
shell(['pip', 'wheel', os.path.abspath(options.package_dir), '-w', built_wheel_dir, '--no-deps'] + get_build_verbosity_extra_flags(options.build_verbosity), env=env)
|
||||||
built_wheel = glob(os.path.join(built_wheel_dir, '*.whl'))[0]
|
built_wheel = glob(os.path.join(built_wheel_dir, '*.whl'))[0]
|
||||||
|
|
||||||
# repair the wheel
|
# repair the wheel
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ def test(capfd, tmp_path):
|
|||||||
project_dir = tmp_path / 'project'
|
project_dir = tmp_path / 'project'
|
||||||
subdir_package_project.generate(project_dir)
|
subdir_package_project.generate(project_dir)
|
||||||
|
|
||||||
package_dir = os.path.join(project_dir, 'src', 'spam')
|
package_dir = os.path.join('src', 'spam')
|
||||||
# build the wheels
|
# build the wheels
|
||||||
actual_wheels = utils.cibuildwheel_run(project_dir, package_dir=package_dir, add_env={
|
actual_wheels = utils.cibuildwheel_run(project_dir, package_dir=package_dir, add_env={
|
||||||
'CIBW_BEFORE_BUILD': 'python {project}/bin/before_build.py',
|
'CIBW_BEFORE_BUILD': 'python {project}/bin/before_build.py',
|
||||||
|
|||||||
Reference in New Issue
Block a user