Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ddc6d57a2 | ||
|
|
58fa77b73b | ||
|
|
048ddc4af3 | ||
|
|
c521dca40b | ||
|
|
ac2b391790 | ||
|
|
47fe71efb4 | ||
|
|
53ba9bd0d0 | ||
|
|
317397b39a | ||
|
|
8466194576 | ||
|
|
c68be58e78 | ||
|
|
fc24230cb4 | ||
|
|
c36be04ee8 | ||
|
|
7a27ae941c | ||
|
|
d0b6401129 | ||
|
|
141b3e031e | ||
|
|
0beb9518c9 | ||
|
|
ad51e796c0 | ||
|
|
db9d658b51 | ||
|
|
1d88c27530 | ||
|
|
a92959f191 | ||
|
|
321335e756 | ||
|
|
c88a73b40b | ||
|
|
4dd5c0e11c | ||
|
|
a2f4d2aa47 | ||
|
|
50a263df21 |
@@ -79,7 +79,7 @@ env:
|
||||
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==1.5.0
|
||||
- python3 -m pip install cibuildwheel==1.5.2
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './wheelhouse'
|
||||
@@ -94,7 +94,7 @@ after_success:
|
||||
fi
|
||||
```
|
||||
|
||||
For more information, including how to build on Appveyor, Azure, CircleCI, check out the [documentation](https://cibuildwheel.readthedocs.org) and also check out [the examples](https://github.com/joerick/cibuildwheel/tree/master/examples).
|
||||
For more information, including how to build on GitHub Actions, Appveyor, Azure Pipelines, or CircleCI, check out the [documentation](https://cibuildwheel.readthedocs.org) and the [examples](https://github.com/joerick/cibuildwheel/tree/master/examples).
|
||||
|
||||
Options
|
||||
-------
|
||||
@@ -152,6 +152,21 @@ This is similar to static linking, so it might have some licence implications. C
|
||||
Changelog
|
||||
=========
|
||||
|
||||
### 1.5.2
|
||||
|
||||
_8 July 2020_
|
||||
|
||||
- 🐛 Fix an issue on Windows where pyproject.toml would cause an error when
|
||||
some requirements formats were used. (#401)
|
||||
- 🛠 Update CPython 3.7 to 3.7.8 (#394)
|
||||
|
||||
### 1.5.1
|
||||
|
||||
_25 June 2020_
|
||||
|
||||
- 🐛 Fix "OSError: [WinError 17] The system cannot move the file to a different
|
||||
disk drive" on Github Actions (#388, #389)
|
||||
|
||||
### 1.5.0
|
||||
|
||||
_24 June 2020_
|
||||
|
||||
@@ -1 +1 @@
|
||||
__version__ = '1.5.0'
|
||||
__version__ = '1.5.2'
|
||||
|
||||
+29
-24
@@ -4,27 +4,22 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from os import PathLike
|
||||
from pathlib import Path
|
||||
|
||||
from typing import Dict, List, Optional, NamedTuple, Union
|
||||
from typing import Dict, List, NamedTuple, Optional, Sequence, Union
|
||||
|
||||
from .environment import ParsedEnvironment
|
||||
from .util import (
|
||||
BuildOptions,
|
||||
BuildSelector,
|
||||
download,
|
||||
get_build_verbosity_extra_flags,
|
||||
get_pip_script,
|
||||
prepare_command,
|
||||
)
|
||||
from .util import (BuildOptions, BuildSelector, download,
|
||||
get_build_verbosity_extra_flags, get_pip_script,
|
||||
prepare_command)
|
||||
|
||||
|
||||
def call(args: Union[str, List[str]], env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None, shell: bool = False) -> int:
|
||||
def call(args: Union[str, Sequence[Union[str, PathLike]]], env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None, shell: bool = False) -> int:
|
||||
# print the command executing for the logs
|
||||
if shell:
|
||||
print(f'+ {args}')
|
||||
else:
|
||||
print('+ ' + ' '.join(shlex.quote(a) for a in args))
|
||||
print('+ ' + ' '.join(shlex.quote(str(a)) for a in args))
|
||||
|
||||
return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)
|
||||
|
||||
@@ -41,7 +36,7 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi
|
||||
PythonConfiguration(version='2.7', identifier='cp27-macosx_x86_64', url='https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg'),
|
||||
PythonConfiguration(version='3.5', identifier='cp35-macosx_x86_64', url='https://www.python.org/ftp/python/3.5.4/python-3.5.4-macosx10.6.pkg'),
|
||||
PythonConfiguration(version='3.6', identifier='cp36-macosx_x86_64', url='https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg'),
|
||||
PythonConfiguration(version='3.7', identifier='cp37-macosx_x86_64', url='https://www.python.org/ftp/python/3.7.7/python-3.7.7-macosx10.9.pkg'),
|
||||
PythonConfiguration(version='3.7', identifier='cp37-macosx_x86_64', url='https://www.python.org/ftp/python/3.7.8/python-3.7.8-macosx10.9.pkg'),
|
||||
PythonConfiguration(version='3.8', identifier='cp38-macosx_x86_64', url='https://www.python.org/ftp/python/3.8.3/python-3.8.3-macosx10.9.pkg'),
|
||||
# PyPy
|
||||
PythonConfiguration(version='2.7', identifier='pp27-macosx_x86_64', url='https://downloads.python.org/pypy/pypy2.7-v7.3.1-osx64.tar.bz2'),
|
||||
@@ -103,7 +98,7 @@ def install_pypy(version: str, url: str) -> Path:
|
||||
if not installation_path.exists():
|
||||
downloaded_tar_bz2 = Path("/tmp") / pypy_tar_bz2
|
||||
download(url, downloaded_tar_bz2)
|
||||
call(['tar', '-C', '/tmp', '-xf', str(downloaded_tar_bz2)])
|
||||
call(['tar', '-C', '/tmp', '-xf', downloaded_tar_bz2])
|
||||
|
||||
installation_bin_path = installation_path / 'bin'
|
||||
python_executable = 'pypy3' if version[0] == '3' else 'pypy'
|
||||
@@ -113,7 +108,9 @@ def install_pypy(version: str, url: str) -> Path:
|
||||
return installation_bin_path
|
||||
|
||||
|
||||
def setup_python(python_configuration: PythonConfiguration, dependency_constraint_flags: List[str], environment: ParsedEnvironment) -> Dict[str, str]:
|
||||
def setup_python(python_configuration: PythonConfiguration,
|
||||
dependency_constraint_flags: Sequence[Union[str, PathLike]],
|
||||
environment: ParsedEnvironment) -> Dict[str, str]:
|
||||
if python_configuration.identifier.startswith('cp'):
|
||||
installation_bin_path = install_cpython(python_configuration.version, python_configuration.url)
|
||||
elif python_configuration.identifier.startswith('pp'):
|
||||
@@ -146,7 +143,7 @@ def setup_python(python_configuration: PythonConfiguration, dependency_constrain
|
||||
exit(1)
|
||||
|
||||
# install pip & wheel
|
||||
call(['python', str(get_pip_script)] + dependency_constraint_flags, env=env, cwd="/tmp")
|
||||
call(['python', get_pip_script, *dependency_constraint_flags], env=env, cwd="/tmp")
|
||||
assert (installation_bin_path / 'pip').exists()
|
||||
call(['which', 'pip'], env=env)
|
||||
call(['pip', '--version'], env=env)
|
||||
@@ -154,7 +151,7 @@ def setup_python(python_configuration: PythonConfiguration, dependency_constrain
|
||||
if which_pip != '/tmp/cibw_bin/pip':
|
||||
print("cibuildwheel: pip available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert pip above it.", file=sys.stderr)
|
||||
exit(1)
|
||||
call(['pip', 'install', '--upgrade', 'setuptools', 'wheel', 'delocate'] + dependency_constraint_flags, env=env)
|
||||
call(['pip', 'install', '--upgrade', 'setuptools', 'wheel', 'delocate', *dependency_constraint_flags], env=env)
|
||||
|
||||
# Set MACOSX_DEPLOYMENT_TARGET to 10.9, if the user didn't set it.
|
||||
# CPython 3.5 defaults to 10.6, and pypy defaults to 10.7, causing
|
||||
@@ -184,10 +181,10 @@ def build(options: BuildOptions) -> None:
|
||||
python_configurations = get_python_configurations(options.build_selector)
|
||||
|
||||
for config in python_configurations:
|
||||
dependency_constraint_flags = []
|
||||
dependency_constraint_flags: Sequence[Union[str, PathLike]] = []
|
||||
if options.dependency_constraints:
|
||||
dependency_constraint_flags = [
|
||||
'-c', str(options.dependency_constraints.get_for_python_version(config.version))
|
||||
'-c', options.dependency_constraints.get_for_python_version(config.version)
|
||||
]
|
||||
|
||||
env = setup_python(config, dependency_constraint_flags, options.environment)
|
||||
@@ -201,9 +198,17 @@ def build(options: BuildOptions) -> None:
|
||||
if built_wheel_dir.exists():
|
||||
shutil.rmtree(built_wheel_dir)
|
||||
built_wheel_dir.mkdir(parents=True)
|
||||
|
||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||
# see https://github.com/joerick/cibuildwheel/pull/369
|
||||
call(['pip', 'wheel', str(options.package_dir.resolve()), '-w', str(built_wheel_dir), '--no-deps'] + get_build_verbosity_extra_flags(options.build_verbosity), env=env)
|
||||
call([
|
||||
'pip', 'wheel',
|
||||
options.package_dir.resolve(),
|
||||
'-w', built_wheel_dir,
|
||||
'--no-deps',
|
||||
*get_build_verbosity_extra_flags(options.build_verbosity)
|
||||
], env=env)
|
||||
|
||||
built_wheel = next(built_wheel_dir.glob('*.whl'))
|
||||
|
||||
# repair the wheel
|
||||
@@ -212,7 +217,7 @@ def build(options: BuildOptions) -> None:
|
||||
repaired_wheel_dir.mkdir(parents=True)
|
||||
if built_wheel.name.endswith('none-any.whl') or not options.repair_command:
|
||||
# pure Python wheel or empty repair command
|
||||
built_wheel.rename(repaired_wheel_dir / built_wheel.name)
|
||||
shutil.move(str(built_wheel), repaired_wheel_dir)
|
||||
else:
|
||||
repair_command_prepared = prepare_command(options.repair_command, wheel=built_wheel, dest_dir=repaired_wheel_dir)
|
||||
call(repair_command_prepared, env=env, shell=True)
|
||||
@@ -221,12 +226,12 @@ def build(options: BuildOptions) -> None:
|
||||
if options.test_command:
|
||||
# set up a virtual environment to install and test from, to make sure
|
||||
# there are no dependencies that were pulled in at build time.
|
||||
call(['pip', 'install', 'virtualenv'] + dependency_constraint_flags, env=env)
|
||||
call(['pip', 'install', 'virtualenv', *dependency_constraint_flags], env=env)
|
||||
venv_dir = Path(tempfile.mkdtemp())
|
||||
|
||||
# Use --no-download to ensure determinism by using seed libraries
|
||||
# built into virtualenv
|
||||
call(['python', '-m', 'virtualenv', '--no-download', str(venv_dir)], env=env)
|
||||
call(['python', '-m', 'virtualenv', '--no-download', venv_dir], env=env)
|
||||
|
||||
virtualenv_env = env.copy()
|
||||
virtualenv_env['PATH'] = os.pathsep.join([
|
||||
@@ -262,4 +267,4 @@ def build(options: BuildOptions) -> None:
|
||||
shutil.rmtree(venv_dir)
|
||||
|
||||
# we're all done here; move it to output (overwrite existing)
|
||||
repaired_wheel.replace(options.output_dir / repaired_wheel.name)
|
||||
shutil.move(str(repaired_wheel), options.output_dir)
|
||||
|
||||
+49
-40
@@ -3,30 +3,32 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from os import PathLike
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, NamedTuple, Optional, Sequence, Union
|
||||
from zipfile import ZipFile
|
||||
import toml
|
||||
|
||||
from typing import Dict, List, Optional, NamedTuple
|
||||
|
||||
from .environment import ParsedEnvironment
|
||||
from .util import (
|
||||
BuildOptions,
|
||||
BuildSelector,
|
||||
download,
|
||||
get_build_verbosity_extra_flags,
|
||||
get_pip_script,
|
||||
prepare_command,
|
||||
)
|
||||
|
||||
from .util import (BuildOptions, BuildSelector, download,
|
||||
get_build_verbosity_extra_flags, get_pip_script,
|
||||
prepare_command)
|
||||
|
||||
IS_RUNNING_ON_AZURE = Path('C:\\hostedtoolcache').exists()
|
||||
IS_RUNNING_ON_TRAVIS = os.environ.get('TRAVIS_OS_NAME') == 'windows'
|
||||
|
||||
|
||||
def shell(args: List[str], env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None) -> int:
|
||||
print('+ ' + ' '.join(args))
|
||||
return subprocess.check_call(' '.join(args), env=env, cwd=cwd, shell=True)
|
||||
def call(args: Sequence[Union[str, PathLike]], env: Optional[Dict[str, str]] = None,
|
||||
cwd: Optional[str] = None) -> None:
|
||||
print('+ ' + ' '.join(str(a) for a in args))
|
||||
# we use shell=True here, even though we don't need a shell due to a bug
|
||||
# https://bugs.python.org/issue8557
|
||||
subprocess.check_call([str(a) for a in args], env=env, cwd=cwd, shell=True)
|
||||
|
||||
|
||||
def shell(command: str, env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None) -> None:
|
||||
print(f'+ {command}')
|
||||
subprocess.check_call(command, env=env, cwd=cwd, shell=True)
|
||||
|
||||
|
||||
def get_nuget_args(version: str, arch: str) -> List[str]:
|
||||
@@ -52,8 +54,8 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi
|
||||
PythonConfiguration(version='3.5.4', arch='64', identifier='cp35-win_amd64', url=None),
|
||||
PythonConfiguration(version='3.6.8', arch='32', identifier='cp36-win32', url=None),
|
||||
PythonConfiguration(version='3.6.8', arch='64', identifier='cp36-win_amd64', url=None),
|
||||
PythonConfiguration(version='3.7.7', arch='32', identifier='cp37-win32', url=None),
|
||||
PythonConfiguration(version='3.7.7', arch='64', identifier='cp37-win_amd64', url=None),
|
||||
PythonConfiguration(version='3.7.8', arch='32', identifier='cp37-win32', url=None),
|
||||
PythonConfiguration(version='3.7.8', arch='64', identifier='cp37-win_amd64', url=None),
|
||||
PythonConfiguration(version='3.8.3', arch='32', identifier='cp38-win32', url=None),
|
||||
PythonConfiguration(version='3.8.3', arch='64', identifier='cp38-win_amd64', url=None),
|
||||
# PyPy
|
||||
@@ -80,7 +82,7 @@ def extract_zip(zip_src: Path, dest: Path) -> None:
|
||||
def install_cpython(version: str, arch: str, nuget: Path) -> Path:
|
||||
nuget_args = get_nuget_args(version, arch)
|
||||
installation_path = Path(nuget_args[-1]) / (nuget_args[0] + '.' + version) / 'tools'
|
||||
shell([str(nuget), 'install'] + nuget_args)
|
||||
call([nuget, 'install', *nuget_args])
|
||||
return installation_path
|
||||
|
||||
|
||||
@@ -101,7 +103,7 @@ def install_pypy(version: str, arch: str, url: str) -> Path:
|
||||
return installation_path
|
||||
|
||||
|
||||
def setup_python(python_configuration: PythonConfiguration, dependency_constraint_flags: List[str], environment: ParsedEnvironment) -> Dict[str, str]:
|
||||
def setup_python(python_configuration: PythonConfiguration, dependency_constraint_flags: Sequence[Union[str, PathLike]], environment: ParsedEnvironment) -> Dict[str, str]:
|
||||
nuget = Path('C:\\cibw\\nuget.exe')
|
||||
if not nuget.exists():
|
||||
download('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', nuget)
|
||||
@@ -129,9 +131,9 @@ def setup_python(python_configuration: PythonConfiguration, dependency_constrain
|
||||
env = environment.as_dictionary(prev_environment=env)
|
||||
|
||||
# for the logs - check we're running the right version of python
|
||||
shell(['where', 'python'], env=env)
|
||||
shell(['python', '--version'], env=env)
|
||||
shell(['python', '-c', '"import struct; print(struct.calcsize(\'P\') * 8)"'], env=env)
|
||||
call(['where', 'python'], env=env)
|
||||
call(['python', '--version'], env=env)
|
||||
call(['python', '-c', '"import struct; print(struct.calcsize(\'P\') * 8)"'], env=env)
|
||||
where_python = subprocess.check_output(['where', 'python'], env=env, universal_newlines=True).splitlines()[0].strip()
|
||||
if where_python != str(installation_path / 'python.exe'):
|
||||
print("cibuildwheel: python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it.", file=sys.stderr)
|
||||
@@ -139,7 +141,7 @@ def setup_python(python_configuration: PythonConfiguration, dependency_constrain
|
||||
|
||||
# make sure pip is installed
|
||||
if not (installation_path / 'Scripts' / 'pip.exe').exists():
|
||||
shell(['python', str(get_pip_script)] + dependency_constraint_flags, env=env, cwd="C:\\cibw")
|
||||
call(['python', get_pip_script, *dependency_constraint_flags], env=env, cwd="C:\\cibw")
|
||||
assert (installation_path / 'Scripts' / 'pip.exe').exists()
|
||||
where_pip = subprocess.check_output(['where', 'pip'], env=env, universal_newlines=True).splitlines()[0].strip()
|
||||
if where_pip.strip() != str(installation_path / 'Scripts' / 'pip.exe'):
|
||||
@@ -147,9 +149,9 @@ def setup_python(python_configuration: PythonConfiguration, dependency_constrain
|
||||
exit(1)
|
||||
|
||||
# prepare the Python environment
|
||||
shell(['python', '-m', 'pip', 'install', '--upgrade', 'pip'] + dependency_constraint_flags, env=env)
|
||||
shell(['pip', '--version'], env=env)
|
||||
shell(['pip', 'install', '--upgrade', 'setuptools', 'wheel'] + dependency_constraint_flags, env=env)
|
||||
call(['python', '-m', 'pip', 'install', '--upgrade', 'pip', *dependency_constraint_flags], env=env)
|
||||
call(['pip', '--version'], env=env)
|
||||
call(['pip', 'install', '--upgrade', 'setuptools', 'wheel', *dependency_constraint_flags], env=env)
|
||||
|
||||
return env
|
||||
|
||||
@@ -191,14 +193,14 @@ def build(options: BuildOptions) -> None:
|
||||
if options.before_all:
|
||||
env = options.environment.as_dictionary(prev_environment=os.environ)
|
||||
before_all_prepared = prepare_command(options.before_all, project='.', package=options.package_dir)
|
||||
shell([before_all_prepared], env=env)
|
||||
shell(before_all_prepared, env=env)
|
||||
|
||||
python_configurations = get_python_configurations(options.build_selector)
|
||||
for config in python_configurations:
|
||||
dependency_constraint_flags = []
|
||||
dependency_constraint_flags: Sequence[Union[str, PathLike]] = []
|
||||
if options.dependency_constraints:
|
||||
dependency_constraint_flags = [
|
||||
'-c', str(options.dependency_constraints.get_for_python_version(config.version))
|
||||
'-c', options.dependency_constraints.get_for_python_version(config.version)
|
||||
]
|
||||
|
||||
# install Python
|
||||
@@ -207,7 +209,7 @@ def build(options: BuildOptions) -> None:
|
||||
# run the before_build command
|
||||
if options.before_build:
|
||||
before_build_prepared = prepare_command(options.before_build, project='.', package=options.package_dir)
|
||||
shell([before_build_prepared], env=env)
|
||||
shell(before_build_prepared, env=env)
|
||||
|
||||
# activate the PEP 518 patch if on Windows Python 3.5
|
||||
# (will only have an effect if PEP 517 builds are used):
|
||||
@@ -220,7 +222,14 @@ def build(options: BuildOptions) -> None:
|
||||
built_wheel_dir.mkdir(parents=True)
|
||||
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org
|
||||
# see https://github.com/joerick/cibuildwheel/pull/369
|
||||
shell(['pip', 'wheel', str(options.package_dir.resolve()), '-w', str(built_wheel_dir), '--no-deps'] + get_build_verbosity_extra_flags(options.build_verbosity), env=env)
|
||||
call([
|
||||
'pip', 'wheel',
|
||||
options.package_dir.resolve(),
|
||||
'-w', built_wheel_dir,
|
||||
'--no-deps',
|
||||
*get_build_verbosity_extra_flags(options.build_verbosity)
|
||||
], env=env)
|
||||
|
||||
built_wheel = next(built_wheel_dir.glob('*.whl'))
|
||||
|
||||
# repair the wheel
|
||||
@@ -229,21 +238,21 @@ def build(options: BuildOptions) -> None:
|
||||
repaired_wheel_dir.mkdir(parents=True)
|
||||
if built_wheel.name.endswith('none-any.whl') or not options.repair_command:
|
||||
# pure Python wheel or empty repair command
|
||||
built_wheel.rename(repaired_wheel_dir / built_wheel.name)
|
||||
shutil.move(str(built_wheel), repaired_wheel_dir)
|
||||
else:
|
||||
repair_command_prepared = prepare_command(options.repair_command, wheel=built_wheel, dest_dir=repaired_wheel_dir)
|
||||
shell([repair_command_prepared], env=env)
|
||||
shell(repair_command_prepared, env=env)
|
||||
repaired_wheel = next(repaired_wheel_dir.glob('*.whl'))
|
||||
|
||||
if options.test_command:
|
||||
# set up a virtual environment to install and test from, to make sure
|
||||
# there are no dependencies that were pulled in at build time.
|
||||
shell(['pip', 'install', 'virtualenv'] + dependency_constraint_flags, env=env)
|
||||
call(['pip', 'install', 'virtualenv', *dependency_constraint_flags], env=env)
|
||||
venv_dir = Path(tempfile.mkdtemp())
|
||||
|
||||
# Use --no-download to ensure determinism by using seed libraries
|
||||
# built into virtualenv
|
||||
shell(['python', '-m', 'virtualenv', '--no-download', str(venv_dir)], env=env)
|
||||
call(['python', '-m', 'virtualenv', '--no-download', venv_dir], env=env)
|
||||
|
||||
virtualenv_env = env.copy()
|
||||
virtualenv_env['PATH'] = os.pathsep.join([
|
||||
@@ -252,7 +261,7 @@ def build(options: BuildOptions) -> None:
|
||||
])
|
||||
|
||||
# check that we are using the Python from the virtual environment
|
||||
shell(['which', 'python'], env=virtualenv_env)
|
||||
call(['which', 'python'], env=virtualenv_env)
|
||||
|
||||
if options.before_test:
|
||||
before_test_prepared = prepare_command(
|
||||
@@ -260,14 +269,14 @@ def build(options: BuildOptions) -> None:
|
||||
project='.',
|
||||
package=options.package_dir
|
||||
)
|
||||
shell([before_test_prepared], env=virtualenv_env)
|
||||
shell(before_test_prepared, env=virtualenv_env)
|
||||
|
||||
# install the wheel
|
||||
shell(['pip', 'install', str(repaired_wheel) + options.test_extras], env=virtualenv_env)
|
||||
call(['pip', 'install', str(repaired_wheel) + options.test_extras], env=virtualenv_env)
|
||||
|
||||
# test the wheel
|
||||
if options.test_requires:
|
||||
shell(['pip', 'install'] + options.test_requires, env=virtualenv_env)
|
||||
call(['pip', 'install'] + options.test_requires, env=virtualenv_env)
|
||||
|
||||
# run the tests from c:\, with an absolute path in the command
|
||||
# (this ensures that Python runs the tests against the installed wheel
|
||||
@@ -277,10 +286,10 @@ def build(options: BuildOptions) -> None:
|
||||
project=Path('.').resolve(),
|
||||
package=options.package_dir.resolve()
|
||||
)
|
||||
shell([test_command_prepared], cwd='c:\\', env=virtualenv_env)
|
||||
shell(test_command_prepared, cwd='c:\\', env=virtualenv_env)
|
||||
|
||||
# clean up
|
||||
shutil.rmtree(venv_dir)
|
||||
|
||||
# we're all done here; move it to output (remove if already exists)
|
||||
repaired_wheel.replace(options.output_dir / repaired_wheel.name)
|
||||
shutil.move(str(repaired_wheel), options.output_dir)
|
||||
|
||||
@@ -33,4 +33,4 @@ Obviously, manual steps are for chumps, so we can automate this a little by usin
|
||||
|
||||
If you don't need much control over the release of a package, you can set up cibuildwheel to deliver the wheels straight to PyPI. This doesn't require anycloud storage to work - you just need to bump the version and tag it.
|
||||
|
||||
[`examples/travis-deploy.yml`](https://github.com/joerick/cibuildwheel/blob/master/examples/travis-deploy.yml) and [`examples/github-deploy.yml`](https://github.com/joerick/cibuildwheel/blob/master/examples/travis-deploy.yml) are example configurations that automatocially upload wheels to PyPI. Also check out [this example repo](https://github.com/joerick/cibuildwheel-autopypi-example) for more detailed instructions on how to set this up.
|
||||
[`examples/travis-ci-deploy.yml`](https://github.com/joerick/cibuildwheel/blob/master/examples/travis-ci-deploy.yml) and [`examples/github-deploy.yml`](https://github.com/joerick/cibuildwheel/blob/master/examples/github-deploy.yml) are example configurations that automatocially upload wheels to PyPI. Also check out [this example repo](https://github.com/joerick/cibuildwheel-autopypi-example) for more detailed instructions on how to set this up.
|
||||
|
||||
@@ -12,7 +12,7 @@ stack: python 3.7
|
||||
init:
|
||||
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
|
||||
|
||||
install: python -m pip install cibuildwheel==1.5.0
|
||||
install: python -m pip install cibuildwheel==1.5.2
|
||||
|
||||
build_script: python -m cibuildwheel --output-dir wheelhouse
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ jobs:
|
||||
- task: UsePythonVersion@0
|
||||
- bash: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install cibuildwheel==1.5.0
|
||||
pip3 install cibuildwheel==1.5.2
|
||||
cibuildwheel --output-dir wheelhouse .
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs: {pathtoPublish: 'wheelhouse'}
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
- task: UsePythonVersion@0
|
||||
- bash: |
|
||||
python3 -m pip install --upgrade pip
|
||||
pip3 install cibuildwheel==1.5.0
|
||||
pip3 install cibuildwheel==1.5.2
|
||||
cibuildwheel --output-dir wheelhouse .
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs: {pathtoPublish: 'wheelhouse'}
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
displayName: Install Visual C++ for Python 2.7
|
||||
- bash: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install cibuildwheel==1.5.0
|
||||
pip install cibuildwheel==1.5.2
|
||||
cibuildwheel --output-dir wheelhouse .
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs: {pathtoPublish: 'wheelhouse'}
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the Linux wheels.
|
||||
command: |
|
||||
pip3 install --user cibuildwheel==1.5.0
|
||||
pip3 install --user cibuildwheel==1.5.2
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- run:
|
||||
name: Build the OS X wheels.
|
||||
command: |
|
||||
pip3 install --user cibuildwheel==1.5.0
|
||||
pip3 install --user cibuildwheel==1.5.2
|
||||
cibuildwheel --output-dir wheelhouse
|
||||
- store_artifacts:
|
||||
path: wheelhouse/
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: |
|
||||
python -m pip install cibuildwheel==1.5.0
|
||||
python -m pip install cibuildwheel==1.5.2
|
||||
|
||||
- name: Install Visual C++ for Python 2.7
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
- name: Install cibuildwheel
|
||||
run: |
|
||||
python -m pip install cibuildwheel==1.5.0
|
||||
python -m pip install cibuildwheel==1.5.2
|
||||
|
||||
- name: Install Visual C++ for Python 2.7
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
@@ -25,7 +25,7 @@ env:
|
||||
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==1.5.0
|
||||
- python3 -m pip install cibuildwheel==1.5.2
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './wheelhouse'
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- ln -s /c/Python38/python.exe /c/Python38/python3.exe
|
||||
|
||||
install:
|
||||
- python3 -m pip install cibuildwheel==1.5.0
|
||||
- python3 -m pip install cibuildwheel==1.5.2
|
||||
|
||||
script:
|
||||
# build the wheels, put them into './wheelhouse'
|
||||
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
- stage: deploy
|
||||
name: Build and deploy Linux wheels
|
||||
services: docker
|
||||
install: python3 -m pip install cibuildwheel==1.5.0
|
||||
install: python3 -m pip install cibuildwheel==1.5.2
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: |
|
||||
python3 -m pip install twine
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
name: Build and deploy macOS wheels
|
||||
os: osx
|
||||
language: shell
|
||||
install: python3 -m pip install cibuildwheel==1.5.0
|
||||
install: python3 -m pip install cibuildwheel==1.5.2
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: |
|
||||
python3 -m pip install twine
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
name: Build and deploy Windows wheels
|
||||
os: windows
|
||||
language: shell
|
||||
install: python3 -m pip install cibuildwheel==1.5.0
|
||||
install: python3 -m pip install cibuildwheel==1.5.2
|
||||
script: python3 -m cibuildwheel --output-dir wheelhouse
|
||||
after_success: |
|
||||
python3 -m pip install twine
|
||||
|
||||
@@ -11,7 +11,7 @@ long_description = (this_directory / 'README.md').read_text(encoding='utf-8')
|
||||
|
||||
setup(
|
||||
name='cibuildwheel',
|
||||
version='1.5.0',
|
||||
version='1.5.2',
|
||||
install_requires=['bashlex!=0.13', 'toml'],
|
||||
description="Build Python wheels on CI with minimal configuration.",
|
||||
long_description=long_description,
|
||||
|
||||
+8
-3
@@ -6,8 +6,12 @@ basic_project = test_projects.new_c_project(
|
||||
setup_py_add=textwrap.dedent(
|
||||
"""
|
||||
# Will fail if PEP 518 does work
|
||||
import sys
|
||||
import requests
|
||||
assert requests.__version__ == "2.23.0", "Requests found but wrong version ({0})".format(requests.__version__)
|
||||
if sys.version_info < (3, 6, 0):
|
||||
assert requests.__version__ == "2.22.0", "Requests found but wrong version ({0})".format(requests.__version__)
|
||||
else:
|
||||
assert requests.__version__ == "2.23.0", "Requests found but wrong version ({0})".format(requests.__version__)
|
||||
|
||||
# Just making sure environment is still set
|
||||
import os
|
||||
@@ -22,9 +26,10 @@ basic_project.files[
|
||||
] = """
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=42",
|
||||
"setuptools >= 42",
|
||||
"wheel",
|
||||
"requests==2.23.0"
|
||||
"requests==2.22.0; python_version<'3.6'",
|
||||
"requests==2.23.0; python_version>='3.6'"
|
||||
]
|
||||
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
Reference in New Issue
Block a user