Commit 61368016c834d3e68ca5066bb4ce8af996f0df4a

Authored by Jürgen Knödlseder
1 parent 4a70f7ca

Add conda.recipe and activation and deactivation scripts

.gitignore
... ... @@ -46,6 +46,7 @@ coverage-report-python.xml
46 46 coverage-report-cxx.xml
47 47 ctools-*
48 48  
  49 +dev/conda.recipe/meta.yaml
49 50 doc/html
50 51 doc/man
51 52 src/ctools-setup
... ...
Makefile.am
... ... @@ -31,6 +31,12 @@ pkgconfigdir = $(libdir)/pkgconfig
31 31 # Files to install in Pkgconfig directory
32 32 pkgconfig_DATA = ctools.pc
33 33  
  34 +# Conda activate directory
  35 +condaactivatedir = $(sysconfdir)/conda/activate.d
  36 +condaactivate_DATA = dev/ctools-activate.sh
  37 +condadeactivatedir = $(sysconfdir)/conda/deactivate.d
  38 +condadeactivate_DATA = dev/ctools-deactivate.sh
  39 +
34 40 # Manual pages to install
35 41 man_MANS =
36 42  
... ... @@ -46,7 +52,12 @@ docdir = ${datadir}/doc/${PACKAGE}
46 52  
47 53 # Extra files to be distributed in the tar file
48 54 EXTRA_DIST = README.md \
49   - doc/Doxyfile doc/source
  55 + doc/Doxyfile doc/source \
  56 + dev/testreport.py \
  57 + dev/ctools-activate.sh dev/ctools-deactivate.sh \
  58 + dev/conda.recipe/build.sh \
  59 + dev/conda.recipe/conda_build_config.yaml \
  60 + dev/conda.recipe/meta.yaml.in
50 61  
51 62 #install-data-local: $(HTML_INSTALL_DATA_TARGETS)
52 63 #uninstall-local: $(HTML_UNINSTALL_DATA_TARGETS)
... ...
configure.ac
... ... @@ -1047,6 +1047,7 @@ AC_CONFIG_FILES([Makefile
1047 1047 pyext/Makefile
1048 1048 pyext/setup.py
1049 1049 pyext/ctools/__init__.py
  1050 + dev/conda.recipe/meta.yaml
1050 1051 cscripts/__init__.py
1051 1052 cscripts/Makefile
1052 1053 caldb/Makefile
... ...
ctools.pc.in
... ... @@ -6,7 +6,7 @@ includedir=${prefix}/include
6 6 Name: ctools
7 7 Description: CTA science analysis tools
8 8 URL: http://cta.irap.omp.eu/ctools
9   -Version: 1.4.3
  9 +Version: @VERSION@
10 10 Requires:
11 11 Requires.private: gammalib >= 1.4.3
12 12 Conflicts:
... ...
dev/conda.recipe/build.sh 0 → 100755
  1 +#!/bin/bash
  2 +
  3 +# Set Mac OS X minimum deployment target
  4 +if [ `uname` == Darwin ]; then
  5 + export CXXFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
  6 + export LDFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
  7 +fi
  8 +
  9 +# Configure ctools
  10 +./configure --prefix="$PREFIX"
  11 +
  12 +# Build
  13 +make
  14 +
  15 +# Install
  16 +make install
... ...
dev/conda.recipe/conda_build_config.yaml 0 → 100644
  1 +python:
  2 + - 2.7
  3 + - 3.5
  4 + - 3.6
... ...
dev/conda.recipe/meta.yaml.in 0 → 100644
  1 +package:
  2 + name: ctools
  3 + version: "@VERSION@"
  4 +
  5 +
  6 +source:
  7 + fn: ctools-@VERSION@.tar.gz
  8 + url: http://cta.irap.omp.eu/ctools/releases/ctools/ctools-@VERSION@.tar.gz
  9 + #md5: a2751da55f7b97d48db57156e8096792
  10 +
  11 +build:
  12 + number: 1
  13 + binary_relocation: True
  14 + detect_binary_files_with_prefix: True
  15 +
  16 +requirements:
  17 + build:
  18 + - python
  19 + - setuptools
  20 + - swig
  21 + - gammalib >=1.5.0.dev1
  22 + run:
  23 + - python
  24 + - gammalib >=1.5.0.dev1
  25 +
  26 +about:
  27 + home: http://cta.irap.omp.eu/ctools
  28 + license: GPL3
... ...
dev/ctools-activate.sh 0 → 100644
  1 +#!/bin/sh
  2 +
  3 +export CTOOLS=${CONDA_PREFIX}
  4 +source ${CTOOLS}/bin/ctools-init.sh
... ...
dev/ctools-deactivate.sh 0 → 100644
  1 +#!/bin/sh
  2 +
  3 +unset CTOOLS
  4 +unset CALDB
... ...
dev/release.py
... ... @@ -385,7 +385,6 @@ def set_package_version(version):
385 385 # file name should include their access paths with respect to the source
386 386 # directory
387 387 filenames = ['configure.ac',
388   - 'ctools.pc.in',
389 388 'README.md',
390 389 'sonar-project.properties',
391 390 'doc/Doxyfile',
... ...