Merge remote-tracking branch 'origin/master' into macos-universal2

This commit is contained in:
Joe Rickerby
2021-01-08 15:02:20 +00:00
42 changed files with 116 additions and 96 deletions
+5
View File
@@ -11,6 +11,11 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.790
hooks:
+8 -6
View File
@@ -1,13 +1,15 @@
#!/usr/bin/env python3
import click
from pathlib import Path
import os
import cibuildwheel
from packaging.version import Version, InvalidVersion
import subprocess
import glob
import os
import subprocess
import urllib.parse
from pathlib import Path
import click
from packaging.version import InvalidVersion, Version
import cibuildwheel
config = [
# file path, version find/replace format
+1 -1
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env python3
import os
import textwrap
import time
from pathlib import Path
from subprocess import run
import click
import textwrap
def shell(cmd, **kwargs):
+4 -5
View File
@@ -11,17 +11,16 @@ Suggested usage:
import builtins
import functools
import urllib.request
import xml.dom.minidom
from datetime import datetime
from io import StringIO
from typing import Dict, Any, List, Optional, TextIO
from pathlib import Path
from typing import Any, Dict, List, Optional, TextIO
import click
import yaml
from github import Github
import urllib.request
import xml.dom.minidom
from pathlib import Path
ICONS = (
"appveyor",
+5 -4
View File
@@ -1,17 +1,18 @@
#!/usr/bin/env python3
import os
from pathlib import Path
import shutil
from subprocess import run
import sys
import textwrap
import time
import click
from glob import glob
from collections import namedtuple
from glob import glob
from pathlib import Path
from subprocess import run
from urllib.parse import quote
import click
def shell(cmd, **kwargs):
return run([cmd], shell=True, **kwargs)
+1 -1
View File
@@ -1,9 +1,9 @@
#!/usr/bin/env python3
import argparse
import os
import subprocess
import sys
import argparse
import tempfile
from pathlib import Path
+1 -5
View File
@@ -5,17 +5,13 @@ import textwrap
import traceback
from configparser import ConfigParser
from pathlib import Path
from typing import Any, Dict, List, Optional, Set, overload
import cibuildwheel
import cibuildwheel.linux
import cibuildwheel.macos
import cibuildwheel.windows
from cibuildwheel.environment import (
EnvironmentParseError,
parse_environment,
)
from cibuildwheel.environment import EnvironmentParseError, parse_environment
from cibuildwheel.util import (
Architecture,
BuildOptions,
+1 -1
View File
@@ -6,8 +6,8 @@ import subprocess
import sys
import uuid
from pathlib import Path, PurePath
from typing import cast, IO, Dict, List, Optional, Sequence, Type
from types import TracebackType
from typing import IO, Dict, List, Optional, Sequence, Type, cast
from .typing import PathOrStr, PopenBytes
+2 -2
View File
@@ -1,7 +1,7 @@
import bashlex
from typing import Dict, List, Mapping, Optional
import bashlex
from . import bashlex_eval
+9 -4
View File
@@ -6,11 +6,16 @@ from typing import List, NamedTuple, Set
from .docker_container import DockerContainer
from .logger import log
from .util import (
Architecture, BuildOptions, BuildSelector, NonPlatformWheelError,
allowed_architectures_check, get_build_verbosity_extra_flags, prepare_command,
)
from .typing import PathOrStr
from .util import (
Architecture,
BuildOptions,
BuildSelector,
NonPlatformWheelError,
allowed_architectures_check,
get_build_verbosity_extra_flags,
prepare_command,
)
class PythonConfiguration(NamedTuple):
+1 -1
View File
@@ -3,7 +3,7 @@ import os
import re
import sys
import time
from typing import Optional, Union, AnyStr, IO
from typing import IO, AnyStr, Optional, Union
from cibuildwheel.util import CIProvider, detect_ci_provider
+13 -4
View File
@@ -10,11 +10,20 @@ from typing import Any, Dict, List, NamedTuple, Optional, Sequence, Set, Tuple,
from .environment import ParsedEnvironment
from .logger import log
from .util import (Architecture, BuildOptions, BuildSelector, NonPlatformWheelError,
download, get_build_verbosity_extra_flags, get_pip_script,
install_certifi_script, prepare_command, allowed_architectures_check,
unwrap)
from .typing import PathOrStr
from .util import (
Architecture,
BuildOptions,
BuildSelector,
NonPlatformWheelError,
allowed_architectures_check,
download,
get_build_verbosity_extra_flags,
get_pip_script,
install_certifi_script,
prepare_command,
unwrap,
)
def call(args: Sequence[PathOrStr], env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None, shell: bool = False) -> int:
+1 -1
View File
@@ -23,8 +23,8 @@
import os.path
import pkgutil
import shutil
import sys
import struct
import sys
import tempfile
# Useful for very coarse version differentiation.
@@ -29,6 +29,7 @@ def main():
"-E", "-s", "-m", "pip", "install", "--upgrade", "certifi"])
import certifi
# change working directory to the default SSL directory
os.chdir(openssl_dir)
relpath_to_certifi_cafile = os.path.relpath(certifi.where())
+1 -2
View File
@@ -1,7 +1,6 @@
from typing import Union, TYPE_CHECKING
import os
import subprocess
from typing import TYPE_CHECKING, Union
if TYPE_CHECKING:
PopenBytes = subprocess.Popen[bytes]
+1 -1
View File
@@ -1,9 +1,9 @@
import functools
import os
import platform as platform_module
import re
import ssl
import sys
import functools
import textwrap
import urllib.request
from enum import Enum
+11 -3
View File
@@ -11,10 +11,18 @@ import toml
from .environment import ParsedEnvironment
from .logger import log
from .util import (Architecture, BuildOptions, BuildSelector, NonPlatformWheelError,
download, get_build_verbosity_extra_flags, get_pip_script,
prepare_command, allowed_architectures_check)
from .typing import PathOrStr
from .util import (
Architecture,
BuildOptions,
BuildSelector,
NonPlatformWheelError,
allowed_architectures_check,
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'
+4
View File
@@ -111,3 +111,7 @@ ignore_missing_imports = True
[mypy-bashlex.*]
ignore_missing_imports = True
[tool:isort]
profile=black
multi_line_output=3
+2
View File
@@ -1,8 +1,10 @@
import platform
import textwrap
import pytest
from cibuildwheel.logger import Logger
from . import test_projects, utils
basic_project = test_projects.new_c_project(
+3 -3
View File
@@ -1,9 +1,9 @@
import pytest
import subprocess
import textwrap
from . import utils
from . import test_projects
import pytest
from . import test_projects, utils
project_with_before_build_asserts = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
+3 -3
View File
@@ -1,9 +1,9 @@
import pytest
import subprocess
import textwrap
from . import utils
from . import test_projects
import pytest
from . import test_projects, utils
project_with_before_build_asserts = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
+1 -2
View File
@@ -1,5 +1,4 @@
from . import test_projects
from . import utils
from . import test_projects, utils
before_test_project = test_projects.new_c_project()
before_test_project.files['test/spam_test.py'] = r'''
+1 -2
View File
@@ -1,7 +1,6 @@
import textwrap
from . import utils
from . import test_projects
from . import test_projects, utils
project_with_skip_asserts = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
+4 -4
View File
@@ -1,11 +1,11 @@
import re
import pytest
import textwrap
import pytest
import cibuildwheel.util
from . import utils
from . import test_projects
from . import test_projects, utils
project_with_expected_version_checks = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
+1 -2
View File
@@ -3,8 +3,7 @@ import textwrap
import pytest
from . import utils
from . import test_projects
from . import test_projects, utils
dockcross_only_project = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
+3 -3
View File
@@ -1,8 +1,8 @@
import subprocess
import pytest
from . import utils
from . import test_projects
import pytest
from . import test_projects, utils
project_with_a_test = test_projects.new_c_project()
+3 -3
View File
@@ -1,10 +1,10 @@
import os
import pytest
import subprocess
import textwrap
from . import utils
from . import test_projects
import pytest
from . import test_projects, utils
project_with_environment_asserts = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
+2 -1
View File
@@ -1,6 +1,7 @@
import pytest
import platform
import pytest
from . import test_projects, utils
basic_project = test_projects.new_c_project()
+1 -2
View File
@@ -3,8 +3,7 @@ import textwrap
import pytest
from . import utils
from . import test_projects
from . import test_projects, utils
# TODO: specify these at runtime according to manylinux_image
project_with_manylinux_symbols = test_projects.new_c_project(
+3 -3
View File
@@ -1,7 +1,7 @@
import textwrap
from . import test_projects
from . import utils
import os
import textwrap
from . import test_projects, utils
basic_project = test_projects.new_c_project(
setup_py_add=textwrap.dedent(
+1 -3
View File
@@ -1,10 +1,8 @@
from pathlib import Path
from typing import Any, Dict, Union
import jinja2
from typing import Union, Dict, Any
FilesDict = Dict[str, Union[str, jinja2.Template]]
TemplateContext = Dict[str, Any]
+1 -1
View File
@@ -1,6 +1,6 @@
import jinja2
from .base import TestProject
from .base import TestProject
SPAM_C_TEMPLATE = r'''
#include <Python.h>
+3 -1
View File
@@ -1,6 +1,8 @@
import subprocess
import pytest
from test import test_projects
import pytest
from . import utils
pure_python_project = test_projects.TestProject()
+1 -2
View File
@@ -1,7 +1,6 @@
import textwrap
from . import utils
from . import test_projects
from . import test_projects, utils
project_with_ssl_tests = test_projects.new_c_project(
setup_py_add=textwrap.dedent(r'''
+1 -2
View File
@@ -4,8 +4,7 @@ import textwrap
import pytest
from . import utils
from . import test_projects
from . import test_projects, utils
project_with_a_test = test_projects.new_c_project(
setup_cfg_add=textwrap.dedent(r'''
+3 -1
View File
@@ -1,7 +1,9 @@
import subprocess
import pytest
from .test_projects import TestProject
from . import utils
from .test_projects import TestProject
so_file_project = TestProject()
+1 -2
View File
@@ -2,8 +2,7 @@ import textwrap
import pytest
from . import utils
from . import test_projects
from . import test_projects, utils
project_with_unicode = test_projects.new_c_project(
spam_c_function_add=textwrap.dedent(r'''
+2 -2
View File
@@ -1,7 +1,7 @@
from cibuildwheel.util import DependencyConstraints
from pathlib import Path
from cibuildwheel.util import DependencyConstraints
def test_defaults():
dependency_constraints = DependencyConstraints.with_defaults()
+3 -3
View File
@@ -1,9 +1,9 @@
import certifi
import pytest
import ssl
from cibuildwheel.util import download
import certifi
import pytest
from cibuildwheel.util import download
DOWNLOAD_URL = 'https://raw.githubusercontent.com/joerick/cibuildwheel/v1.6.3/requirements-dev.txt'
+1 -6
View File
@@ -4,12 +4,7 @@ from pathlib import Path
import pytest
from cibuildwheel import (
linux,
macos,
util,
windows,
)
from cibuildwheel import linux, macos, util, windows
class ArgsInterceptor:
@@ -8,7 +8,6 @@ from cibuildwheel.__main__ import main
from cibuildwheel.environment import ParsedEnvironment
from cibuildwheel.util import BuildSelector
# CIBW_PLATFORM is tested in main_platform_test.py
+2 -3
View File
@@ -1,12 +1,11 @@
import platform as platform_module
from cibuildwheel.util import Architecture
import sys
import pytest
from conftest import MOCK_PACKAGE_DIR # noqa: I100
from cibuildwheel.__main__ import main
from conftest import MOCK_PACKAGE_DIR # noqa: I100
from cibuildwheel.util import Architecture
def test_unknown_platform_non_ci(monkeypatch, capsys):