From 4145034aea77a346224a4e9a23f7b7c6b93eb627 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Mon, 29 Apr 2019 12:56:08 +0200 Subject: [PATCH 1/5] Build extra python modules as part of AthenaExternals Move code for building additional python modules from athena repository (Exernals/AtlasPyFwdBwdPorts) into externals repo as PyModules. The list of which modules to build has been revised, with unused modules removed and versions of active modules updated to the latest releases. See https://its.cern.ch/jira/browse/ATLINFR-2325 for further details. Source tarballs are now no longer stored in the git repository, but are retrieved from http://cern.ch/atlas-software-dist-eos/externals/PyModules. --- External/PyModules/CMakeLists.txt | 100 +++++++++++++++++++ Projects/AthenaExternals/package_filters.txt | 3 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 External/PyModules/CMakeLists.txt diff --git a/External/PyModules/CMakeLists.txt b/External/PyModules/CMakeLists.txt new file mode 100644 index 00000000..57103349 --- /dev/null +++ b/External/PyModules/CMakeLists.txt @@ -0,0 +1,100 @@ +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# +# CMake configuration for additional Python modules to be built +# as part of ATLAS externals +# + +# The name of the package: +atlas_subdir( PyModules ) + +# In "release mode" return right away: +if( ATLAS_RELEASE_MODE ) + return() +endif() + +# for setuptools +find_package( pytools ) + +# Helper macro for building and installing python packages. +# Usage: _setup_python_package( name tarball md5 +# [DEPENDS dep...] ) +# +function( _setup_python_package name file md5 ) + # Location of the source tarballs: + set( _sourceURL "http://cern.ch/atlas-software-dist-eos/externals/PyModules" ) + + # A common installation directory for all python externals of the package: + set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PyModulesBuild ) + set( _sitePkgsDir ${_buildDir}/lib/python2.7/site-packages ) + + # Parse the optional argument(s): + cmake_parse_arguments( ARG "" "" "DEPENDS" ${ARGN} ) + + # Build the package with the help of python's distutils: + ExternalProject_Add( ${name} + PREFIX ${CMAKE_BINARY_DIR} + INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} + URL "${_sourceURL}/${file}" + URL_MD5 ${md5} + BUILD_IN_SOURCE 1 + CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${_sitePkgsDir} + BUILD_COMMAND ${CMAKE_COMMAND} -E env --unset=SHELL + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh + ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py build + INSTALL_COMMAND ${CMAKE_COMMAND} -E env --unset=SHELL + PYTHONPATH=${_sitePkgsDir} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh + ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} + COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) + + # Make the package target depend on this one: + add_dependencies( Package_PyModules ${name} ) + + # Add possible extra dependencies: + if( ARG_DEPENDS ) + add_dependencies( ${name} ${ARG_DEPENDS} ) + endif() + + # Get the package directory: + atlas_get_package_dir( pkgDir ) + + # Add some metadata to the target: + set_property( TARGET ${name} PROPERTY LABEL PyModules ) + set_property( TARGET ${name} PROPERTY FOLDER ${pkgDir} ) + + # Cleanup: + unset( _sourceURL ) + unset( _buildDir ) + unset( _sitePkgsDir ) + +endfunction( _setup_python_package ) + + +# Install extensions: +_setup_python_package( extensions + extensions-0.4.tar.gz + e498fe6da146aefb677c3e8a210fbb29 ) + +# Install flake8 and dependencies: +_setup_python_package( pyflakes + pyflakes-1.6.0.tar.gz + b385b0e4cd40a522553e97cd2d83573e ) + +_setup_python_package( mccabe + mccabe-0.6.1.tar.gz + 723df2f7b1737b8887475bac4c763e1e ) + +_setup_python_package( pycodestyle + pycodestyle-2.3.1.tar.gz + 240e342756af30cae0983b16303a2055 ) + +_setup_python_package( flake8 + flake8-3.5.0.tar.gz + 7e5fe39d578a2c2d0962b61b35b8c3fc + DEPENDS pyflakes pycodestyle mccabe ) + +# Need to add for LCG94 backwards-compatibilty: +# -enum34 + + # Clean up: +unset( _setup_python_package ) diff --git a/Projects/AthenaExternals/package_filters.txt b/Projects/AthenaExternals/package_filters.txt index 085c42f1..c2eba261 100644 --- a/Projects/AthenaExternals/package_filters.txt +++ b/Projects/AthenaExternals/package_filters.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # # List of packages to build as part of AthenaExternals. # @@ -19,6 +19,7 @@ + External/MKL + External/nlohmann_json + External/prmon ++ External/PyModules + External/Simage + External/SoQt + External/dSFMT -- GitLab From e44d5e34e6a63dbabd283276249fb320eef488f5 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Tue, 30 Apr 2019 13:31:32 +0200 Subject: [PATCH 2/5] sanitizeScripts.sh: Only replace if first line is shebang Make sure to only replace the first line of a script if it is actually a shebang (#!). Also don't fail if a non-matching glob is given. --- External/PyAnalysis/cmake/sanitizeScripts.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/External/PyAnalysis/cmake/sanitizeScripts.sh b/External/PyAnalysis/cmake/sanitizeScripts.sh index b1d11126..6e78e58c 100755 --- a/External/PyAnalysis/cmake/sanitizeScripts.sh +++ b/External/PyAnalysis/cmake/sanitizeScripts.sh @@ -3,16 +3,18 @@ # Script used to sanitize the executable scripts after their installation, # to make them relocatable. # +# Workaround for https://github.com/colcon/colcon-bundle/issues/6 +# # Fail on errors: set -e +# globs matching no files evaluate to empty string: +shopt -s nullglob # Loop over all scripts provided on the command line: for script in $*; do # Create a sanitized version of the script, by just replacing # its first line with a relocatable expression: - sed -i.bak -e '1s:.*:#!/usr/bin/env python:' ${script} - # Remove the old version: - rm ${script}.bak + sed -i -e '1s:#!.*:#!/usr/bin/env python:' ${script} done -- GitLab From af41461198095a1d2815c1059fa9a8c9a352e927 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Tue, 30 Apr 2019 13:34:01 +0200 Subject: [PATCH 3/5] PyModules: Fix binary installation - Switch to SHA256 for hash as that one is readily available on pypi.org for each package. - Install binaries into final destination - Use sanitizer script from PyAnalysis - Update versions of flake8 and dependencies --- External/PyModules/CMakeLists.txt | 72 +++++++++++++++++-------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/External/PyModules/CMakeLists.txt b/External/PyModules/CMakeLists.txt index 57103349..ce41c7be 100644 --- a/External/PyModules/CMakeLists.txt +++ b/External/PyModules/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # # CMake configuration for additional Python modules to be built -# as part of ATLAS externals +# as part of ATLAS externals. # # The name of the package: @@ -12,21 +12,22 @@ if( ATLAS_RELEASE_MODE ) return() endif() -# for setuptools -find_package( pytools ) +# Figure out where to take Python from: +if( ATLAS_BUILD_PYTHON ) + set( PYTHON_EXECUTABLE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/python ) +else() + find_package( PythonInterp 2.7 REQUIRED ) +endif() + +# A common installation directory for all python externals of the package: +set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PyModulesBuild ) +set( _sitePkgsDir ${_buildDir}/lib/python2.7/site-packages ) # Helper macro for building and installing python packages. -# Usage: _setup_python_package( name tarball md5 +# Usage: _setup_python_package( name tarball sha256_hash # [DEPENDS dep...] ) # -function( _setup_python_package name file md5 ) - # Location of the source tarballs: - set( _sourceURL "http://cern.ch/atlas-software-dist-eos/externals/PyModules" ) - - # A common installation directory for all python externals of the package: - set( _buildDir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PyModulesBuild ) - set( _sitePkgsDir ${_buildDir}/lib/python2.7/site-packages ) - +function( _setup_python_package name file hash ) # Parse the optional argument(s): cmake_parse_arguments( ARG "" "" "DEPENDS" ${ARGN} ) @@ -34,8 +35,8 @@ function( _setup_python_package name file md5 ) ExternalProject_Add( ${name} PREFIX ${CMAKE_BINARY_DIR} INSTALL_DIR ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM} - URL "${_sourceURL}/${file}" - URL_MD5 ${md5} + URL "${file}" + URL_HASH SHA256=${hash} BUILD_IN_SOURCE 1 CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${_sitePkgsDir} BUILD_COMMAND ${CMAKE_COMMAND} -E env --unset=SHELL @@ -45,7 +46,9 @@ function( _setup_python_package name file md5 ) PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../PyAnalysis/cmake/sanitizeScripts.sh "${_buildDir}/bin/*" + COMMAND ${CMAKE_COMMAND} -E copy_directory ${_sitePkgsDir}/ <INSTALL_DIR>/${CMAKE_INSTALL_PYTHONDIR} + COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/bin <INSTALL_DIR>/${CMAKE_INSTALL_BINDIR} ) # Make the package target depend on this one: add_dependencies( Package_PyModules ${name} ) @@ -62,39 +65,42 @@ function( _setup_python_package name file md5 ) set_property( TARGET ${name} PROPERTY LABEL PyModules ) set_property( TARGET ${name} PROPERTY FOLDER ${pkgDir} ) - # Cleanup: - unset( _sourceURL ) - unset( _buildDir ) - unset( _sitePkgsDir ) - endfunction( _setup_python_package ) +# Location of the source tarballs: +set( _sourceURL "http://cern.ch/atlas-software-dist-eos/externals/PyModules" ) + # Install extensions: _setup_python_package( extensions - extensions-0.4.tar.gz - e498fe6da146aefb677c3e8a210fbb29 ) + ${_sourceURL}/extensions-0.4.tar.gz + 02a6c12973f527fd09adad71792a8d70dfc94cb49fca67ceb201a4dfa5b18099 ) # Install flake8 and dependencies: _setup_python_package( pyflakes - pyflakes-1.6.0.tar.gz - b385b0e4cd40a522553e97cd2d83573e ) + ${_sourceURL}/pyflakes-2.1.1.tar.gz + d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2 ) _setup_python_package( mccabe - mccabe-0.6.1.tar.gz - 723df2f7b1737b8887475bac4c763e1e ) + ${_sourceURL}/mccabe-0.6.1.tar.gz + dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f ) _setup_python_package( pycodestyle - pycodestyle-2.3.1.tar.gz - 240e342756af30cae0983b16303a2055 ) + ${_sourceURL}/pycodestyle-2.5.0.tar.gz + e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c ) _setup_python_package( flake8 - flake8-3.5.0.tar.gz - 7e5fe39d578a2c2d0962b61b35b8c3fc + ${_sourceURL}/flake8-3.7.7.tar.gz + 859996073f341f2670741b51ec1e67a01da142831aa1fdc6242dbf88dffbe661 DEPENDS pyflakes pycodestyle mccabe ) -# Need to add for LCG94 backwards-compatibilty: -# -enum34 - # Clean up: +# Install all built modules at the same time: +install( DIRECTORY ${_buildDir}/ + DESTINATION . USE_SOURCE_PERMISSIONS OPTIONAL ) + +# Clean up: +unset( _sourceURL ) unset( _setup_python_package ) +unset( _buildDir ) +unset( _sitePkgsDir ) -- GitLab From 60a4850423c748baad28f17c6e5c8e93ab8b9f05 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Tue, 7 May 2019 14:59:43 +0200 Subject: [PATCH 4/5] Move sanitizeScripts.sh to External/scripts External/scripts is the new location for scripts to be used during the build of the "External" packages. --- External/PyAnalysis/CMakeLists.txt | 10 +++++----- External/PyModules/CMakeLists.txt | 2 +- External/scripts/README.md | 1 + .../{PyAnalysis/cmake => scripts}/sanitizeScripts.sh | 0 4 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 External/scripts/README.md rename External/{PyAnalysis/cmake => scripts}/sanitizeScripts.sh (100%) diff --git a/External/PyAnalysis/CMakeLists.txt b/External/PyAnalysis/CMakeLists.txt index 1b4acdd8..df4b9d8d 100644 --- a/External/PyAnalysis/CMakeLists.txt +++ b/External/PyAnalysis/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # # Configuration for building/installing python "analysis" modules. # @@ -70,7 +70,7 @@ ExternalProject_Add( setuptools INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeScripts.sh + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh "${_buildDir}/bin/easy_install*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) add_dependencies( Package_PyAnalysis setuptools ) @@ -97,7 +97,7 @@ if( NOT NUMPY_FOUND OR ATLAS_BUILD_PYTHON ) PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeScripts.sh + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh "${_buildDir}/bin/f2py*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) add_dependencies( Package_PyAnalysis numpy ) @@ -122,7 +122,7 @@ if( NOT PIP_FOUND OR ATLAS_BUILD_PYTHON ) INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeScripts.sh + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh "${_buildDir}/bin/wheel*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) add_dependencies( Package_PyAnalysis wheel ) @@ -148,7 +148,7 @@ if( NOT PIP_FOUND OR ATLAS_BUILD_PYTHON ) INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizeScripts.sh + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh "${_buildDir}/bin/pip*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) add_dependencies( Package_PyAnalysis pip ) diff --git a/External/PyModules/CMakeLists.txt b/External/PyModules/CMakeLists.txt index ce41c7be..799accdc 100644 --- a/External/PyModules/CMakeLists.txt +++ b/External/PyModules/CMakeLists.txt @@ -46,7 +46,7 @@ function( _setup_python_package name file hash ) PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../PyAnalysis/cmake/sanitizeScripts.sh "${_buildDir}/bin/*" + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh "${_buildDir}/bin/*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_sitePkgsDir}/ <INSTALL_DIR>/${CMAKE_INSTALL_PYTHONDIR} COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/bin <INSTALL_DIR>/${CMAKE_INSTALL_BINDIR} ) diff --git a/External/scripts/README.md b/External/scripts/README.md new file mode 100644 index 00000000..5f0d618e --- /dev/null +++ b/External/scripts/README.md @@ -0,0 +1 @@ +Directory containing scripts used during the build of the External packages. diff --git a/External/PyAnalysis/cmake/sanitizeScripts.sh b/External/scripts/sanitizeScripts.sh similarity index 100% rename from External/PyAnalysis/cmake/sanitizeScripts.sh rename to External/scripts/sanitizeScripts.sh -- GitLab From 3e83ae2f50bcb6beee1bcefb84e485c397085230 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <frank.winklmeier@cern.ch> Date: Wed, 8 May 2019 11:18:02 +0200 Subject: [PATCH 5/5] Rename sanitizeScripts.sh to sanitizePythonScripts.sh --- External/PyAnalysis/CMakeLists.txt | 8 ++++---- External/PyModules/CMakeLists.txt | 2 +- .../{sanitizeScripts.sh => sanitizePythonScripts.sh} | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename External/scripts/{sanitizeScripts.sh => sanitizePythonScripts.sh} (100%) diff --git a/External/PyAnalysis/CMakeLists.txt b/External/PyAnalysis/CMakeLists.txt index df4b9d8d..1fc5ceac 100644 --- a/External/PyAnalysis/CMakeLists.txt +++ b/External/PyAnalysis/CMakeLists.txt @@ -70,7 +70,7 @@ ExternalProject_Add( setuptools INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizePythonScripts.sh "${_buildDir}/bin/easy_install*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) add_dependencies( Package_PyAnalysis setuptools ) @@ -97,7 +97,7 @@ if( NOT NUMPY_FOUND OR ATLAS_BUILD_PYTHON ) PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizePythonScripts.sh "${_buildDir}/bin/f2py*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) add_dependencies( Package_PyAnalysis numpy ) @@ -122,7 +122,7 @@ if( NOT PIP_FOUND OR ATLAS_BUILD_PYTHON ) INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizePythonScripts.sh "${_buildDir}/bin/wheel*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) add_dependencies( Package_PyAnalysis wheel ) @@ -148,7 +148,7 @@ if( NOT PIP_FOUND OR ATLAS_BUILD_PYTHON ) INSTALL_COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizePythonScripts.sh "${_buildDir}/bin/pip*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/ <INSTALL_DIR> ) add_dependencies( Package_PyAnalysis pip ) diff --git a/External/PyModules/CMakeLists.txt b/External/PyModules/CMakeLists.txt index 799accdc..7d5d87cf 100644 --- a/External/PyModules/CMakeLists.txt +++ b/External/PyModules/CMakeLists.txt @@ -46,7 +46,7 @@ function( _setup_python_package name file hash ) PYTHONPATH=${_sitePkgsDir} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/atlas_build_run.sh ${PYTHON_EXECUTABLE} <SOURCE_DIR>/setup.py install --prefix=${_buildDir} - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizeScripts.sh "${_buildDir}/bin/*" + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/sanitizePythonScripts.sh "${_buildDir}/bin/*" COMMAND ${CMAKE_COMMAND} -E copy_directory ${_sitePkgsDir}/ <INSTALL_DIR>/${CMAKE_INSTALL_PYTHONDIR} COMMAND ${CMAKE_COMMAND} -E copy_directory ${_buildDir}/bin <INSTALL_DIR>/${CMAKE_INSTALL_BINDIR} ) diff --git a/External/scripts/sanitizeScripts.sh b/External/scripts/sanitizePythonScripts.sh similarity index 100% rename from External/scripts/sanitizeScripts.sh rename to External/scripts/sanitizePythonScripts.sh -- GitLab