Skip to content

Commit

Permalink
Add libgfortran link to openblas on linux. Move release file into the…
Browse files Browse the repository at this point in the history
… package.
  • Loading branch information
tskisner committed May 28, 2020
1 parent 01d817b commit a4ff078
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
# schedule:
# - cron: '0 4 * * *'

# env:
# TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}

jobs:
py36:
name: Python 3.6 wheels on ${{ matrix.os }}
Expand All @@ -25,7 +29,7 @@ jobs:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BUILD_VERBOSITY: 3
CIBW_ENVIRONMENT_LINUX: "TOAST_STATIC_DEPS=1 TOAST_BUILD_BLAS_LIBRARIES='-lopenblas -fopenmp -lm' TOAST_BUILD_LAPACK_LIBRARIES='-lopenblas -fopenmp -lm'"
CIBW_ENVIRONMENT_LINUX: "TOAST_STATIC_DEPS=1 TOAST_BUILD_BLAS_LIBRARIES='-lopenblas -fopenmp -lm -lgfortran' TOAST_BUILD_LAPACK_LIBRARIES='-lopenblas -fopenmp -lm -lgfortran'"
CIBW_ENVIRONMENT_MACOS: "TOAST_STATIC_DEPS=1"
CIBW_BEFORE_BUILD_LINUX: ./wheels/install_deps_linux.sh
CIBW_BEFORE_BUILD_MACOS: ./wheels/install_deps_osx.sh
Expand Down Expand Up @@ -58,7 +62,7 @@ jobs:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BUILD_VERBOSITY: 3
CIBW_ENVIRONMENT_LINUX: "TOAST_STATIC_DEPS=1 TOAST_BUILD_BLAS_LIBRARIES='-lopenblas -fopenmp -lm' TOAST_BUILD_LAPACK_LIBRARIES='-lopenblas -fopenmp -lm'"
CIBW_ENVIRONMENT_LINUX: "TOAST_STATIC_DEPS=1 TOAST_BUILD_BLAS_LIBRARIES='-lopenblas -fopenmp -lm -lgfortran' TOAST_BUILD_LAPACK_LIBRARIES='-lopenblas -fopenmp -lm -lgfortran'"
CIBW_ENVIRONMENT_MACOS: "TOAST_STATIC_DEPS=1"
CIBW_BEFORE_BUILD_LINUX: ./wheels/install_deps_linux.sh
CIBW_BEFORE_BUILD_MACOS: ./wheels/install_deps_osx.sh
Expand Down Expand Up @@ -91,7 +95,7 @@ jobs:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_BUILD_VERBOSITY: 3
CIBW_ENVIRONMENT_LINUX: "TOAST_STATIC_DEPS=1 TOAST_BUILD_BLAS_LIBRARIES='-lopenblas -fopenmp -lm' TOAST_BUILD_LAPACK_LIBRARIES='-lopenblas -fopenmp -lm'"
CIBW_ENVIRONMENT_LINUX: "TOAST_STATIC_DEPS=1 TOAST_BUILD_BLAS_LIBRARIES='-lopenblas -fopenmp -lm -lgfortran' TOAST_BUILD_LAPACK_LIBRARIES='-lopenblas -fopenmp -lm -lgfortran'"
CIBW_ENVIRONMENT_MACOS: "TOAST_STATIC_DEPS=1"
CIBW_BEFORE_BUILD_LINUX: ./wheels/install_deps_linux.sh
CIBW_BEFORE_BUILD_MACOS: ./wheels/install_deps_osx.sh
Expand Down
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Auxiliary files
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

# Copy the RELEASE file into the build directory
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/RELEASE"
"${CMAKE_CURRENT_BINARY_DIR}/RELEASE"
COPYONLY
)

# Use GNUInstallDirs to install libraries into correct locations on all
# platforms.
include(GNUInstallDirs)
Expand Down
4 changes: 2 additions & 2 deletions src/libtoast/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ endif()
# Separately parse the special "RELEASE" file that is manually updated when
# making an actual release.

if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../RELEASE)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../../RELEASE REL_VERSION)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../toast/RELEASE)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/../toast/RELEASE REL_VERSION)
string(STRIP "${REL_VERSION}" RELEASE_VERSION)
else()
set(RELEASE_VERSION "")
Expand Down
7 changes: 7 additions & 0 deletions src/toast/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# pybind11
add_subdirectory(pybind11)

# Copy the RELEASE file into the build directory
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/RELEASE"
"${CMAKE_CURRENT_BINARY_DIR}/RELEASE"
COPYONLY
)

# Determine our python install location and set up a rule to install the
# modules

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/toast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#
# Just manually read the release file.
thisdir = os.path.abspath(os.path.dirname(__file__))
relfile = os.path.join(thisdir, "..", "..", "RELEASE")
relfile = os.path.join(thisdir, "RELEASE")
with open(relfile, "r") as rel:
if __version__ is None:
__version__ = rel.readline().rstrip()
Expand Down

0 comments on commit a4ff078

Please sign in to comment.