From 6265d87d0923a7405a55a24434892358587f16f9 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sat, 7 Mar 2020 12:17:49 +0000 Subject: [PATCH 1/4] Try removing the explicit cmd call --- cibuildwheel/windows.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 59f67460..e3d864f8 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -20,8 +20,7 @@ IS_RUNNING_ON_TRAVIS = os.environ.get('TRAVIS_OS_NAME') == 'windows' def shell(args, env=None, cwd=None): print('+ ' + ' '.join(args)) - args = ['cmd', '/E:ON', '/V:ON', '/C'] + args - return subprocess.check_call(' '.join(args), env=env, cwd=cwd) + return subprocess.check_call(' '.join(args), env=env, cwd=cwd, shell=True) def get_nuget_args(version, arch): From c33fa2ada06286e0855b73ddfe4f3fb0a9666bd9 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sat, 7 Mar 2020 12:21:31 +0000 Subject: [PATCH 2/4] Add test for boolean ops on windows --- test/02_test/cibuildwheel_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/02_test/cibuildwheel_test.py b/test/02_test/cibuildwheel_test.py index ca084d65..d0126465 100644 --- a/test/02_test/cibuildwheel_test.py +++ b/test/02_test/cibuildwheel_test.py @@ -32,7 +32,7 @@ def test_extras_require(): # the 'false ||' bit is to ensure this command runs in a shell on # mac/linux. 'CIBW_TEST_COMMAND': 'false || nosetests {project}/test', - 'CIBW_TEST_COMMAND_WINDOWS': 'nosetests {project}/test', + 'CIBW_TEST_COMMAND_WINDOWS': 'COLOR 00 || nosetests {project}/test', }) # also check that we got the right wheels From 8de326a67aa54c2bcb0ff0e5ed46436202bd470e Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sat, 7 Mar 2020 12:22:44 +0000 Subject: [PATCH 3/4] Another test --- test/02_test/cibuildwheel_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/02_test/cibuildwheel_test.py b/test/02_test/cibuildwheel_test.py index d0126465..21878d2c 100644 --- a/test/02_test/cibuildwheel_test.py +++ b/test/02_test/cibuildwheel_test.py @@ -15,7 +15,7 @@ def test(): # the 'false ||' bit is to ensure this command runs in a shell on # mac/linux. 'CIBW_TEST_COMMAND': 'false || nosetests {project}/test', - 'CIBW_TEST_COMMAND_WINDOWS': 'nosetests {project}/test', + 'CIBW_TEST_COMMAND_WINDOWS': 'COLOR 00 || nosetests {project}/test', }) # also check that we got the right wheels From 7dfc173bca1830ef0e45544427901af1d686e884 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sat, 7 Mar 2020 18:05:30 +0000 Subject: [PATCH 4/4] Update docs --- docs/options.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/options.md b/docs/options.md index 4b4069ac..1ae87f04 100644 --- a/docs/options.md +++ b/docs/options.md @@ -158,7 +158,7 @@ You must set this variable to pass variables to Linux builds (since they execute You can use `$PATH` syntax to insert other variables, or the `$(pwd)` syntax to insert the output of other shell commands. -To specify more than one environment variable, separate the assignments by spaces. +To specify more than one environment variable, separate the assignments by spaces. Platform-specific variants also available:
`CIBW_ENVIRONMENT_MACOS` | `CIBW_ENVIRONMENT_WINDOWS` | `CIBW_ENVIRONMENT_LINUX` @@ -194,7 +194,7 @@ If dependencies are required to build your wheel (for example if you include a h The active Python binary can be accessed using `python`, and pip with `pip`; `cibuildwheel` makes sure the right version of Python and pip will be executed. `{project}` can be used as a placeholder for the absolute path to the project's root and will be replaced by `cibuildwheel`. -On Linux and macOS, the command is run in a shell, so you can write things like `cmd1 && cmd2`. +The command is run in a shell, so you can write things like `cmd1 && cmd2`. Platform-specific variants also available:
`CIBW_BEFORE_BUILD_MACOS` | `CIBW_BEFORE_BUILD_WINDOWS` | `CIBW_BEFORE_BUILD_LINUX` @@ -209,6 +209,9 @@ CIBW_BEFORE_BUILD: pip install pybind11 # chain commands using && CIBW_BEFORE_BUILD: yum install -y libffi-dev && pip install . + +# run a script that's inside your repo +CIBW_BEFORE_BUILD: bash scripts/prepare_for_build.sh ``` @@ -229,7 +232,7 @@ The following placeholders must be used inside the command and will be replaced - `{wheel}` for the absolute path to the built wheel - `{dest_dir}` for the absolute path of the directory where to create the repaired wheel. -On Linux and macOS, the command is run in a shell, so you can write things like `cmd1 && cmd2`. +The command is run in a shell, so you can run multiple commands like `cmd1 && cmd2`. Platform-specific variants also available:
`CIBW_REPAIR_WHEEL_COMMAND_MACOS` | `CIBW_REPAIR_WHEEL_COMMAND_WINDOWS` | `CIBW_REPAIR_WHEEL_COMMAND_LINUX` @@ -285,7 +288,7 @@ CIBW_MANYLINUX_I686_IMAGE: dockcross/manylinux-x86 Shell command to run tests after the build. The wheel will be installed automatically and available for import from the tests. `{project}` can be used as a placeholder for the absolute path to the project's root and will be replaced by `cibuildwheel`. -On Linux and macOS, the command is run in a shell, so you can write things like `cmd1 && cmd2`. +The command is run in a shell, so you can write things like `cmd1 && cmd2`. Platform-specific variants also available:
`CIBW_TEST_COMMAND_MACOS` | `CIBW_TEST_COMMAND_WINDOWS` | `CIBW_TEST_COMMAND_LINUX`