Merge pull request #212 from lightwave-lab/travis-ci/fix/py37

Recent bugfixes in Travis-CI
This commit is contained in:
Matthias Köfferlein 2018-12-30 22:46:24 +01:00 committed by GitHub
commit e637d0cf5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 12 deletions

View File

@ -228,7 +228,7 @@ matrix:
- qt
update: true
env:
- MATRIX_EVAL=""
- MATRIX_EVAL="brew update; brew install qt" # homebrew addon fails for xcode8
- PYTHON_VERSION=B37
- MACOS_VERSION=ElCapitan
- KLAYOUT_BUILD=true
@ -271,7 +271,7 @@ matrix:
- qt
update: true
env:
- MATRIX_EVAL=""
- MATRIX_EVAL="brew update; brew install qt" # homebrew addon fails for xcode8
- PYTHON_VERSION=Sys
- MACOS_VERSION=ElCapitan
- KLAYOUT_BUILD=true

View File

@ -1,4 +0,0 @@
tap "homebrew/core"
brew "python3"
brew "python@2", link: false
brew "qt"

View File

@ -59,13 +59,13 @@ from setuptools.extension import Extension, Library
import glob
import os
import platform
import distutils.sysconfig as sysconfig
from distutils.errors import CompileError
import distutils.command.build_ext
import setuptools.command.build_ext
import multiprocessing
N_cores = multiprocessing.cpu_count()
# monkey-patch for parallel compilation
# from https://stackoverflow.com/questions/11013851/speeding-up-build-process-with-distutils
def parallelCCompile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None):
@ -88,6 +88,7 @@ def parallelCCompile(self, sources, output_dir=None, macros=None, include_dirs=N
n_tries = 2
while n_tries > 0:
try:
print("Building", obj)
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
except CompileError:
n_tries -= 1
@ -95,7 +96,7 @@ def parallelCCompile(self, sources, output_dir=None, macros=None, include_dirs=N
else:
break
# convert to list, imap is evaluated on-demand
list(multiprocessing.pool.ThreadPool(N).imap(_single_compile, objects))
list(multiprocessing.pool.ThreadPool(N).map(_single_compile, objects))
return objects
@ -155,10 +156,10 @@ distutils.ccompiler.CCompiler.library_filename = patched_library_filename
# for this ... We're patching this back now.
def always_link_shared_object(
self, objects, output_libname, output_dir=None, libraries=None,
library_dirs=None, runtime_library_dirs=None, export_symbols=None,
debug=0, extra_preargs=None, extra_postargs=None, build_temp=None,
target_lang=None):
self, objects, output_libname, output_dir=None, libraries=None,
library_dirs=None, runtime_library_dirs=None, export_symbols=None,
debug=0, extra_preargs=None, extra_postargs=None, build_temp=None,
target_lang=None):
self.link(
self.SHARED_LIBRARY, objects, output_libname,
output_dir, libraries, library_dirs, runtime_library_dirs,
@ -166,6 +167,7 @@ def always_link_shared_object(
build_temp, target_lang
)
setuptools.command.build_ext.libtype = "shared"
setuptools.command.build_ext.link_shared_object = always_link_shared_object