remove clean files from setup.py, fixes in doc
This commit is contained in:
+6
-6
@@ -343,8 +343,8 @@ CIBW_TEST_EXTRAS: test,qt
|
||||
### `CIBW_BEFORE_TEST` {: #before-test}
|
||||
> Execute a shell command before testing each wheel
|
||||
|
||||
A shell command to run in **each** test virtual environment, before your wheel is installed and tested. This is useful if you need to install non pip package, change values of environment variables
|
||||
or perform multi step pip installation (like install `scikit-build` or `cython` before install test package)
|
||||
A shell command to run in **each** test virtual environment, before your wheel is installed and tested. This is useful if you need to install a non pip package, change values of environment variables
|
||||
or perform multi step pip installation (e.g. installing `scikit-build` or `cython` before install test package)
|
||||
|
||||
|
||||
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`.
|
||||
@@ -356,14 +356,14 @@ Platform-specific variants also available:<br/>
|
||||
|
||||
#### Examples
|
||||
```yaml
|
||||
# install packages needed to build test dependencies
|
||||
CIBW_BEFORE_TEST: pip install cmake scikit-build
|
||||
|
||||
# install test dependencies with overwritten environment variables.
|
||||
CIBW_BEFORE_TEST: CC=gcc CXX=g++ pip install -r requirements.txt
|
||||
|
||||
# chain commands using &&
|
||||
CIBW_BEFORE_TEST: yum install -y libffi-dev && pip install .
|
||||
CIBW_BEFORE_TEST : rm -rf ./data/cache && mkdir -p ./data/cache
|
||||
|
||||
# install python packages that are required to install test dependencies
|
||||
CIBW_BEFORE_TEST: pip install cmake scikit-build
|
||||
```
|
||||
|
||||
## Other
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
from setuptools import setup, Extension
|
||||
import sys, os
|
||||
|
||||
# assert that the Python version as written to pythonversion.txt in the CIBW_BEFORE_BUILD step
|
||||
# is the same one as is currently running.
|
||||
version_file = 'c:\\pythonversion.txt' if sys.platform == 'win32' else '/tmp/pythonversion.txt'
|
||||
if os.path.exists(version_file):
|
||||
os.remove(version_file)
|
||||
|
||||
# check that the executable also was written
|
||||
executable_file = 'c:\\pythonexecutable.txt' if sys.platform == 'win32' else '/tmp/pythonexecutable.txt'
|
||||
if os.path.exists(executable_file):
|
||||
os.remove(executable_file)
|
||||
|
||||
setup(
|
||||
name="spam",
|
||||
|
||||
@@ -4,8 +4,9 @@ from unittest import TestCase
|
||||
|
||||
class TestBeforeTest(TestCase):
|
||||
def test_version(self):
|
||||
# assert that the Python version as written to pythonversion.txt in the CIBW_BEFORE_BUILD step
|
||||
# assert that the Python version as written to pythonversion.txt in the CIBW_BEFORE_TEST step
|
||||
# is the same one as is currently running.
|
||||
# because of use symlinks in MacOS run this test is also need
|
||||
version_file = 'c:\\pythonversion.txt' if sys.platform == 'win32' else '/tmp/pythonversion.txt'
|
||||
with open(version_file) as f:
|
||||
stored_version = f.read()
|
||||
|
||||
@@ -218,4 +218,4 @@ def test_before_test(before_test, platform_specific, platform, intercepted_build
|
||||
|
||||
main()
|
||||
|
||||
assert intercepted_build_args.kwargs['before_test'] == before_test
|
||||
assert intercepted_build_args.kwargs['before_test'] == before_test
|
||||
|
||||
Reference in New Issue
Block a user