diff --git a/.github/workflows/test_and_build.yml b/.github/workflows/test_and_build.yml index 046bc72..6a5e8f9 100644 --- a/.github/workflows/test_and_build.yml +++ b/.github/workflows/test_and_build.yml @@ -83,8 +83,7 @@ jobs: if [[ "${{matrix.os}}" == "ubuntu-latest" ]]; then #conda install -c conda-forge boa -n base - #conda mambabuild --no-build-id --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly-linux - conda build --no-build-id --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly-linux + conda build --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly else curl -LO -z MacOSX10.9.sdk.tar.xz https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz @@ -155,7 +154,7 @@ jobs: conda install -c conda-forge boa -n base if [[ "${{matrix.os}}" == "ubuntu-latest" ]]; then - conda mambabuild --no-build-id --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly-linux + conda mambabuild --no-build-id --python=${{matrix.python-version}} conda_recipe/xspec-modelsonly else # there is some strange error about the prefix length diff --git a/conda_recipe/xspec-modelsonly-linux/.gitattributes b/conda_recipe/xspec-modelsonly-linux/.gitattributes deleted file mode 100644 index 45c29a7..0000000 --- a/conda_recipe/xspec-modelsonly-linux/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -xspec-modelsonly-v6.20-no-big-data.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/conda_recipe/xspec-modelsonly-linux/build.sh b/conda_recipe/xspec-modelsonly-linux/build.sh deleted file mode 100644 index e73057c..0000000 --- a/conda_recipe/xspec-modelsonly-linux/build.sh +++ /dev/null @@ -1,108 +0,0 @@ -echo "=================" -echo $PWD -echo $RECIPE_DIR -echo $CC -echo $CXX -echo $CONDA_PREFIX -echo $BUILD_PREFIX - - -tar xf heasoft-6.30.1src.tar.gz - -CWD="$PWD" -XSPEC_PATCH="Xspatch_121201c.tar.gz" -XSPEC_PATCH_INSTALLER="patch_install_4.15.tcl" -XSPEC_MODELS_ONLY=heasoft-6.30.1 - -#if [ "`uname -s`" == "Darwin" ] ; then -# CONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk -#fi - -# If a patch is required, download the necessary file and apply it -if [ -n "$XSPEC_PATCH" ] -then - cd ${XSPEC_MODELS_ONLY}/Xspec/src; - curl -LO -z ${XSPEC_PATCH} https://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/issues/archive/${XSPEC_PATCH}; - curl -LO -z ${XSPEC_PATCH_INSTALLER} https://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/issues/archive/${XSPEC_PATCH_INSTALLER}; - tclsh ${XSPEC_PATCH_INSTALLER} -m -n; - rm -rf XSFits; - cd ${CWD}; -fi - -#Copy in the OGIPTable fix -#cp $RECIPE_DIR/../../OGIPTable.cxx heasoft-6.25/Xspec/src/XSModel/Model/Component/OGIPTable - -cd ${XSPEC_MODELS_ONLY}/BUILD_DIR - -# We need a custom include and library path to use the packages installed -# in the build environment - -export CFLAGS="-I$CONDA_PREFIX/include" -export CXXFLAGS="-std=c++11 -Wno-c++11-narrowing -Wall -Wno-deprecated -I$CONDA_PREFIX/include" - -#export LDFLAGS="$LDFLAGS -L$CONDA_PREFIX/lib -undefined dynamic_lookup --enable-shared" -export LDFLAGS="$LDFLAGS -L$CONDA_PREFIX/lib " -# -L${PREFIX}/lib" -export CCTEST="echo" - -#Patch the source to avoid Python for Xspec and heasoftpy -rm -rvf ../heacore/heasoftpy -sed -i.orig "s|python3 python python2 python2.7 python2.6|python4|g" ../Xspec/BUILD_DIR/configure -sed -i.orig "s|python3 python python2 python2.7 python2.6|python4|g" ../heacore/BUILD_DIR/configure - -# Patch the configure script so XSModel is built -sed -i.orig "s|src/XSFunctions|src/XSFunctions src/XSModel|g" configure -#sed -i.orig "s|wcslib cfitsio CCfits heasp|cfitsio heasp|g" configure - - -if [ "$(uname)" == "Linux" ]; then - ./configure --prefix=${SRC_DIR}/xspec-modelsonly-build --enable-xs-models-only --disable-x - #./hmake '--quiet' 'XSLM_USER_FLAGS="-I${PREFIX}/include"' 'XSLM_USER_LIBS="-L${PREFIX}/lib -lCCfits -lcfitsio -lwcslib -lgfortran"' - make HD_ADD_SHLIB_LIBS=yes -fi - -if [ "$(uname)" == "Darwin" ]; then - # Build for a fairly old mac to ensure portability - ./configure --prefix=${SRC_DIR}/xspec-modelsonly-build --enable-xs-models-only --disable-x - #./hmake '--quiet' 'LDFLAGS_CXX=-headerpad_max_install_names -lcfitsio -lCCfits -lccfits -lwcs -lgfortran' 'XSLM_USER_LIBS="-L${PREFIX}/lib -lCCfits -lcfitsio -lwcslib -lgfortran"' - make HD_ADD_SHLIB_LIBS=yes -fi - -make install - -# Correct the output of make install so that the output directory structure -# makes more sense for a conda environment. We will place libraries in the -# ${PREFIX}/lib directory and data files in ${PREFIX}/Xspec/spectral - -# Copy libraries in the ${PREFIX}/lib directory - -#cp -v `find ${SRC_DIR}/xspec-modelsonly-build/Xspec/ -name "libXS*"` ${PREFIX}/lib -mkdir -p ${PREFIX}/lib -if [ "`uname -s`" = "Linux" ] ; then - cp -L ${SRC_DIR}/xspec-modelsonly-build/x86*/lib/*.so* ${PREFIX}/lib/ -else - cp -L ${SRC_DIR}/xspec-modelsonly-build/x86*/lib/*.dylib* ${PREFIX}/lib/ -fi -cp -L ${SRC_DIR}/xspec-modelsonly-build/x86*/lib/*.a ${PREFIX}/lib/ - -# Create a ${PREFIX}/lib/Xspec directory -mkdir ${PREFIX}/lib/Xspec - -# Create an empty headas directory. The env. variable HEADAS should point here at -# runtime -mkdir ${PREFIX}/lib/Xspec/headas - -# Fill it with a useless file, otherwise Conda will remove it during installation -echo "LEAVE IT HERE" > ${PREFIX}/lib/Xspec/headas/DO_NOT_REMOVE - -# Copy the spectral data in the right place. According to the Xspec documentation, -# this should be $HEADAS/../spectral -cp -rv ${SRC_DIR}/xspec-modelsonly-build/spectral ${PREFIX}/lib/Xspec - -mkdir -p ${PREFIX}/include -mkdir -p ${PREFIX}/include/XSFunctions -mkdir -p ${PREFIX}/include/XSFunctions/Utilities - -cp -L ${SRC_DIR}/xspec-modelsonly-build/Xspec/x86*/include/XSFunctions/Utilities/xsFortran.h ${PREFIX}/include/XSFunctions/Utilities -cp -L ${SRC_DIR}/xspec-modelsonly-build/x86*/include/xsTypes.h ${PREFIX}/include -cp -L ${SRC_DIR}/xspec-modelsonly-build/Xspec/x86*/include/XSFunctions/funcWrappers.h ${PREFIX}/include/XSFunctions diff --git a/conda_recipe/xspec-modelsonly-linux/conda_build_config.yaml b/conda_recipe/xspec-modelsonly-linux/conda_build_config.yaml deleted file mode 100644 index 90806b7..0000000 --- a/conda_recipe/xspec-modelsonly-linux/conda_build_config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -c_compiler: - - gcc # [linux] - -cxx_compiler: - - gxx # [linux] diff --git a/conda_recipe/xspec-modelsonly-linux/meta.yaml b/conda_recipe/xspec-modelsonly-linux/meta.yaml deleted file mode 100644 index 61c8897..0000000 --- a/conda_recipe/xspec-modelsonly-linux/meta.yaml +++ /dev/null @@ -1,33 +0,0 @@ -package: - name: xspec-modelsonly - version: "6.30.1" - -source: - path: ../../heasoft-6.30.1src.tar.gz - -build: - number: 3 # [py3k] - -requirements: - build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - {{ compiler('fortran') }} # [linux] - #- libgfortran>=3.0,<4.0 # [osx] - #- libgfortran-ng==7.5.0 # [linux] - - ncurses - - readline - - curl - - perl - - host: - - ncurses - - readline - - run: - - cfitsio - - ncurses - - readline - -about: - home: https://heasarc.gsfc.nasa.gov/xanadu/xspec/ diff --git a/conda_recipe/xspec-modelsonly/conda_build_config.yaml b/conda_recipe/xspec-modelsonly/conda_build_config.yaml index 0531b22..cff4d25 100644 --- a/conda_recipe/xspec-modelsonly/conda_build_config.yaml +++ b/conda_recipe/xspec-modelsonly/conda_build_config.yaml @@ -1,8 +1,6 @@ c_compiler: - - gcc # [linux] - clang # [osx] cxx_compiler: - - gxx # [linux] - clangxx # [osx] fortran_compiler: - gfortran # [osx]