Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d2cd6bb650
@ -13,6 +13,9 @@ yum install -y cmake3 gsl-devel zlib-devel fftw3-devel libffi-devel hdf5 hdf5-de
|
|||||||
ln -fs /usr/bin/cmake3 /usr/bin/cmake
|
ln -fs /usr/bin/cmake3 /usr/bin/cmake
|
||||||
|
|
||||||
|
|
||||||
|
test -d /io/wheelhouse || mkdir /io/wheelhouse
|
||||||
|
test -d /io/wheelhouse/fix || mkdir /io/wheelhouse/fix
|
||||||
|
|
||||||
ALL_PYTHON="cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310"
|
ALL_PYTHON="cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310"
|
||||||
|
|
||||||
# Compile wheels
|
# Compile wheels
|
||||||
@ -25,8 +28,8 @@ for pkg in $ALL_PYTHON; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Bundle external shared libraries into the wheels
|
# Bundle external shared libraries into the wheels
|
||||||
for whl in wheelhouse/cosmotool*.whl; do
|
for whl in /io/wheelhouse/cosmotool*.whl; do
|
||||||
auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/
|
auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/fix
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install packages and test
|
# Install packages and test
|
||||||
|
28
external/external_build.cmake
vendored
28
external/external_build.cmake
vendored
@ -5,11 +5,11 @@ OPTION(ENABLE_OPENMP "Set to Yes if Healpix and/or you need openMP" OFF)
|
|||||||
SET(FFTW_URL "http://www.fftw.org/fftw-3.3.3.tar.gz" CACHE STRING "URL to download FFTW from")
|
SET(FFTW_URL "http://www.fftw.org/fftw-3.3.3.tar.gz" CACHE STRING "URL to download FFTW from")
|
||||||
SET(EIGEN_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.bz2" CACHE STRING "URL to download Eigen from")
|
SET(EIGEN_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.bz2" CACHE STRING "URL to download Eigen from")
|
||||||
SET(GENGETOPT_URL "ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz" CACHE STRING "URL to download gengetopt from")
|
SET(GENGETOPT_URL "ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz" CACHE STRING "URL to download gengetopt from")
|
||||||
SET(HDF5_URL "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.18/src/hdf5-1.8.18.tar.bz2" CACHE STRING "URL to download HDF5 from")
|
SET(HDF5_URL "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.gz" CACHE STRING "URL to download HDF5 from")
|
||||||
SET(NETCDF_URL "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.5.0.tar.gz" CACHE STRING "URL to download NetCDF from")
|
SET(NETCDF_URL "https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz" CACHE STRING "URL to download NetCDF from")
|
||||||
SET(NETCDFCXX_URL "https://github.com/Unidata/netcdf-cxx4/archive/v4.3.0.tar.gz" CACHE STRING "URL to download NetCDF-C++ from")
|
SET(NETCDFCXX_URL "https://github.com/Unidata/netcdf-cxx4/archive/v4.3.1.tar.gz" CACHE STRING "URL to download NetCDF-C++ from")
|
||||||
SET(BOOST_URL "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2" CACHE STRING "URL to download Boost from")
|
SET(BOOST_URL "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.gz" CACHE STRING "URL to download Boost from")
|
||||||
SET(GSL_URL "ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz" CACHE STRING "URL to download GSL from ")
|
SET(GSL_URL "https://ftpmirror.gnu.org/gsl/gsl-2.7.tar.gz" CACHE STRING "URL to download GSL from ")
|
||||||
mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL)
|
mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL)
|
||||||
|
|
||||||
SET(all_deps)
|
SET(all_deps)
|
||||||
@ -90,7 +90,7 @@ if (INTERNAL_HDF5)
|
|||||||
ExternalProject_Add(hdf5
|
ExternalProject_Add(hdf5
|
||||||
PREFIX ${BUILD_PREFIX}/hdf5-prefix
|
PREFIX ${BUILD_PREFIX}/hdf5-prefix
|
||||||
URL ${HDF5_URL}
|
URL ${HDF5_URL}
|
||||||
URL_HASH MD5=29117bf488887f89888f9304c8ebea0b
|
URL_HASH MD5=30172c75e436d7f2180e274071a4ca97
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
-DCMAKE_INSTALL_PREFIX=${EXT_INSTALL}
|
-DCMAKE_INSTALL_PREFIX=${EXT_INSTALL}
|
||||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||||
@ -99,6 +99,7 @@ if (INTERNAL_HDF5)
|
|||||||
-DHDF5_BUILD_TOOLS=ON
|
-DHDF5_BUILD_TOOLS=ON
|
||||||
-DHDF5_BUILD_HL_LIB=ON
|
-DHDF5_BUILD_HL_LIB=ON
|
||||||
-DBUILD_SHARED_LIBS=OFF
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
|
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON
|
||||||
)
|
)
|
||||||
SET(cosmotool_DEPS ${cosmotool_DEPS} hdf5)
|
SET(cosmotool_DEPS ${cosmotool_DEPS} hdf5)
|
||||||
SET(hdf5_built hdf5)
|
SET(hdf5_built hdf5)
|
||||||
@ -106,11 +107,11 @@ if (INTERNAL_HDF5)
|
|||||||
SET(HDF5_ROOTDIR ${HDF5_BIN_DIR})
|
SET(HDF5_ROOTDIR ${HDF5_BIN_DIR})
|
||||||
SET(CONFIGURE_LDFLAGS "${CONFIGURE_LDFLAGS} -L${HDF5_BIN_DIR}/lib")
|
SET(CONFIGURE_LDFLAGS "${CONFIGURE_LDFLAGS} -L${HDF5_BIN_DIR}/lib")
|
||||||
SET(CONFIGURE_LIBS "${CONFIGURE_LIBS} -ldl")
|
SET(CONFIGURE_LIBS "${CONFIGURE_LIBS} -ldl")
|
||||||
set(HDF5_C_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5-static.a)
|
set(HDF5_C_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5.a)
|
||||||
set(HDF5_HL_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5_hl-static.a)
|
set(HDF5_HL_STATIC_LIBRARY ${HDF5_BIN_DIR}/lib/libhdf5_hl.a)
|
||||||
set(HDF5_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5-static.a CACHE STRING "HDF5 lib" FORCE)
|
set(HDF5_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5.a CACHE STRING "HDF5 lib" FORCE)
|
||||||
set(HDF5_HL_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5_hl-static.a CACHE STRING "HDF5 HL lib" FORCE)
|
set(HDF5_HL_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5_hl.a CACHE STRING "HDF5 HL lib" FORCE)
|
||||||
set(HDF5_CXX_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5_cpp-static.a CACHE STRING "HDF5 C++ lib" FORCE)
|
set(HDF5_CXX_LIBRARIES ${HDF5_BIN_DIR}/lib/libhdf5_cpp.a CACHE STRING "HDF5 C++ lib" FORCE)
|
||||||
SET(HDF5_INCLUDE_DIRS ${HDF5_BIN_DIR}/include CACHE STRING "HDF5 include path" FORCE)
|
SET(HDF5_INCLUDE_DIRS ${HDF5_BIN_DIR}/include CACHE STRING "HDF5 include path" FORCE)
|
||||||
mark_as_advanced(HDF5_LIBRARIES HDF5_CXX_LIBRARIES HDF5_INCLUDE_DIRS)
|
mark_as_advanced(HDF5_LIBRARIES HDF5_CXX_LIBRARIES HDF5_INCLUDE_DIRS)
|
||||||
|
|
||||||
@ -168,7 +169,7 @@ if (INTERNAL_NETCDF)
|
|||||||
SET(NETCDF_CONFIG_COMMAND ${NETCDF_SOURCE_DIR}/configure
|
SET(NETCDF_CONFIG_COMMAND ${NETCDF_SOURCE_DIR}/configure
|
||||||
--prefix=${NETCDF_BIN_DIR} --libdir=${NETCDF_BIN_DIR}/lib
|
--prefix=${NETCDF_BIN_DIR} --libdir=${NETCDF_BIN_DIR}/lib
|
||||||
--enable-netcdf-4 --with-pic --disable-shared --disable-dap
|
--enable-netcdf-4 --with-pic --disable-shared --disable-dap
|
||||||
--disable-cdmremote --disable-rpc --enable-cxx-4
|
--disable-byterange --disable-cdmremote --disable-rpc --enable-cxx-4
|
||||||
--disable-examples ${EXTRA_NC_FLAGS} CC=${CMAKE_C_COMPILER}
|
--disable-examples ${EXTRA_NC_FLAGS} CC=${CMAKE_C_COMPILER}
|
||||||
CXX=${CMAKE_CXX_COMPILER})
|
CXX=${CMAKE_CXX_COMPILER})
|
||||||
list(INSERT CMAKE_PREFIX_PATH 0 ${EXT_INSTALL})
|
list(INSERT CMAKE_PREFIX_PATH 0 ${EXT_INSTALL})
|
||||||
@ -186,6 +187,7 @@ if (INTERNAL_NETCDF)
|
|||||||
-DBUILD_TESTING=OFF
|
-DBUILD_TESTING=OFF
|
||||||
-DCMAKE_BUILD_TYPE=Release
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
-DENABLE_NETCDF4=ON
|
-DENABLE_NETCDF4=ON
|
||||||
|
-DENABLE_BYTERANGE=FALSE
|
||||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||||
-DENABLE_DAP=OFF
|
-DENABLE_DAP=OFF
|
||||||
-DCMAKE_INSTALL_PREFIX=${NETCDF_BIN_DIR}
|
-DCMAKE_INSTALL_PREFIX=${NETCDF_BIN_DIR}
|
||||||
@ -242,7 +244,7 @@ if (INTERNAL_BOOST)
|
|||||||
ExternalProject_Add(boost
|
ExternalProject_Add(boost
|
||||||
URL ${BOOST_URL}
|
URL ${BOOST_URL}
|
||||||
PREFIX ${BUILD_PREFIX}/boost-prefix
|
PREFIX ${BUILD_PREFIX}/boost-prefix
|
||||||
URL_HASH MD5=da07ca30dd1c0d1fdedbd487efee01bd
|
URL_HASH MD5=f7050f554a65f6a42ece221eaeec1660
|
||||||
CONFIGURE_COMMAND
|
CONFIGURE_COMMAND
|
||||||
${BOOST_SOURCE_DIR}/bootstrap.sh --prefix=${CMAKE_BINARY_DIR}/ext_build/boost
|
${BOOST_SOURCE_DIR}/bootstrap.sh --prefix=${CMAKE_BINARY_DIR}/ext_build/boost
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
|
28
setup.py
28
setup.py
@ -76,9 +76,9 @@ class InstallCMakeLibs(install_lib):
|
|||||||
# # your files are moved to the appropriate location when the installation
|
# # your files are moved to the appropriate location when the installation
|
||||||
# # is run
|
# # is run
|
||||||
#
|
#
|
||||||
# libs = [os.path.join(bin_dir, _lib) for _lib in
|
# libs = [os.path.join(bin_dir, _lib) for _lib in
|
||||||
# os.listdir(bin_dir) if
|
# os.listdir(bin_dir) if
|
||||||
# os.path.isfile(os.path.join(bin_dir, _lib)) and
|
# os.path.isfile(os.path.join(bin_dir, _lib)) and
|
||||||
# os.path.splitext(_lib)[1] in [".dll", ".so"]
|
# os.path.splitext(_lib)[1] in [".dll", ".so"]
|
||||||
# and not (_lib.startswith("python") or _lib.startswith(PACKAGE_NAME))]
|
# and not (_lib.startswith("python") or _lib.startswith(PACKAGE_NAME))]
|
||||||
#
|
#
|
||||||
@ -87,16 +87,16 @@ class InstallCMakeLibs(install_lib):
|
|||||||
# shutil.move(lib, os.path.join(self.build_dir,
|
# shutil.move(lib, os.path.join(self.build_dir,
|
||||||
# os.path.basename(lib)))
|
# os.path.basename(lib)))
|
||||||
#
|
#
|
||||||
# # Mark the libs for installation, adding them to
|
# # Mark the libs for installation, adding them to
|
||||||
# # distribution.data_files seems to ensure that setuptools' record
|
# # distribution.data_files seems to ensure that setuptools' record
|
||||||
# # writer appends them to installed-files.txt in the package's egg-info
|
# # writer appends them to installed-files.txt in the package's egg-info
|
||||||
# #
|
# #
|
||||||
# # Also tried adding the libraries to the distribution.libraries list,
|
# # Also tried adding the libraries to the distribution.libraries list,
|
||||||
# # but that never seemed to add them to the installed-files.txt in the
|
# # but that never seemed to add them to the installed-files.txt in the
|
||||||
# # egg-info, and the online recommendation seems to be adding libraries
|
# # egg-info, and the online recommendation seems to be adding libraries
|
||||||
# # into eager_resources in the call to setup(), which I think puts them
|
# # into eager_resources in the call to setup(), which I think puts them
|
||||||
# # in data_files anyways.
|
# # in data_files anyways.
|
||||||
# #
|
# #
|
||||||
# # What is the best way?
|
# # What is the best way?
|
||||||
#
|
#
|
||||||
# # These are the additional installation files that should be
|
# # These are the additional installation files that should be
|
||||||
@ -104,7 +104,7 @@ class InstallCMakeLibs(install_lib):
|
|||||||
# # step; depending on the files that are generated from your cmake
|
# # step; depending on the files that are generated from your cmake
|
||||||
# # build chain, you may need to modify the below code
|
# # build chain, you may need to modify the below code
|
||||||
#
|
#
|
||||||
# self.distribution.data_files = [os.path.join(self.install_dir,
|
# self.distribution.data_files = [os.path.join(self.install_dir,
|
||||||
# os.path.basename(lib))
|
# os.path.basename(lib))
|
||||||
# for lib in libs]
|
# for lib in libs]
|
||||||
# print(self.distribution.data_files)
|
# print(self.distribution.data_files)
|
||||||
@ -213,7 +213,7 @@ class BuildCMakeExt(build_ext):
|
|||||||
if _pyd_top[0].startswith(PACKAGE_NAME):
|
if _pyd_top[0].startswith(PACKAGE_NAME):
|
||||||
if os.path.splitext(_pyd)[1] in [".pyd", ".so"] or _pyd_top[-1] == 'config.py':
|
if os.path.splitext(_pyd)[1] in [".pyd", ".so"] or _pyd_top[-1] == 'config.py':
|
||||||
pyd_path.append((_pyd_top,_pyd))
|
pyd_path.append((_pyd_top,_pyd))
|
||||||
|
|
||||||
|
|
||||||
for top,p in pyd_path:
|
for top,p in pyd_path:
|
||||||
_,n = os.path.split(p)
|
_,n = os.path.split(p)
|
||||||
@ -229,7 +229,7 @@ class BuildCMakeExt(build_ext):
|
|||||||
CosmoTool_extension = CMakeExtension(name="cosmotool")
|
CosmoTool_extension = CMakeExtension(name="cosmotool")
|
||||||
|
|
||||||
setup(name='cosmotool',
|
setup(name='cosmotool',
|
||||||
version='1.3.2',
|
version='1.3.3',
|
||||||
packages=["cosmotool"],
|
packages=["cosmotool"],
|
||||||
package_dir={'cosmotool': 'python/cosmotool'},
|
package_dir={'cosmotool': 'python/cosmotool'},
|
||||||
install_requires=['numpy','cffi','numexpr','pyfftw','h5py'],
|
install_requires=['numpy','cffi','numexpr','pyfftw','h5py'],
|
||||||
|
Loading…
Reference in New Issue
Block a user