esa / pygmo2

A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
https://esa.github.io/pygmo2/
Mozilla Public License 2.0
422 stars 57 forks source link

Adding setup.py for conventional packaging/installation #56

Open dmikushin opened 3 years ago

dmikushin commented 3 years ago

This PR offers conventional Python setup.py script that wraps around the CMake build system. The main advantage of this approach is an ability to build and install the pygmo package for any Python toolchain, and even install directly from your GitHub repository:

pip3 install git+https://github.com/esa/pygmo2.git

This setup should exist for independence of Conda and wider audience.

Furthermore, this PR embeds pagmo and pybind11 as submodules, which could be kept in sync in their proper version combinations.

Credits: setup.py wrapper for CMake is mostly by Ehsan Azar, package metadata is by @johnnymck

dmikushin commented 3 years ago

Builders are yet to be fixed.

HaaLeo commented 3 years ago

Hi @dmikushin I am running macOS X (10.15.6) and tried to install your banch with the following command:

pip3 install git+https://github.com/apc-llc/pygmo2.git

Unfortunately I ran into the following error:

```zsh [...] Using legacy 'setup.py install' for pygmo, since package 'wheel' is not installed. Installing collected packages: pygmo Running setup.py install for pygmo ... error ERROR: Command errored out with exit status 1: command: /Users/leohanisch/_GIT/swarmlib/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/setup.py'"'"'; __file__='"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-record-af1o695h/install-record.txt --single-version-externally-managed --compile --install-headers /Users/leohanisch/_GIT/swarmlib/.venv/include/site/python3.7/pygmo cwd: /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/ Complete output (161 lines): running install running build running build_py creating build creating build/lib.macosx-10.15-x86_64-3.7 creating build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_mp_utils.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_problem.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_check_deps.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_island.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_r_policy_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_algorithms.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_bfe_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_problems.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_ipyparallel_utils.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_bfes.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_problem_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_s_policy_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_topology.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_islands.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_r_policy.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_topology_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_algorithm_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_bfe.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_s_policy.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_algorithm.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_island_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo creating build/lib.macosx-10.15-x86_64-3.7/pygmo/plotting copying pygmo/plotting/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo/plotting running build_ext Building extension for Python 3.7.7 (default, Mar 10 2020, 15:43:33) Invoking CMake setup: 'cmake /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb -DCMAKE_BUILD_TYPE=Release' -- The CXX compiler identification is AppleClang 11.0.3.11030032 -- The C compiler identification is AppleClang 11.0.3.11030032 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- System name: Darwin -- pygmo version: 2.16.0 -- OSX detected, setting the 'CMAKE_MACOSX_RPATH' option to TRUE. -- '-Wshadow': debug flag is supported by the compiler, enabling. -- '-Wtautological-overlap-compare': debug flag is supported by the compiler, enabling. -- '-Wtautological-compare': debug flag is supported by the compiler, enabling. -- '-Wtautological-bitwise-compare': debug flag is not supported by the compiler. -- '-Wbitwise-conditional-parentheses': debug flag is not supported by the compiler. -- '-Wrange-loop-analysis': debug flag is supported by the compiler, enabling. -- '-Wmisleading-indentation': debug flag is not supported by the compiler. -- '-Wc99-designator': debug flag is not supported by the compiler. -- '-Wreorder-init-list': debug flag is not supported by the compiler. -- '-Wsizeof-pointer-div': debug flag is supported by the compiler, enabling. -- '-Wsizeof-array-div': debug flag is not supported by the compiler. -- '-Wxor-used-as-pow': debug flag is not supported by the compiler. -- '-Wfinal-dtor-non-final-class': debug flag is not supported by the compiler. -- '-Wall': debug flag is supported by the compiler, enabling. -- '-Wextra': debug flag is supported by the compiler, enabling. -- '-Wnon-virtual-dtor': debug flag is supported by the compiler, enabling. -- '-Wlogical-op': debug flag is not supported by the compiler. -- '-Wconversion': debug flag is supported by the compiler, enabling. -- '-Wdeprecated': debug flag is supported by the compiler, enabling. -- '-ftemplate-depth=1024': flag is supported by the compiler, enabling. -- '-Wold-style-cast': debug flag is supported by the compiler, enabling. -- '-pedantic-errors': debug flag is supported by the compiler, enabling. -- '-Wdisabled-optimization': debug flag is supported by the compiler, enabling. -- '-ftemplate-backtrace-limit=0': debug flag is supported by the compiler, enabling. -- '-fstack-protector-all': debug flag is supported by the compiler, enabling. -- '-Wsuggest-attribute=pure': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=const': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=noreturn': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=format': debug flag is not supported by the compiler. -- '-Wodr': debug flag is supported by the compiler, enabling. -- '-Wsuggest-final-types': debug flag is not supported by the compiler. -- '-Wsuggest-final-methods': debug flag is not supported by the compiler. -- '-Wsuggest-override': debug flag is not supported by the compiler. -- '-Wshift-negative-value': debug flag is supported by the compiler, enabling. -- '-Wshift-overflow=2': debug flag is not supported by the compiler. -- '-Wduplicated-cond': debug flag is not supported by the compiler. -- '-Wnull-dereference': debug flag is supported by the compiler, enabling. -- '-Wrestrict': debug flag is not supported by the compiler. -- '-Waligned-new': debug flag is not supported by the compiler. -- '-Wcast-align=strict': debug flag is not supported by the compiler. -- '-fdiagnostics-show-template-tree': flag is supported by the compiler, enabling. -- The C++ compiler ID is: AppleClang -- YACMA autodetected C++ flags: -ftemplate-depth=1024;-fdiagnostics-show-template-tree -- YACMA autodetected C++ debug flags: -Wshadow;-Werror;-Wtautological-overlap-compare;-Wtautological-compare;-Wrange-loop-analysis;-Wsizeof-pointer-div;-Wall;-Wextra;-Wnon-virtual-dtor;-Wconversion;-Wdeprecated;-Wold-style-cast;-pedantic-errors;-Wdisabled-optimization;-ftemplate-backtrace-limit=0;-fstack-protector-all;-Wodr;-Wshift-negative-value;-Wnull-dereference -- Library installation directory: lib -- System name: Darwin -- Looking for C++ include sys/types.h -- Looking for C++ include sys/types.h - found -- Looking for C++ include sys/wait.h -- Looking for C++ include sys/wait.h - found -- Looking for C++ include unistd.h -- Looking for C++ include unistd.h - found -- Looking for fork -- Looking for fork - found -- The fork_island UDI will be available. -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Thread library: -- POSIX threads detected. -- Looking for pthread_setaffinity_np -- Looking for pthread_setaffinity_np - not found -- Looking for pthread_getaffinity_np -- Looking for pthread_getaffinity_np - not found -- POSIX threads affinity extensions NOT detected. -- The 'thread_local' keyword is supported. -- Clang compiler on OSX detected, setting the standard library to 'libc++'. CMake Error at ThirdParty/pagmo2/cmake_modules/FindTBB.cmake:118 (message): Required library TBB not found. Call Stack (most recent call first): ThirdParty/pagmo2/cmake_modules/FindTBB.cmake:349 (findpkg_finish) ThirdParty/pagmo2/CMakeLists.txt:118 (find_package) -- Configuring incomplete, errors occurred! See also "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/build/temp.macosx-10.15-x86_64-3.7/CMakeFiles/CMakeOutput.log". See also "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/build/temp.macosx-10.15-x86_64-3.7/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "", line 1, in File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/setup.py", line 269, in keywords=['optimization', 'parallel computations', 'island model'], File "/Users/leohanisch/_GIT/swarmlib/.venv/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/leohanisch/_GIT/swarmlib/.venv/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/setup.py", line 147, in run self.build_extension(ext) File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/setup.py", line 175, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/leohanisch/_GIT/swarmlib/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/setup.py'"'"'; __file__='"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-t5n3_dlb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-record-af1o695h/install-record.txt --single-version-externally-managed --compile --install-headers /Users/leohanisch/_GIT/swarmlib/.venv/include/site/python3.7/pygmo Check the logs for full command output. ```
dmikushin commented 3 years ago

Dear @HaaLeo thank you very much for testing, this is very helpful. In 8d5efb1 I've now added TBB as a submodule. Could you please kindly give it another shot?

HaaLeo commented 3 years ago

Hi @dmikushin I get another error:

```zsh Installing collected packages: pygmo Running setup.py install for pygmo ... error ERROR: Command errored out with exit status 1: command: /Users/leohanisch/_GIT/swarmlib/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/setup.py'"'"'; __file__='"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-record-zhfmprot/install-record.txt --single-version-externally-managed --compile --install-headers /Users/leohanisch/_GIT/swarmlib/.venv/include/site/python3.7/pygmo cwd: /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/ Complete output (173 lines): running install running build running build_py creating build creating build/lib.macosx-10.15-x86_64-3.7 creating build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_mp_utils.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_problem.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_check_deps.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_island.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_r_policy_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_algorithms.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_bfe_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_problems.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_ipyparallel_utils.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_bfes.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_problem_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_s_policy_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_topology.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_islands.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_r_policy.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_topology_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_algorithm_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_bfe.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_s_policy.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_algorithm.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_island_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo creating build/lib.macosx-10.15-x86_64-3.7/pygmo/plotting copying pygmo/plotting/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo/plotting running build_ext Building extension for Python 3.7.7 (default, Mar 10 2020, 15:43:33) Invoking CMake setup: 'cmake /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd -DCMAKE_BUILD_TYPE=Release' -- The CXX compiler identification is AppleClang 11.0.3.11030032 -- The C compiler identification is AppleClang 11.0.3.11030032 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- System name: Darwin -- pygmo version: 2.16.0 -- OSX detected, setting the 'CMAKE_MACOSX_RPATH' option to TRUE. -- '-Wshadow': debug flag is supported by the compiler, enabling. -- '-Wtautological-overlap-compare': debug flag is supported by the compiler, enabling. -- '-Wtautological-compare': debug flag is supported by the compiler, enabling. -- '-Wtautological-bitwise-compare': debug flag is not supported by the compiler. -- '-Wbitwise-conditional-parentheses': debug flag is not supported by the compiler. -- '-Wrange-loop-analysis': debug flag is supported by the compiler, enabling. -- '-Wmisleading-indentation': debug flag is not supported by the compiler. -- '-Wc99-designator': debug flag is not supported by the compiler. -- '-Wreorder-init-list': debug flag is not supported by the compiler. -- '-Wsizeof-pointer-div': debug flag is supported by the compiler, enabling. -- '-Wsizeof-array-div': debug flag is not supported by the compiler. -- '-Wxor-used-as-pow': debug flag is not supported by the compiler. -- '-Wfinal-dtor-non-final-class': debug flag is not supported by the compiler. -- '-Wall': debug flag is supported by the compiler, enabling. -- '-Wextra': debug flag is supported by the compiler, enabling. -- '-Wnon-virtual-dtor': debug flag is supported by the compiler, enabling. -- '-Wlogical-op': debug flag is not supported by the compiler. -- '-Wconversion': debug flag is supported by the compiler, enabling. -- '-Wdeprecated': debug flag is supported by the compiler, enabling. -- '-ftemplate-depth=1024': flag is supported by the compiler, enabling. -- '-Wold-style-cast': debug flag is supported by the compiler, enabling. -- '-pedantic-errors': debug flag is supported by the compiler, enabling. -- '-Wdisabled-optimization': debug flag is supported by the compiler, enabling. -- '-ftemplate-backtrace-limit=0': debug flag is supported by the compiler, enabling. -- '-fstack-protector-all': debug flag is supported by the compiler, enabling. -- '-Wsuggest-attribute=pure': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=const': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=noreturn': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=format': debug flag is not supported by the compiler. -- '-Wodr': debug flag is supported by the compiler, enabling. -- '-Wsuggest-final-types': debug flag is not supported by the compiler. -- '-Wsuggest-final-methods': debug flag is not supported by the compiler. -- '-Wsuggest-override': debug flag is not supported by the compiler. -- '-Wshift-negative-value': debug flag is supported by the compiler, enabling. -- '-Wshift-overflow=2': debug flag is not supported by the compiler. -- '-Wduplicated-cond': debug flag is not supported by the compiler. -- '-Wnull-dereference': debug flag is supported by the compiler, enabling. -- '-Wrestrict': debug flag is not supported by the compiler. -- '-Waligned-new': debug flag is not supported by the compiler. -- '-Wcast-align=strict': debug flag is not supported by the compiler. -- '-fdiagnostics-show-template-tree': flag is supported by the compiler, enabling. -- The C++ compiler ID is: AppleClang -- YACMA autodetected C++ flags: -ftemplate-depth=1024;-fdiagnostics-show-template-tree -- YACMA autodetected C++ debug flags: -Wshadow;-Werror;-Wtautological-overlap-compare;-Wtautological-compare;-Wrange-loop-analysis;-Wsizeof-pointer-div;-Wall;-Wextra;-Wnon-virtual-dtor;-Wconversion;-Wdeprecated;-Wold-style-cast;-pedantic-errors;-Wdisabled-optimization;-ftemplate-backtrace-limit=0;-fstack-protector-all;-Wodr;-Wshift-negative-value;-Wnull-dereference -- Library installation directory: lib -- TBB: using libc++. -- System name: Darwin -- Looking for C++ include sys/types.h -- Looking for C++ include sys/types.h - found -- Looking for C++ include sys/wait.h -- Looking for C++ include sys/wait.h - found -- Looking for C++ include unistd.h -- Looking for C++ include unistd.h - found -- Looking for fork -- Looking for fork - found -- The fork_island UDI will be available. -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Thread library: -- POSIX threads detected. -- Looking for pthread_setaffinity_np -- Looking for pthread_setaffinity_np - not found -- Looking for pthread_getaffinity_np -- Looking for pthread_getaffinity_np - not found -- POSIX threads affinity extensions NOT detected. -- The 'thread_local' keyword is supported. -- Clang compiler on OSX detected, setting the standard library to 'libc++'. CMake Error at ThirdParty/pagmo2/cmake_modules/FindTBB.cmake:400 (file): file STRINGS file "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/ThirdParty/pagmo2/TBB_INCLUDE_DIR-NOTFOUND/tbb/tbb_stddef.h" cannot be read. Call Stack (most recent call first): ThirdParty/pagmo2/CMakeLists.txt:118 (find_package) CMake Error at /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:165 (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least version "1.60.0") Call Stack (most recent call first): /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindBoost.cmake:2177 (find_package_handle_standard_args) ThirdParty/pagmo2/cmake_modules/PagmoFindBoost.cmake:4 (find_package) ThirdParty/pagmo2/CMakeLists.txt:144 (include) -- Configuring incomplete, errors occurred! See also "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/build/temp.macosx-10.15-x86_64-3.7/CMakeFiles/CMakeOutput.log". See also "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/build/temp.macosx-10.15-x86_64-3.7/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "", line 1, in File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/setup.py", line 269, in keywords=['optimization', 'parallel computations', 'island model'], File "/Users/leohanisch/_GIT/swarmlib/.venv/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/leohanisch/_GIT/swarmlib/.venv/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/setup.py", line 147, in run self.build_extension(ext) File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/setup.py", line 175, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/leohanisch/_GIT/swarmlib/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/setup.py'"'"'; __file__='"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-1raajpgd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-record-zhfmprot/install-record.txt --single-version-externally-managed --compile --install-headers /Users/leohanisch/_GIT/swarmlib/.venv/include/site/python3.7/pygmo Check the logs for full command output. ```
dmikushin commented 3 years ago

Thanks, @HaaLeo could you please also test with the fix: f90898b0c49141a66ebddb720248670fdad98e0c

HaaLeo commented 3 years ago

Again an error:

```zsh Installing collected packages: pygmo Running setup.py install for pygmo ... error ERROR: Command errored out with exit status 1: command: /Users/leohanisch/_GIT/swarmlib/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/setup.py'"'"'; __file__='"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-record-tfro10pa/install-record.txt --single-version-externally-managed --compile --install-headers /Users/leohanisch/_GIT/swarmlib/.venv/include/site/python3.7/pygmo cwd: /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/ Complete output (165 lines): running install running build running build_py creating build creating build/lib.macosx-10.15-x86_64-3.7 creating build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_mp_utils.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_problem.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_check_deps.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_island.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_r_policy_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_algorithms.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_bfe_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_problems.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_ipyparallel_utils.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_bfes.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_problem_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_s_policy_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_topology.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_py_islands.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_r_policy.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_topology_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_algorithm_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_bfe.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_s_policy.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_patch_algorithm.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo copying pygmo/_island_test.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo creating build/lib.macosx-10.15-x86_64-3.7/pygmo/plotting copying pygmo/plotting/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/pygmo/plotting running build_ext Building extension for Python 3.7.7 (default, Mar 10 2020, 15:43:33) Invoking CMake setup: 'cmake /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7 -DCMAKE_BUILD_TYPE=Release' -- The CXX compiler identification is AppleClang 11.0.3.11030032 -- The C compiler identification is AppleClang 11.0.3.11030032 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- System name: Darwin -- pygmo version: 2.16.0 -- OSX detected, setting the 'CMAKE_MACOSX_RPATH' option to TRUE. -- '-Wshadow': debug flag is supported by the compiler, enabling. -- '-Wtautological-overlap-compare': debug flag is supported by the compiler, enabling. -- '-Wtautological-compare': debug flag is supported by the compiler, enabling. -- '-Wtautological-bitwise-compare': debug flag is not supported by the compiler. -- '-Wbitwise-conditional-parentheses': debug flag is not supported by the compiler. -- '-Wrange-loop-analysis': debug flag is supported by the compiler, enabling. -- '-Wmisleading-indentation': debug flag is not supported by the compiler. -- '-Wc99-designator': debug flag is not supported by the compiler. -- '-Wreorder-init-list': debug flag is not supported by the compiler. -- '-Wsizeof-pointer-div': debug flag is supported by the compiler, enabling. -- '-Wsizeof-array-div': debug flag is not supported by the compiler. -- '-Wxor-used-as-pow': debug flag is not supported by the compiler. -- '-Wfinal-dtor-non-final-class': debug flag is not supported by the compiler. -- '-Wall': debug flag is supported by the compiler, enabling. -- '-Wextra': debug flag is supported by the compiler, enabling. -- '-Wnon-virtual-dtor': debug flag is supported by the compiler, enabling. -- '-Wlogical-op': debug flag is not supported by the compiler. -- '-Wconversion': debug flag is supported by the compiler, enabling. -- '-Wdeprecated': debug flag is supported by the compiler, enabling. -- '-ftemplate-depth=1024': flag is supported by the compiler, enabling. -- '-Wold-style-cast': debug flag is supported by the compiler, enabling. -- '-pedantic-errors': debug flag is supported by the compiler, enabling. -- '-Wdisabled-optimization': debug flag is supported by the compiler, enabling. -- '-ftemplate-backtrace-limit=0': debug flag is supported by the compiler, enabling. -- '-fstack-protector-all': debug flag is supported by the compiler, enabling. -- '-Wsuggest-attribute=pure': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=const': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=noreturn': debug flag is not supported by the compiler. -- '-Wsuggest-attribute=format': debug flag is not supported by the compiler. -- '-Wodr': debug flag is supported by the compiler, enabling. -- '-Wsuggest-final-types': debug flag is not supported by the compiler. -- '-Wsuggest-final-methods': debug flag is not supported by the compiler. -- '-Wsuggest-override': debug flag is not supported by the compiler. -- '-Wshift-negative-value': debug flag is supported by the compiler, enabling. -- '-Wshift-overflow=2': debug flag is not supported by the compiler. -- '-Wduplicated-cond': debug flag is not supported by the compiler. -- '-Wnull-dereference': debug flag is supported by the compiler, enabling. -- '-Wrestrict': debug flag is not supported by the compiler. -- '-Waligned-new': debug flag is not supported by the compiler. -- '-Wcast-align=strict': debug flag is not supported by the compiler. -- '-fdiagnostics-show-template-tree': flag is supported by the compiler, enabling. -- The C++ compiler ID is: AppleClang -- YACMA autodetected C++ flags: -ftemplate-depth=1024;-fdiagnostics-show-template-tree -- YACMA autodetected C++ debug flags: -Wshadow;-Werror;-Wtautological-overlap-compare;-Wtautological-compare;-Wrange-loop-analysis;-Wsizeof-pointer-div;-Wall;-Wextra;-Wnon-virtual-dtor;-Wconversion;-Wdeprecated;-Wold-style-cast;-pedantic-errors;-Wdisabled-optimization;-ftemplate-backtrace-limit=0;-fstack-protector-all;-Wodr;-Wshift-negative-value;-Wnull-dereference -- Library installation directory: lib -- TBB: using libc++. -- System name: Darwin -- Looking for C++ include sys/types.h -- Looking for C++ include sys/types.h - found -- Looking for C++ include sys/wait.h -- Looking for C++ include sys/wait.h - found -- Looking for C++ include unistd.h -- Looking for C++ include unistd.h - found -- Looking for fork -- Looking for fork - found -- The fork_island UDI will be available. -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Thread library: -- POSIX threads detected. -- Looking for pthread_setaffinity_np -- Looking for pthread_setaffinity_np - not found -- Looking for pthread_getaffinity_np -- Looking for pthread_getaffinity_np - not found -- POSIX threads affinity extensions NOT detected. -- The 'thread_local' keyword is supported. -- Clang compiler on OSX detected, setting the standard library to 'libc++'. CMake Error at /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:165 (message): Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least version "1.60.0") Call Stack (most recent call first): /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindBoost.cmake:2177 (find_package_handle_standard_args) ThirdParty/pagmo2/cmake_modules/PagmoFindBoost.cmake:4 (find_package) ThirdParty/pagmo2/CMakeLists.txt:144 (include) -- Configuring incomplete, errors occurred! See also "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/build/temp.macosx-10.15-x86_64-3.7/CMakeFiles/CMakeOutput.log". See also "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/build/temp.macosx-10.15-x86_64-3.7/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "", line 1, in File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/setup.py", line 269, in keywords=['optimization', 'parallel computations', 'island model'], File "/Users/leohanisch/_GIT/swarmlib/.venv/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/leohanisch/_GIT/swarmlib/.venv/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/setup.py", line 147, in run self.build_extension(ext) File "/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/setup.py", line 175, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/leohanisch/_GIT/swarmlib/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/setup.py'"'"'; __file__='"'"'/private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-req-build-ixk6upw7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ss/lcyk0mn518s66c5mm5d0s4hw0000gn/T/pip-record-tfro10pa/install-record.txt --single-version-externally-managed --compile --install-headers /Users/leohanisch/_GIT/swarmlib/.venv/include/site/python3.7/pygmo Check the logs for full command output. ```
bluescarni commented 3 years ago

@dmikushin thanks for taking the initiative on this. Most of the core devs are currently on vacation, I should be able to get more involved in the next week or so.

I don't think anyone in the dev team has much experience with the setuptools machinery, would you be able to help us maintain this alternative build system and prevent it from breaking in the future?

dmikushin commented 3 years ago

Dear @bluescarni I'm sorry for late reply! I'm still polishing the build rules for best experience.