Commit 8b316c63 authored by Philipp  Trunschke's avatar Philipp Trunschke
Browse files

Merge branch 'pybind11' into development

parents 6bbc5152 4a400424
*.py filter=tabspace
*.cpp filter=tabspace
.git/config
\ No newline at end of file
# Ignore everything
*
# But not these files...
!.gitignore
!*.h
!*.hpp
!*.hxx
!*.c
!*.cpp
!*.cxx
!*.mk
!Makefile
!Dockerfile
!*.sh
!*.rb
!*.py
!.config.mk.*
!*.md
!*.xml
!*.dox
!*.css
!*.js
!*.yml
# ...even if they are in subdirectories
!*/
# However we really want to ignore
lapacke/*
build/*
doc/html/*
.cache
__pycache__
*.sw[pon]
*.np[yz]
*.xrs
*.so
lapacke
build
doc/html
doc/findDoxytag
doc/parseDoxytags
doc/xerus.tagfile
doc/xerus.tags
config.mk
XerusTest
......@@ -6,11 +6,10 @@ COMPATIBILITY = -std=c++14
DEBUG_OPTIMIZATION = TRUE
ACTIVATE_CODE_COVERAGE = TRUE # Enable coverage tests
BROCKEN_CI = TRUE # Enable workaround for brocken CI runner
DEBUG += -D _GLIBCXX_ASSERTIONS # Activate GLIBCXX assertions
DEBUG += -g # Adds debug symbols
ACTIVATE_CODE_COVERAGE = TRUE # Enable coverage tests
BROCKEN_CI = TRUE # Enable workaround for brocken CI runner
DEBUG += -D _GLIBCXX_ASSERTIONS # Activate GLIBCXX assertions
DEBUG += -g # Adds debug symbols
#=================================================================================================
# External libraries
......
#=================================================================================================
# Compiler Options
#=================================================================================================
CXX = clang++-3.9
CXX = clang++
COMPATIBILITY = -std=c++11
DEBUG += -g # Adds debug symbols
DEBUG += -D XERUS_DISABLE_RUNTIME_CHECKS # Disable all runtime checks
LOGGING += -D XERUS_LOG_INFO # Information that is not linked to any unexpected behaviour but might
DEBUG += -g # Adds debug symbols
LOGGING += -D XERUS_LOG_INFO
#=================================================================================================
# External libraries
#=================================================================================================
STRICT_WARNINGS = TRUE
# Uncomment or add the appropriate blas libraries
BLAS_LIBRARIES = -lopenblas -lgfortran # Openblas, serial
# Uncomment or add the appropriate lapack libraries
LAPACK_LIBRARIES = -llapacke -llapack # Standard Lapack + Lapacke libraries
# Uncomment or add the appropriate CXSparse library
BLAS_LIBRARIES = -lopenblas -lgfortran # Openblas, serial
LAPACK_LIBRARIES = -llapacke -llapack # Standard Lapack + Lapacke libraries
SUITESPARSE = -lcholmod -lspqr
BOOST_LIBS = -lboost_filesystem
# custom include paths
# OTHER += -I /path/to/include
......@@ -6,19 +6,15 @@ COMPATIBILITY = -std=c++11
STRICT_WARNINGS = TRUE
DEBUG += -D XERUS_DISABLE_RUNTIME_CHECKS # Disable all runtime checks
DEBUG += -D XERUS_REPLACE_ALLOCATOR
DEBUG += -D XERUS_DISABLE_RUNTIME_CHECKS # Disable all runtime checks
DEBUG += -g # Adds debug symbols
LOGGING += -D XERUS_LOG_INFO # Information that is not linked to any unexpected behaviour bu
DEBUG += -g # Adds debug symbols
LOGGING += -D XERUS_LOG_INFO
#=================================================================================================
# External libraries
#=================================================================================================
BLAS_LIBRARIES = -lopenblas -lgfortran # Openblas, serial
LAPACK_LIBRARIES = -llapacke -llapack # Standard Lapack + Lapacke libraries
BLAS_LIBRARIES = -lopenblas -lgfortran # Openblas, serial
LAPACK_LIBRARIES = -llapacke -llapack # Standard Lapack + Lapacke libraries
SUITESPARSE = -lcholmod -lspqr
BOOST_LIBS = -lboost_filesystem
......@@ -3,15 +3,11 @@
#=================================================================================================
CXX = g++
COMPATIBILITY = -std=c++11
PYTHON2_CONFIG = `python2-config --cflags --ldflags`
PYTHON3_CONFIG = `python3-config --cflags --ldflags`
PYTEST2 = pytest
PYTEST3 = pytest-3
PYTEST3 = python3 -m pytest
STRICT_WARNINGS = TRUE
# DEBUG += -D XERUS_TEST_COVERAGE # Enable coverage tests
DEBUG += -g # Adds debug symbols
DEBUG += -g # Adds debug symbols
LOGGING += -D XERUS_LOG_INFO # Information that is not linked to any unexpected behaviour but might nevertheless be of interest.
#=================================================================================================
# External libraries
......@@ -21,8 +17,8 @@ LAPACK_LIBRARIES = -llapacke -llapack # Standard Lapack + La
SUITESPARSE = -lcholmod -lspqr
BOOST_LIBS = -lboost_filesystem
OTHER += -I /usr/include/python2.7/ -lboost_python -I/usr/lib64/python2.7/site-packages/numpy/core/include/ -lpython2.7 -fno-var-tracking-assignments
# OTHER += -I /usr/include/python2.7/ -lboost_python -I/usr/lib64/python2.7/site-packages/numpy/core/include/ -lpython2.7 -fno-var-tracking-assignments
BOOST_PYTHON2 = -lboost_python-py27
BOOST_PYTHON3 = -lboost_python-py35
# BOOST_PYTHON2 = -lboost_python-py27
# BOOST_PYTHON3 = -lboost_python-py35
stages:
- build_homepage
- build_gcc_nocheck
- test_gcc_nocheck
- code_coverage
- build_python2
- build_python3
- test_python2
- test_python3
- build_clang
- test_clang
- build_homepage
- build_gcc_nocheck
- test_gcc_nocheck
- build_clang
- test_clang
- code_coverage
- build_python
- test_python
job_build_homepage:
stage: build_homepage
script: "cp .gitlab-ci-configs/.config.mk.ci.cc config.mk; make -C doc doc && scp -r doc/html xerusweb:libxerus.org-443"
when: always
only:
only:
- master
allow_failure: true
job_make_gcc_nocheck:
job_build_gcc_nocheck:
stage: build_gcc_nocheck
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.gcc.nocheck config.mk; make XerusTest"
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.gcc.nocheck config.mk; make XerusTest_static"
when: always
artifacts:
expire_in: 1h30min
paths:
- XerusTest
- XerusTest_static
job_test_gcc_nocheck:
stage: test_gcc_nocheck
script: "echo $CI_COMMIT_SHA; ./XerusTest all"
script: "echo $CI_COMMIT_SHA; ./XerusTest_static all"
when: on_success
dependencies:
- job_make_gcc_nocheck
- job_build_gcc_nocheck
job_build_clang:
stage: build_clang
script: "clang++ --version; cp .gitlab-ci-configs/.config.mk.ci.clang config.mk; make XerusTest_static"
when: always
artifacts:
expire_in: 1h30min
paths:
- XerusTest_static
job_test_clang:
stage: test_clang
script: "echo $CI_COMMIT_SHA; ./XerusTest_static all"
when: on_success
dependencies:
- job_build_clang
job_code_coverage:
stage: code_coverage
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.cc config.mk; mkdir -p build; make test &> build/build_output.txt || { tail -n 500 build/build_output.txt && readelf -S XerusTest && objdump -s -j .cc_loc XerusTest && false; }; tail -n 500 build/build_output.txt"
when: always
script: "clang++ --version; cp .gitlab-ci-configs/.config.mk.ci.cc config.mk; mkdir -p build; make test &> build/build_output.txt || { tail -n 500 build/build_output.txt && readelf -S XerusTest_static && objdump -s -j .cc_loc XerusTest_static && false; }; tail -n 500 build/build_output.txt"
when: on_success
artifacts:
expire_in: 3h
paths:
- build/build_output.txt
job_build_python2:
stage: build_python2
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.gcc.python config.mk; make python2"
when: always
job_build_python3:
stage: build_python3
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.gcc.python config.mk; make python3"
when: always
job_test_python2:
stage: test_python2
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.gcc.python config.mk; make test_python2"
when: always
#job_test_python3:
# stage: test_python3
# script: "g++ --version; cp .config.mk.ci.gcc.python config.mk; make test_python3"
# when: always
job_make_clang:
stage: build_clang
script: "clang++ --version; cp .gitlab-ci-configs/.config.mk.ci.clang config.mk; make XerusTest"
job_build_python:
stage: build_python
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.gcc.python config.mk; make python"
when: always
variables:
GIT_SUBMODULE_STRATEGY: normal
artifacts:
expire_in: 1h30min
paths:
- XerusTest
- xerus
job_test_clang:
stage: test_clang
script: "echo $CI_COMMIT_SHA; ./XerusTest all"
job_test_python:
stage: test_python
script: 'python3 -c "import xerus; assert xerus.__version__ == \"$(cat VERSION)\""'
when: on_success
dependencies:
- job_make_clang
- job_build_python
[submodule "src/pybind11"]
path = 3rdParty/pybind11
url = https://github.com/pybind/pybind11.git
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>xerus</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
Subproject commit 25abf7efba0b2990f5a6dfb0a31bc65c0f2f4d17
.PHONY: help shared static python2 python3 doc install test clean version opt warn printBoostVersion
.PHONY: help version opt-flags warn-flags shared static python doc install test clean opt warn printBoostVersion
# ------------------------------------------------------------------------------------------------------
# Default rule should be the help message
# ------------------------------------------------------------------------------------------------------
help:
@printf "Possible make targets are:\n \
\t\tversion \t -- Print the version of xerus.\n \
\t\tshared \t -- Build xerus as a shared library.\n \
\t\tstatic \t -- Build xerus as a static library.\n \
\t\tpython2 \t -- Build the xerus python2 wrappers.\n \
\t\tpython3 \t -- Build the xerus python3 wrappers.\n \
\t\tdoc \t -- Build the html documentation for the xerus library.\n \
\t\tinstall \t -- Install the shared library and header files (may require root).\n \
\t\ttest \t -- Build and run the xerus unit tests.\n \
\t\tclean \t -- Remove all object, library and executable files.\n"
\thelp -- Print this help message.\n \
\tversion -- Print the version of xerus.\n \
\topt-flags -- List optimizations used by the compiler.\n \
\twarn-flags -- List warnings generated by the compiler.\n \
\tshared -- Build xerus as a shared library.\n \
\tstatic -- Build xerus as a static library.\n \
\tpython -- Build the xerus python3 wrappers.\n \
\tdoc -- Build the html documentation for the xerus library.\n \
\tinstall -- Install the shared library and header files (may require root).\n \
\ttest -- Build and run the xerus unit tests.\n \
\tclean -- Remove all object, library and executable files.\n"
# ------------------------------------------------------------------------------------------------------
......@@ -21,14 +23,15 @@ help:
# ------------------------------------------------------------------------------------------------------
# Name of the test executable
TEST_NAME = XerusTest
TEST_NAME = XerusTest_static
# TEST_NAME = XerusTest_dynamic
# ------------------------------------------------------------------------------------------------------
# Extract Xerus version from VERSION file and the git repository
# Extract Xerus version from VERSION file
# ------------------------------------------------------------------------------------------------------
VERSION_STRING = $(shell git describe --tags --always 2>/dev/null || cat VERSION)
VERSION_STRING = $(shell cat VERSION)
VERSION = -D XERUS_VERSION="$(VERSION_STRING)"
XERUS_MAJOR_V = $(word 1, $(subst ., ,$(VERSION_STRING)) )
......@@ -36,18 +39,20 @@ ifneq (,$(findstring v, $(XERUS_MAJOR_V)))
XERUS_MAJOR_V := $(strip $(subst v, ,$(XERUS_MAJOR_V)) )
endif
VERSION += -D XERUS_VERSION_MAJOR=$(XERUS_MAJOR_V)
XERUS_MINOR_V = $(word 2, $(subst ., ,$(VERSION_STRING)) )
XERUS_MINOR_V = $(word 2, $(subst ., ,$(VERSION_STRING)))
VERSION += -D XERUS_VERSION_MINOR=$(XERUS_MINOR_V)
XERUS_REVISION_V = $(word 3, $(subst ., ,$(VERSION_STRING)) )
XERUS_REVISION_V = $(word 3, $(subst ., ,$(VERSION_STRING)))
ifneq (,$(findstring -, $(XERUS_REVISION_V)))
XERUS_COMMIT_V := $(word 2, $(subst -, ,$(XERUS_REVISION_V)) )
XERUS_REVISION_V := $(word 1, $(subst -, ,$(XERUS_REVISION_V)) )
XERUS_COMMIT_V := $(word 2, $(subst -, ,$(XERUS_REVISION_V)))
XERUS_REVISION_V := $(word 1, $(subst -, ,$(XERUS_REVISION_V)))
else
XERUS_COMMIT_V = 0
endif
VERSION += -D XERUS_VERSION_REVISION=$(XERUS_REVISION_V)
VERSION += -D XERUS_VERSION_COMMIT=$(XERUS_COMMIT_V)
version:
@echo $(XERUS_MAJOR_V).$(XERUS_MINOR_V).$(XERUS_REVISION_V).$(XERUS_COMMIT_V)
# ------------------------------------------------------------------------------------------------------
# Register source files for the xerus library
......@@ -58,9 +63,18 @@ XERUS_SOURCES = $(wildcard src/xerus/*.cpp)
XERUS_SOURCES += $(wildcard src/xerus/algorithms/*.cpp)
XERUS_SOURCES += $(wildcard src/xerus/applications/*.cpp)
XERUS_SOURCES += $(wildcard src/xerus/examples/*.cpp)
# XERUS_SOURCES = $(wildcard src/xerus/**/*.cpp)
XERUS_INCLUDES = $(wildcard include/xerus/*.h)
XERUS_INCLUDES += $(wildcard include/xerus/algorithms/*.h)
XERUS_INCLUDES += $(wildcard include/xerus/applications/*.h)
XERUS_INCLUDES += $(wildcard include/xerus/examples/*.h)
# XERUS_INCLUDES = $(wildcard include/xerus/**/*.h)
MISC_SOURCES = $(wildcard src/xerus/misc/*.cpp)
MISC_INCLUDES = $(wildcard include/xerus/misc/*.h)
PYTHON_SOURCES = $(wildcard src/xerus/python/*.cpp)
TEST_SOURCES = $(wildcard src/xerus/test/*.cpp)
......@@ -186,12 +200,12 @@ __check_defined_FORCE:
# Make Rules
# ------------------------------------------------------------------------------------------------------
opt:
$(CXX) $(FLAGS) -Q --help=optimizers
opt-flags:
@$(CXX) $(FLAGS) -Q --help=optimizers 2>/dev/null
warn:
$(CXX) $(FLAGS) -Q --help=warnings
warn-flags:
@$(CXX) $(FLAGS) -Q --help=warnings 2>/dev/null
# Fake rule to create arbitary headers, to prevent errors if files are moved/renamed
......@@ -202,31 +216,31 @@ shared: build/libxerus_misc.so build/libxerus.so
.PHONY: libxerus_misc_dependencies
libxerus_misc_dependencies:
@:$(call check_defined, BOOST_LIBS, include and link paths)
build/libxerus_misc.so: $(MINIMAL_DEPS) $(MISC_SOURCES) | libxerus_misc_dependencies
build/libxerus_misc.so: $(MINIMAL_DEPS) $(MISC_SOURCES) $(MISC_INCLUDES) | libxerus_misc_dependencies
mkdir -p $(dir $@)
$(CXX) -shared -fPIC -Wl,-soname,libxerus_misc.so $(FLAGS) -I include $(MISC_SOURCES) -Wl,--as-needed $(CALLSTACK_LIBS) $(BOOST_LIBS) -o build/libxerus_misc.so
.PHONY: libxerus_dependencies
libxerus_dependencies:
@:$(call check_defined, SUITESPARSE LAPACK_LIBRARIES BLAS_LIBRARIES, include and link paths)
build/libxerus.so: $(MINIMAL_DEPS) $(XERUS_SOURCES) build/libxerus_misc.so | libxerus_dependencies
build/libxerus.so: $(MINIMAL_DEPS) $(XERUS_SOURCES) $(XERUS_INCLUDES) build/libxerus_misc.so | libxerus_dependencies
mkdir -p $(dir $@)
$(CXX) -shared -fPIC -Wl,-soname,libxerus.so $(FLAGS) -I include $(XERUS_SOURCES) -L ./build/ -Wl,--as-needed -lxerus_misc $(SUITESPARSE) $(LAPACK_LIBRARIES) $(ARPACK_LIBRARIES) $(BLAS_LIBRARIES) -o build/libxerus.so
python2: build/python2/xerus.so
python3: build/python3/xerus.so
python: xerus/xerus.so xerus/libxerus.so xerus/libxerus_misc.so
build/python2/xerus.so: $(MINIMAL_DEPS) $(PYTHON_SOURCES) build/libxerus.so
@:$(call check_defined, PYTHON2_CONFIG BOOST_PYTHON2, include and link paths)
mkdir -p $(dir $@)
$(CXX) -shared -fPIC -Wl,-soname,xerus.so $(PYTHON2_CONFIG) $(PYTHON_FLAGS) -I include $(PYTHON_SOURCES) -L ./build/ -Wl,--as-needed -lxerus $(BOOST_PYTHON2) -o $@
xerus/xerus.so: build/python3/xerus.so
cp $< $@
xerus/libxerus.so: build/libxerus.so
cp $< $@
xerus/libxerus_misc.so: build/libxerus_misc.so
cp $< $@
build/python3/xerus.so: $(MINIMAL_DEPS) $(PYTHON_SOURCES) build/libxerus.so
@:$(call check_defined, PYTHON3_CONFIG BOOST_PYTHON3, include and link paths)
build/python3/xerus.so: $(MINIMAL_DEPS) $(PYTHON_SOURCES) src/xerus/python/misc.h build/libxerus.so
@:$(call check_defined, PYTHON3_CONFIG, include and link paths)
mkdir -p $(dir $@)
@# -fpermissive is needed because of a bug in the definition of BOOST_PYTHON_MODULE_INIT in <boost/python/module_init.h>
$(CXX) -shared -fPIC -Wl,-soname,xerus.so $(PYTHON3_CONFIG) $(PYTHON_FLAGS) -fpermissive -I include $(PYTHON_SOURCES) -L ./build/ -Wl,--as-needed -lxerus $(BOOST_PYTHON3) -o $@
$(CXX) -shared -fPIC -Wl,-soname,xerus.so $(PYTHON3_CONFIG) $(PYTHON_FLAGS) -I include -I 3rdParty/pybind11/include $(PYTHON_SOURCES) -L ./build/ -Wl,--as-needed -lxerus -o $@
static: build/libxerus_misc.a build/libxerus.a
......@@ -257,21 +271,16 @@ endif
ifdef INSTALL_LIB_PATH
ifdef INSTALL_HEADER_PATH
install: shared
test -d $(strip $(INSTALL_LIB_PATH));
test -d $(strip $(INSTALL_HEADER_PATH));
@printf "Installing libxerus.so to $(strip $(INSTALL_LIB_PATH)) and storing the header files in $(strip $(INSTALL_HEADER_PATH)).\n"
mkdir -p $(INSTALL_LIB_PATH)
mkdir -p $(INSTALL_HEADER_PATH)
cp include/xerus.h $(INSTALL_HEADER_PATH)
cp -r include/xerus $(INSTALL_HEADER_PATH)
cp build/libxerus_misc.so $(INSTALL_LIB_PATH)
cp build/libxerus.so $(INSTALL_LIB_PATH)
ifdef INSTALL_PYTHON2_PATH
test -d $(strip $(INSTALL_PYTHON2_PATH));
@printf "Installing xerus.so to $(strip $(INSTALL_PYTHON2_PATH)).\n"
cp build/python2/xerus.so $(INSTALL_PYTHON2_PATH)
endif
ifdef INSTALL_PYTHON3_PATH
test -d $(strip $(INSTALL_PYTHON3_PATH));
@printf "Installing xerus.so to $(strip $(INSTALL_PYTHON3_PATH)).\n"
mkdir -p $(INSTALL_PYTHON3_PATH)
cp build/python3/xerus.so $(INSTALL_PYTHON3_PATH)
endif
else
......@@ -283,9 +292,12 @@ install:
@printf "Cannot install xerus: INSTALL_LIB_PATH not set. Please set the path in config file.\n"
endif
$(TEST_NAME): $(MINIMAL_DEPS) $(UNIT_TEST_OBJECTS) $(TEST_OBJECTS) build/libxerus.a build/libxerus_misc.a | libxerus_misc_dependencies libxerus_dependencies
XerusTest_static: $(MINIMAL_DEPS) $(UNIT_TEST_OBJECTS) $(TEST_OBJECTS) build/libxerus.a build/libxerus_misc.a | libxerus_misc_dependencies libxerus_dependencies
$(CXX) -D XERUS_UNITTEST $(FLAGS) $(UNIT_TEST_OBJECTS) $(TEST_OBJECTS) build/libxerus.a build/libxerus_misc.a $(SUITESPARSE) $(LAPACK_LIBRARIES) $(ARPACK_LIBRARIES) $(BLAS_LIBRARIES) $(BOOST_LIBS) $(CALLSTACK_LIBS) -o $(TEST_NAME)
XerusTest_dynamic: $(MINIMAL_DEPS) $(UNIT_TEST_OBJECTS) $(TEST_OBJECTS) build/libxerus.so build/libxerus_misc.so | libxerus_misc_dependencies libxerus_dependencies
$(CXX) -D XERUS_UNITTEST $(FLAGS) $(UNIT_TEST_OBJECTS) $(TEST_OBJECTS) build/libxerus.so build/libxerus_misc.so $(SUITESPARSE) $(LAPACK_LIBRARIES) $(ARPACK_LIBRARIES) $(BLAS_LIBRARIES) $(BOOST_LIBS) $(CALLSTACK_LIBS) -o $(TEST_NAME)
build/print_boost_version: src/print_boost_version.cpp
@$(CXX) -o $@ $<
......@@ -311,17 +323,10 @@ test:
./$(TEST_NAME) all
endif
else
test: $(TEST_NAME)
test: $(TEST_NAME)
./$(TEST_NAME) all
endif
.PHONY: test_python2_dependencies
test_python2_dependencies:
@:$(call check_defined, PYTEST2, pytest executable)
test_python2: build/libxerus.so build/python2/xerus.so | test_python2_dependencies
@PYTHONPATH=build/python2:${PYTHONPATH} LD_LIBRARY_PATH=build:${LD_LIBRARY_PATH} $(PYTEST2) src/pyTests
.PHONY: test_python3_dependencies
test_python3_dependencies:
@:$(call check_defined, PYTEST3, pytest executable)
......@@ -344,9 +349,6 @@ clean:
-rm -f include/xerus.h.gch
make -C doc clean
version:
@echo $(XERUS_MAJOR_V).$(XERUS_MINOR_V).$(XERUS_REVISION_V)
# Build rule for normal misc objects
......
......@@ -28,10 +28,14 @@ Test whether everything works correctly with
build (and optionally install) the library with
> make all -j4
> sudo make install
and you should be ready to use the library. For more details see <a href="https://www.libxerus.org/building_xerus/">the "Building Xerus" page in the documentation</a>.
and you should be ready to use the library.
To install the python bindings run
> make python3
> pip install .
For more details see <a href="https://www.libxerus.org/building_xerus/">the "Building Xerus" page in the documentation</a>.
# Issues #
......
This diff is collapsed.
#!/bin/bash
set -x -e
cd xerus
cat <<EOF >config.mk
CXX = ${CXX}
COMPATIBILITY = -std=c++17
COMPILE_THREADS = 8 # Number of threads to use during link time optimization.
HIGH_OPTIMIZATION = TRUE # Activates -O3 -march=native and some others
OTHER += -fopenmp
PYTHON3_CONFIG = \`python3-config --cflags --ldflags\`
LOGGING += -D XERUS_LOG_INFO # Information that is not linked to any unexpected behaviour but might nevertheless be of interest.
LOGGING += -D XERUS_LOGFILE # Use 'error.log' file instead of cerr
LOGGING += -D XERUS_LOG_ABSOLUTE_TIME # Print absolute times instead of relative to program time
XERUS_NO_FANCY_CALLSTACK = TRUE # Show simple callstacks only
BLAS_LIBRARIES = -lopenblas -lgfortran # Openblas, serial
LAPACK_LIBRARIES = -llapacke -llapack # Standard Lapack + Lapacke libraries
SUITESPARSE = -lcholmod -lspqr
BOOST_LIBS = -lboost_filesystem
OTHER += -I${PREFIX}/include -I${PREFIX}/lib/python${PY_VER}/site-packages/numpy/core/include/
OTHER += -L${PREFIX}/lib
EOF
ln -s ${PREFIX}/include/ ${PREFIX}/include/suitesparse
make python
${PYTHON} -m pip install . --no-deps -vv
# INCLUDE_PATH="${PREFIX}/include"
# mkdir -p ${INCLUDE_PATH}
# cp include/xerus.h ${INCLUDE_PATH}
# cp -r include/xerus ${INCLUDE_PATH}
# LIBRARY_PATH="${PREFIX}/lib"
# mkdir -p ${LIBRARY_PATH}
# cp build/libxerus.so ${LIBRARY_PATH}
# cp build/libxerus_misc.so ${LIBRARY_PATH}
rm config.mk
{% set name = "Xerus" %}
{% set version = "4.0.1" %}
{% set branch = "v4.0.1_conda" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
- git_url: https://github.com/libxerus/xerus.git
git_tag: {{ branch }}
folder: xerus
build:
number: 1
skip: true # [py<34 or win]
requirements:
build:
- {{ compiler('cxx') }}
- make
- pip >=18.1
host:
- python
- numpy
- openblas
- suitesparse
- lapack
- boost-cpp >=1.69.0 # boost-cpp: boost without python
- llvm-openmp # [osx]