diff --git a/.gitignore b/.gitignore index 98079f5..ccc4a6d 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ coverage-report-python.xml coverage-report-cxx.xml ctools-* +dev/conda.recipe/meta.yaml doc/html doc/man src/ctools-setup diff --git a/Makefile.am b/Makefile.am index 36d0edf..b696ed6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,6 +31,12 @@ pkgconfigdir = $(libdir)/pkgconfig # Files to install in Pkgconfig directory pkgconfig_DATA = ctools.pc +# Conda activate directory +condaactivatedir = $(sysconfdir)/conda/activate.d +condaactivate_DATA = dev/ctools-activate.sh +condadeactivatedir = $(sysconfdir)/conda/deactivate.d +condadeactivate_DATA = dev/ctools-deactivate.sh + # Manual pages to install man_MANS = @@ -46,7 +52,12 @@ docdir = ${datadir}/doc/${PACKAGE} # Extra files to be distributed in the tar file EXTRA_DIST = README.md \ - doc/Doxyfile doc/source + doc/Doxyfile doc/source \ + dev/testreport.py \ + dev/ctools-activate.sh dev/ctools-deactivate.sh \ + dev/conda.recipe/build.sh \ + dev/conda.recipe/conda_build_config.yaml \ + dev/conda.recipe/meta.yaml.in #install-data-local: $(HTML_INSTALL_DATA_TARGETS) #uninstall-local: $(HTML_UNINSTALL_DATA_TARGETS) diff --git a/configure.ac b/configure.ac index 8e09106..e977e81 100644 --- a/configure.ac +++ b/configure.ac @@ -1047,6 +1047,7 @@ AC_CONFIG_FILES([Makefile pyext/Makefile pyext/setup.py pyext/ctools/__init__.py + dev/conda.recipe/meta.yaml cscripts/__init__.py cscripts/Makefile caldb/Makefile diff --git a/ctools.pc.in b/ctools.pc.in index 342d0d7..b3eda26 100644 --- a/ctools.pc.in +++ b/ctools.pc.in @@ -6,7 +6,7 @@ includedir=${prefix}/include Name: ctools Description: CTA science analysis tools URL: http://cta.irap.omp.eu/ctools -Version: 1.4.3 +Version: @VERSION@ Requires: Requires.private: gammalib >= 1.4.3 Conflicts: diff --git a/dev/conda.recipe/build.sh b/dev/conda.recipe/build.sh new file mode 100755 index 0000000..b6edfb2 --- /dev/null +++ b/dev/conda.recipe/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 ctools +./configure --prefix="$PREFIX" + +# Build +make + +# Install +make install diff --git a/dev/conda.recipe/conda_build_config.yaml b/dev/conda.recipe/conda_build_config.yaml new file mode 100644 index 0000000..21ce93b --- /dev/null +++ b/dev/conda.recipe/conda_build_config.yaml @@ -0,0 +1,4 @@ +python: + - 2.7 + - 3.5 + - 3.6 diff --git a/dev/conda.recipe/meta.yaml.in b/dev/conda.recipe/meta.yaml.in new file mode 100644 index 0000000..92e3f43 --- /dev/null +++ b/dev/conda.recipe/meta.yaml.in @@ -0,0 +1,28 @@ +package: + name: ctools + version: "@VERSION@" + + +source: + fn: ctools-@VERSION@.tar.gz + url: http://cta.irap.omp.eu/ctools/releases/ctools/ctools-@VERSION@.tar.gz + #md5: a2751da55f7b97d48db57156e8096792 + +build: + number: 1 + binary_relocation: True + detect_binary_files_with_prefix: True + +requirements: + build: + - python + - setuptools + - swig + - gammalib >=1.5.0.dev1 + run: + - python + - gammalib >=1.5.0.dev1 + +about: + home: http://cta.irap.omp.eu/ctools + license: GPL3 diff --git a/dev/ctools-activate.sh b/dev/ctools-activate.sh new file mode 100644 index 0000000..c96b1f1 --- /dev/null +++ b/dev/ctools-activate.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export CTOOLS=${CONDA_PREFIX} +source ${CTOOLS}/bin/ctools-init.sh diff --git a/dev/ctools-deactivate.sh b/dev/ctools-deactivate.sh new file mode 100644 index 0000000..de3421a --- /dev/null +++ b/dev/ctools-deactivate.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +unset CTOOLS +unset CALDB diff --git a/dev/release.py b/dev/release.py index 801afd8..ff2bd49 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', - 'ctools.pc.in', 'README.md', 'sonar-project.properties', 'doc/Doxyfile',