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