Compare commits

...
22 Commits
Author SHA1 Message Date
Joe Rickerby aeeac6725a Bump version 2019-09-29 20:40:44 +01:00
Joe Rickerby 41b4b092b1 Merge pull request #167 from mayeut/update-openssl
Update openssl patch from 1.0.2s to 1.0.2t on macOS
2019-09-29 20:34:56 +01:00
mayeut 28186bf142 Update openssl patch from 1.0.2s to 1.0.2t on macOS 2019-09-22 14:46:17 +02:00
Joe Rickerby 4e10d9d897 Merge pull request #163 from astrofrog/circleci-verbose
Clean up CircleCI YAML syntax
2019-09-21 16:26:13 +01:00
Joe Rickerby 2ab2d079ab Merge pull request #161 from astrofrog/test-extras-require
Add support for specifying test-time dependencies via extras_require
2019-09-09 22:18:33 +01:00
Joe Rickerby 5e529969ea Merge pull request #153 from mayeut/update-python
Update Python from 3.7.2 to 3.7.4 on macOS
2019-09-09 21:48:50 +01:00
Joe Rickerby b7a689e349 Merge pull request #157 from altendky/patch-1
Add Twisted to working examples list
2019-09-09 21:48:30 +01:00
Thomas Robitaille 4f4fed06e0 Added unit test for CIBW_TEST_EXTRAS 2019-09-09 12:49:11 +01:00
Thomas Robitaille 45fcebf9d8 Fix issue on linux 2019-09-09 12:49:05 +01:00
Thomas Robitaille e67b3bc611 Added support for CIBW_TEST_EXTRAS to allow extras_require to be used to install test dependencies 2019-09-09 12:49:04 +01:00
Thomas Robitaille d8456a0ffa Use one-line commands on CircleCI to ensure that command output is shown 2019-09-07 21:55:42 +01:00
Kyle Altendorf 73681d9b24 Add Twisted to working examples list 2019-08-28 23:06:38 -04:00
mayeut 02ed7b2262 Update Python from 3.7.2 to 3.7.4 on macOS 2019-07-27 11:24:47 +02:00
Joe Rickerby ab86b8cd93 Merge pull request #149 from mayeut/update-openssl
Update openssl patch from 1.0.2r to 1.0.2s on macOS
2019-06-24 10:02:41 +01:00
mayeut 3a03df8ec9 Update openssl patch from 1.0.2r to 1.0.2s on macOS 2019-06-23 18:15:46 +02:00
Joe Rickerby 0e78b2b1f5 Merge pull request #147 from cher-nov/V_for_Veyor
Correct spelling: capitalized 'V' in 'AppVeyor'
2019-06-21 08:53:24 +01:00
Joe Rickerby 5b14c8c0ec Merge pull request #148 from delivrance/add-tgcrypto
Add pyrogram/tgcrypto to README.md
2019-06-21 08:51:49 +01:00
Dan 0627bd09d4 Add pyrogram/tgcrypto to README.md 2019-06-14 21:38:38 +02:00
Dmitry D. Chernov a5e64e216c Correct spelling: capitalized 'V' in 'AppVeyor' 2019-06-10 20:27:32 +10:00
Joe Rickerby 23cf50614f Merge pull request #142 from kngwyu/upd-readme
Specify cibuildwheel=0.11 in Azure example
2019-05-29 08:47:04 +01:00
kngwyu 1e08ff03b3 Specify cibuildwheel=0.11 in README example 2019-05-29 15:15:58 +09:00
Joe Rickerby 2216385c0b Update changelog 2019-05-28 19:22:25 +01:00
11 changed files with 92 additions and 46 deletions
+8 -16
View File
@@ -11,12 +11,10 @@ jobs:
- run:
name: Prepare the environment.
command: |
bash .circleci/prepare.sh
command: bash .circleci/prepare.sh
- run:
name: Test.
command: |
venv/bin/python ./bin/run_tests.py
command: venv/bin/python ./bin/run_tests.py
osx-python3:
macos:
@@ -28,12 +26,10 @@ jobs:
- run:
name: Prepare the environment.
command: |
bash .circleci/prepare.sh
command: bash .circleci/prepare.sh
- run:
name: Test.
command: |
venv/bin/python ./bin/run_tests.py
command: venv/bin/python ./bin/run_tests.py
linux-python2:
docker:
@@ -46,12 +42,10 @@ jobs:
- run:
name: Prepare the environment.
command: |
bash .circleci/prepare.sh
command: bash .circleci/prepare.sh
- run:
name: Test.
command: |
venv/bin/python ./bin/run_tests.py
command: venv/bin/python ./bin/run_tests.py
linux-python3:
docker:
@@ -64,12 +58,10 @@ jobs:
- run:
name: Prepare the environment.
command: |
bash .circleci/prepare.sh
command: bash .circleci/prepare.sh
- run:
name: Test.
command: |
venv/bin/python ./bin/run_tests.py
command: venv/bin/python ./bin/run_tests.py
workflows:
version: 2
+44 -15
View File
@@ -5,7 +5,7 @@ cibuildwheel
Python wheels are great. Building them across **Mac, Linux, Windows**, on **multiple versions of Python**, is not.
`cibuildwheel` is here to help. `cibuildwheel` runs on your CI server - currently it supports Azure Pipelines, Travis CI, Appveyor, and CircleCI - and it builds and tests your wheels across all of your platforms.
`cibuildwheel` is here to help. `cibuildwheel` runs on your CI server - currently it supports Azure Pipelines, Travis CI, AppVeyor, and CircleCI - and it builds and tests your wheels across all of your platforms.
**`cibuildwheel` is in beta**. It's brand new - I'd love for you to try it and help make it better!
@@ -22,23 +22,23 @@ What does it do?
> \* Not supported on Azure Pipelines
- Builds manylinux, macOS and Windows (32 and 64bit) wheels using Azure Pipelines, Travis CI, Appveyor, and CircleCI
- Builds manylinux, macOS and Windows (32 and 64bit) wheels using Azure Pipelines, Travis CI, AppVeyor, and CircleCI
- Bundles shared library dependencies on Linux and macOS through [auditwheel](https://github.com/pypa/auditwheel) and [delocate](https://github.com/matthew-brett/delocate)
- Runs the library test suite against the wheel-installed version of your library
Usage
-----
`cibuildwheel` currently works **Travis CI** and **CircleCI** to build Linux and Mac wheels, and **Appveyor** to build Windows wheels. **Azure Pipelines** supports all three.
`cibuildwheel` currently works **Travis CI** and **CircleCI** to build Linux and Mac wheels, and **AppVeyor** to build Windows wheels. **Azure Pipelines** supports all three.
| | Linux | macOS | Windows |
|-----------------|-------|-------|---------|
| Azure Pipelines | ✅ | ✅ | ✅ |
| Travis CI | ✅ | ✅ | |
| Appveyor | | | ✅ |
| AppVeyor | | | ✅ |
| CircleCI | ✅ | ✅ | |
`cibuildwheel` is not intended to run on your development machine. It will try to install packages globally; this is no good. Travis CI, CircleCI, and Appveyor run their builds in isolated environments, so are ideal for this kind of script.
`cibuildwheel` is not intended to run on your development machine. It will try to install packages globally; this is no good. Travis CI, CircleCI, and AppVeyor run their builds in isolated environments, so are ideal for this kind of script.
### Minimal setup
@@ -60,7 +60,7 @@ jobs:
- task: UsePythonVersion@0
- bash: |
python -m pip install --upgrade pip
pip install cibuildwheel==0.10.1
pip install cibuildwheel==0.12.0
cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
@@ -70,7 +70,7 @@ jobs:
- task: UsePythonVersion@0
- bash: |
python -m pip install --upgrade pip
pip install cibuildwheel==0.10.1
pip install cibuildwheel==0.12.0
cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
@@ -89,7 +89,7 @@ jobs:
displayName: Install Visual C++ for Python 2.7
- bash: |
python -m pip install --upgrade pip
pip install cibuildwheel==0.10.1
pip install cibuildwheel==0.12.0
cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
@@ -119,7 +119,7 @@ jobs:
env: PIP=pip2
script:
- $PIP install cibuildwheel==0.11.1
- $PIP install cibuildwheel==0.12.0
- cibuildwheel --output-dir wheelhouse
```
@@ -184,26 +184,26 @@ jobs:
<details>
<summary><b>Appveyor</b>
<summary><b>AppVeyor</b>
<img width="16" src="https://unpkg.com/simple-icons@latest/icons/windows.svg" />
</summary>
- To build Windows wheels on Appveyor, create an `appveyor.yml` file in your repo.
- To build Windows wheels on AppVeyor, create an `appveyor.yml` file in your repo.
```
build_script:
- pip install cibuildwheel==0.11.1
- pip install cibuildwheel==0.12.0
- cibuildwheel --output-dir wheelhouse
artifacts:
- path: "wheelhouse\\*.whl"
name: Wheels
```
Appveyor will store the built wheels for you - you can access them from the project console. Alternatively, you may want to store them in the same place as the Travis CI build. See [Appveyor deployment docs](https://www.appveyor.com/docs/deployment/) for more info, or see [Delivering to PyPI](#delivering-to-pypi) below.
AppVeyor will store the built wheels for you - you can access them from the project console. Alternatively, you may want to store them in the same place as the Travis CI build. See [AppVeyor deployment docs](https://www.appveyor.com/docs/deployment/) for more info, or see [Delivering to PyPI](#delivering-to-pypi) below.
</details>
- Commit those files, enable building of your repo on Travis CI and Appveyor, and push.
- Commit those files, enable building of your repo on Travis CI and AppVeyor, and push.
All being well, you should get wheels delivered to you in a few minutes.
@@ -225,6 +225,7 @@ All being well, you should get wheels delivered to you in a few minutes.
| | `CIBW_MANYLINUX1_I686_IMAGE` | Specify an alternative manylinux1 i686 docker image |
| **Tests** | `CIBW_TEST_COMMAND` | Execute a shell command to test all built wheels |
| | `CIBW_TEST_REQUIRES` | Install Python dependencies before running the tests |
| | `CIBW_TEST_EXTRAS` | Install Python dependencies before running the tests using ``extras_require``|
A more detailed description of the options, the allowed values, and some examples can be found in the [Options](#options) section.
@@ -412,6 +413,25 @@ Example: `nose==1.3.7 moto==0.4.31`
Platform-specific variants also available:
`CIBW_TEST_REQUIRES_MACOS` | `CIBW_TEST_REQUIRES_WINDOWS` | `CIBW_TEST_REQUIRES_LINUX`
***
| Environment variable: `CIBW_TEST_EXTRAS`
| ---
Optional.
Comma-separated list of
[extras_require](https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies)
options that should be included when installing the wheel prior to running the
tests. This can be used to avoid having to redefine test dependencies in
``CIBW_TEST_REQUIRES`` if they are already defined in ``setup.py`` or
``setup.cfg``.
Example: `test,qt` (will cause the wheel to be installed with ``pip install <wheel_file>[test,qt])
Platform-specific variants also available:
`CIBW_TEST_EXTRAS_MACOS` | `CIBW_TEST_EXTRAS_WINDOWS` | `CIBW_TEST_EXTRAS_LINUX`
### Example YML syntax
@@ -486,6 +506,8 @@ Here are some repos that use cibuildwheel.
- [KDEpy](https://github.com/tommyod/KDEpy)
- [AutoPy](https://github.com/autopilot-rs/autopy)
- [apriltags2-ethz](https://github.com/safijari/apriltags2_ethz)
- [TgCrypto](https://github.com/pyrogram/tgcrypto)
- [Twisted](https://github.com/twisted/twisted)
> Add repo here! Send a PR.
@@ -501,6 +523,13 @@ This is similar to static linking, so it might have some licence implications. C
Changelog
=========
### 0.11.1
_28 May 2019_
- 🐛 Fix missing file in the release tarball, that was causing problems with
Windows builds (#141)
### 0.11.0
_26 May 2019_
@@ -622,7 +651,7 @@ _7 September 2017_
_14 August 2017_
- 🐛 Fixed a bug on Windows where subprocess' output was hidden (#23)
- 🐛 Fixed a bug on Appveyor where logs would appear in the wrong order due to output buffering (#24, thanks @YannickJadoul!)
- 🐛 Fixed a bug on AppVeyor where logs would appear in the wrong order due to output buffering (#24, thanks @YannickJadoul!)
### 0.4.0
+1 -1
View File
@@ -1 +1 @@
__version__ = '0.11.1'
__version__ = '0.12.0'
+6 -1
View File
@@ -82,7 +82,7 @@ def main():
if platform is None:
print('cibuildwheel: Unable to detect platform. cibuildwheel should run on your CI server, '
'Travis CI, Appveyor, and CircleCI are supported. You can run on your development '
'Travis CI, AppVeyor, and CircleCI are supported. You can run on your development '
'machine using the --platform argument. Check --help output for more '
'information.',
file=sys.stderr)
@@ -91,12 +91,16 @@ def main():
output_dir = args.output_dir
test_command = get_option_from_environment('CIBW_TEST_COMMAND', platform=platform)
test_requires = get_option_from_environment('CIBW_TEST_REQUIRES', platform=platform, default='').split()
test_extras = get_option_from_environment('CIBW_TEST_EXTRAS', platform=platform, default='')
project_dir = args.project_dir
before_build = get_option_from_environment('CIBW_BEFORE_BUILD', platform=platform)
build_verbosity = get_option_from_environment('CIBW_BUILD_VERBOSITY', platform=platform, default='')
build_config, skip_config = os.environ.get('CIBW_BUILD', '*'), os.environ.get('CIBW_SKIP', '')
environment_config = get_option_from_environment('CIBW_ENVIRONMENT', platform=platform, default='')
if test_extras:
test_extras = '[{0}]'.format(test_extras)
try:
build_verbosity = min(3, max(-3, int(build_verbosity)))
except ValueError:
@@ -129,6 +133,7 @@ def main():
output_dir=output_dir,
test_command=test_command,
test_requires=test_requires,
test_extras=test_extras,
before_build=before_build,
build_verbosity=build_verbosity,
build_selector=build_selector,
+3 -2
View File
@@ -30,7 +30,7 @@ def get_python_configurations(build_selector):
return [c for c in python_configurations if build_selector(c.identifier)]
def build(project_dir, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment, manylinux1_images):
def build(project_dir, output_dir, test_command, test_requires, test_extras, before_build, build_verbosity, build_selector, environment, manylinux1_images):
try:
subprocess.check_call(['docker', '--version'])
except:
@@ -86,7 +86,7 @@ def build(project_dir, output_dir, test_command, test_requires, before_build, bu
delocated_wheel=(/tmp/delocated_wheel/*.whl)
# Install the wheel we just built
"$PYBIN/pip" install "$delocated_wheel"
"$PYBIN/pip" install "$delocated_wheel"{test_extras}
# Install any requirements to run the tests
if [ ! -z "{test_requires}" ]; then
@@ -107,6 +107,7 @@ def build(project_dir, output_dir, test_command, test_requires, before_build, bu
'''.format(
pybin_paths=' '.join(c.path+'/bin' for c in platform_configs),
test_requires=' '.join(test_requires),
test_extras=test_extras,
test_command=shlex_quote(
prepare_command(test_command, project='/project') if test_command else ''
),
+4 -4
View File
@@ -17,14 +17,14 @@ def get_python_configurations(build_selector):
PythonConfiguration(version='3.4', identifier='cp34-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.4.4/python-3.4.4-macosx10.6.pkg'),
PythonConfiguration(version='3.5', identifier='cp35-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.5.4/python-3.5.4-macosx10.6.pkg'),
PythonConfiguration(version='3.6', identifier='cp36-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.6.pkg'),
PythonConfiguration(version='3.7', identifier='cp37-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.7.2/python-3.7.2-macosx10.6.pkg'),
PythonConfiguration(version='3.7', identifier='cp37-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.7.4/python-3.7.4-macosx10.6.pkg'),
]
# skip builds as required
return [c for c in python_configurations if build_selector(c.identifier)]
def build(project_dir, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment):
def build(project_dir, output_dir, test_command, test_requires, test_extras, before_build, build_verbosity, build_selector, environment):
python_configurations = get_python_configurations(build_selector)
get_pip_url = 'https://bootstrap.pypa.io/get-pip.py'
get_pip_script = '/tmp/get-pip.py'
@@ -58,7 +58,7 @@ def build(project_dir, output_dir, test_command, test_requires, before_build, bu
call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/'])
# patch open ssl
if config.version in ('3.4', '3.5'):
call(['curl', '-fsSLo', '/tmp/python-patch.tar.gz', 'https://github.com/mayeut/patch-macos-python-openssl/releases/download/v1.0.2r/patch-macos-python-%s-openssl-v1.0.2r.tar.gz' % config.version])
call(['curl', '-fsSLo', '/tmp/python-patch.tar.gz', 'https://github.com/mayeut/patch-macos-python-openssl/releases/download/v1.0.2t/patch-macos-python-%s-openssl-v1.0.2t.tar.gz' % config.version])
call(['sudo', 'tar', '-C', '/Library/Frameworks/Python.framework/Versions/%s/' % config.version, '-xmf', '/tmp/python-patch.tar.gz'])
installation_bin_path = '/Library/Frameworks/Python.framework/Versions/{}/bin'.format(config.version)
@@ -121,7 +121,7 @@ def build(project_dir, output_dir, test_command, test_requires, before_build, bu
delocated_wheel = glob('/tmp/delocated_wheel/*.whl')[0]
# install the wheel
call(['pip', 'install', delocated_wheel], env=env)
call(['pip', 'install', delocated_wheel + test_extras], env=env)
# test the wheel
if test_requires:
+4 -4
View File
@@ -23,7 +23,7 @@ def get_python_path(config):
except IndexError:
raise Exception('Could not find a Python install at ' + path_pattern)
else:
# Assume we're running on Appveyor
# Assume we're running on AppVeyor
major, minor = config.version.split('.')[:2]
return 'C:\\Python{major}{minor}{arch}'.format(
major=major,
@@ -56,7 +56,7 @@ def get_python_configurations(build_selector):
return [c for c in python_configurations if build_selector(c.identifier)]
def build(project_dir, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment):
def build(project_dir, output_dir, test_command, test_requires, test_extras, before_build, build_verbosity, build_selector, environment):
if IS_RUNNING_ON_AZURE:
def shell(args, env=None, cwd=None):
print('+ ' + ' '.join(args))
@@ -66,7 +66,7 @@ def build(project_dir, output_dir, test_command, test_requires, before_build, bu
run_with_env = os.path.abspath(os.path.join(os.path.dirname(__file__), 'resources', 'appveyor_run_with_env.cmd'))
# run_with_env is a cmd file that sets the right environment variables
# to build on Appveyor.
# to build on AppVeyor.
def shell(args, env=None, cwd=None):
# print the command executing for the logs
print('+ ' + ' '.join(args))
@@ -122,7 +122,7 @@ def build(project_dir, output_dir, test_command, test_requires, before_build, bu
built_wheel = glob(built_wheel_dir+'/*.whl')[0]
# install the wheel
shell(['pip', 'install', built_wheel], env=env)
shell(['pip', 'install', built_wheel + test_extras], env=env)
# test the wheel
if test_requires:
+1 -1
View File
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.11.1
current_version = 0.12.0
commit = True
tag = True
message = Bump version
+1 -1
View File
@@ -8,7 +8,7 @@ except ImportError:
setup(
name='cibuildwheel',
version='0.11.1',
version='0.12.0',
install_requires=['bashlex!=0.13'],
description="Build Python wheels on CI with minimal configuration.",
long_description='For readme please see http://github.com/joerick/cibuildwheel',
+19 -1
View File
@@ -12,7 +12,25 @@ def test():
'CIBW_TEST_COMMAND': 'false || nosetests {project}/test',
'CIBW_TEST_COMMAND_WINDOWS': 'nosetests {project}/test',
})
# also check that we got the right wheels
expected_wheels = utils.expected_wheels('spam', '0.1.0')
actual_wheels = os.listdir('wheelhouse')
assert set(actual_wheels) == set(expected_wheels)
def test_extras_require():
project_dir = os.path.dirname(__file__)
# build and test the wheels
utils.cibuildwheel_run(project_dir, add_env={
'CIBW_TEST_EXTRAS': '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',
})
# also check that we got the right wheels
expected_wheels = utils.expected_wheels('spam', '0.1.0')
actual_wheels = os.listdir('wheelhouse')
+1
View File
@@ -3,5 +3,6 @@ from setuptools import setup, Extension
setup(
name="spam",
ext_modules=[Extension('spam', sources=['spam.c'])],
extras_require={'test': ['nose']},
version="0.1.0",
)