From fc12e32cb13e75b14501ade5b4e7189bfd198c51 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Tue, 21 Nov 2017 17:28:50 +0100 Subject: [PATCH] Add conda recipes --- .gitignore | 1 + configure.ac | 1 + dev/conda-recipes/build.sh | 16 ++++++++++++++++ dev/conda-recipes/conda_build_config.yaml | 4 ++++ dev/conda-recipes/meta.yaml.in | 31 +++++++++++++++++++++++++++++++ dev/release.py | 1 - gammalib.pc.in | 2 +- 7 files changed, 54 insertions(+), 2 deletions(-) create mode 100755 dev/conda-recipes/build.sh create mode 100644 dev/conda-recipes/conda_build_config.yaml create mode 100644 dev/conda-recipes/meta.yaml.in diff --git a/.gitignore b/.gitignore index 2ea32dc..0fc4412 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ inst/mwl/test/*.trs pyext/gammalib/*.py pyext/gammalib/*.cpp pyext/setup.py +dev/conda-recipes/meta.yaml m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 diff --git a/configure.ac b/configure.ac index d8c4b73..aef47ed 100644 --- a/configure.ac +++ b/configure.ac @@ -1444,6 +1444,7 @@ AC_CONFIG_FILES([Makefile pyext/Makefile pyext/setup.py pyext/gammalib/__init__.py + dev/conda-recipes/meta.yaml examples/Makefile examples/cpp/Makefile gammalib.pc diff --git a/dev/conda-recipes/build.sh b/dev/conda-recipes/build.sh new file mode 100755 index 0000000..67e4a05 --- /dev/null +++ b/dev/conda-recipes/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Set Mac OS X minimum deployment target +if [ `uname` == Darwin ]; then + export CXXFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" + export LDFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" +fi + +# Configure GammaLib +./configure --prefix="$PREFIX" + +# Build +make + +# Install +make install diff --git a/dev/conda-recipes/conda_build_config.yaml b/dev/conda-recipes/conda_build_config.yaml new file mode 100644 index 0000000..21ce93b --- /dev/null +++ b/dev/conda-recipes/conda_build_config.yaml @@ -0,0 +1,4 @@ +python: + - 2.7 + - 3.5 + - 3.6 diff --git a/dev/conda-recipes/meta.yaml.in b/dev/conda-recipes/meta.yaml.in new file mode 100644 index 0000000..fca758c --- /dev/null +++ b/dev/conda-recipes/meta.yaml.in @@ -0,0 +1,31 @@ +package: + name: gammalib + version: @VERSION@ + + +source: + url: http://cta.irap.omp.eu/ctools/releases/gammalib/gammalib-@VERSION@.tar.gz + #md5: a2751da55f7b97d48db57156e8096792 + +build: + number: 1 + binary_relocation: True + detect_binary_files_with_prefix: True + +requirements: + build: + - python + - setuptools + - cfitsio + - readline + - ncurses + - swig + run: + - python + - cfitsio + - readline + - ncurses + +about: + home: http://cta.irap.omp.eu/gammalib + license: GPL3 diff --git a/dev/release.py b/dev/release.py index c770d18..8b5d871 100755 --- a/dev/release.py +++ b/dev/release.py @@ -385,7 +385,6 @@ def set_package_version(version): # file name should include their access paths with respect to the source # directory filenames = ['configure.ac', - 'gammalib.pc.in', 'README.md', 'sonar-project.properties', 'doc/Doxyfile', diff --git a/gammalib.pc.in b/gammalib.pc.in index 0987b62..e59f288 100644 --- a/gammalib.pc.in +++ b/gammalib.pc.in @@ -6,7 +6,7 @@ includedir=${prefix}/include Name: GammaLib Description: Versatile toolbox for analysis of astronomical gamma-ray data URL: http://cta.irap.omp.eu/gammalib/ -Version: 1.5.0.dev1 +Version: @VERSION@ Requires: Requires.private: @CFITSIO@ Conflicts: -- libgit2 0.21.4