Code tidy/reorganise
This commit is contained in:
@@ -177,11 +177,10 @@ def detect_warnings(platform, build_options):
|
|||||||
|
|
||||||
# warn about deprecated {python} and {pip}
|
# warn about deprecated {python} and {pip}
|
||||||
for option_name in ['test_command', 'before_build']:
|
for option_name in ['test_command', 'before_build']:
|
||||||
option_value = build_options.get(option_name)
|
option_value = build_options.get(option_name, '')
|
||||||
|
|
||||||
if option_value:
|
if '{python}' in option_value or '{pip}' in option_value:
|
||||||
if '{python}' in option_value or '{pip}' in option_value:
|
warnings.append(option_name + ": '{python}' and '{pip}' are no longer needed, and will be removed in a future release. Simply use 'python' or 'pip' instead.")
|
||||||
warnings.append(option_name + ": '{python}' and '{pip}' are no longer needed, and will be removed in a future release. Simply use 'python' or 'pip' instead.")
|
|
||||||
|
|
||||||
return warnings
|
return warnings
|
||||||
|
|
||||||
|
|||||||
@@ -47,13 +47,14 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
|||||||
|
|
||||||
# if this version of python isn't installed, get it from python.org and install
|
# if this version of python isn't installed, get it from python.org and install
|
||||||
python_package_identifier = 'org.python.Python.PythonFramework-%s' % config.version
|
python_package_identifier = 'org.python.Python.PythonFramework-%s' % config.version
|
||||||
installation_bin_path = '/Library/Frameworks/Python.framework/Versions/{}/bin'.format(config.version)
|
|
||||||
if python_package_identifier not in installed_system_packages:
|
if python_package_identifier not in installed_system_packages:
|
||||||
# download the pkg
|
# download the pkg
|
||||||
call(['curl', '-L', '-o', '/tmp/Python.pkg', config.url])
|
call(['curl', '-L', '-o', '/tmp/Python.pkg', config.url])
|
||||||
# install
|
# install
|
||||||
call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/'])
|
call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/'])
|
||||||
|
|
||||||
|
installation_bin_path = '/Library/Frameworks/Python.framework/Versions/{}/bin'.format(config.version)
|
||||||
|
|
||||||
# Python bin folders on Mac don't symlink python3 to python, so we do that
|
# Python bin folders on Mac don't symlink python3 to python, so we do that
|
||||||
# so `python` and `pip` always point to the active configuration.
|
# so `python` and `pip` always point to the active configuration.
|
||||||
if os.path.exists('/tmp/cibw_bin'):
|
if os.path.exists('/tmp/cibw_bin'):
|
||||||
|
|||||||
Reference in New Issue
Block a user