Replace Callable[[str], bool] by BuildSelector
This commit is contained in:
@@ -6,10 +6,11 @@ import sys
|
||||
import textwrap
|
||||
import uuid
|
||||
|
||||
from typing import Callable, List, NamedTuple, Optional, Union
|
||||
from typing import List, NamedTuple, Optional, Union
|
||||
|
||||
from .util import (
|
||||
BuildOptions,
|
||||
BuildSelector,
|
||||
get_build_verbosity_extra_flags,
|
||||
prepare_command,
|
||||
)
|
||||
@@ -49,7 +50,7 @@ class PythonConfiguration(NamedTuple):
|
||||
path: str
|
||||
|
||||
|
||||
def get_python_configurations(build_selector: Callable[[str], bool]) -> List[PythonConfiguration]:
|
||||
def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfiguration]:
|
||||
python_configurations = [
|
||||
PythonConfiguration(version='2.7', identifier='cp27-manylinux_x86_64', path='/opt/python/cp27-cp27m'),
|
||||
PythonConfiguration(version='2.7', identifier='cp27-manylinux_x86_64', path='/opt/python/cp27-cp27mu'),
|
||||
|
||||
@@ -6,11 +6,12 @@ import sys
|
||||
import tempfile
|
||||
from glob import glob
|
||||
|
||||
from typing import Callable, Dict, List, Optional, NamedTuple, Union
|
||||
from typing import Dict, List, Optional, NamedTuple, Union
|
||||
|
||||
from .environment import ParsedEnvironment
|
||||
from .util import (
|
||||
BuildOptions,
|
||||
BuildSelector,
|
||||
download,
|
||||
get_build_verbosity_extra_flags,
|
||||
get_pip_script,
|
||||
@@ -34,7 +35,7 @@ class PythonConfiguration(NamedTuple):
|
||||
url: str
|
||||
|
||||
|
||||
def get_python_configurations(build_selector: Callable[[str], bool]) -> List[PythonConfiguration]:
|
||||
def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfiguration]:
|
||||
python_configurations = [
|
||||
# CPython
|
||||
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'),
|
||||
|
||||
@@ -6,11 +6,12 @@ import tempfile
|
||||
from glob import glob
|
||||
from zipfile import ZipFile
|
||||
|
||||
from typing import Callable, Dict, List, Optional, NamedTuple
|
||||
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,
|
||||
@@ -41,7 +42,7 @@ class PythonConfiguration(NamedTuple):
|
||||
url: Optional[str]
|
||||
|
||||
|
||||
def get_python_configurations(build_selector: Callable[[str], bool]) -> List[PythonConfiguration]:
|
||||
def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfiguration]:
|
||||
python_configurations = [
|
||||
# CPython
|
||||
PythonConfiguration(version='2.7.18', arch='32', identifier='cp27-win32', url=None),
|
||||
|
||||
Reference in New Issue
Block a user