aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Turner <jturner@gemini.edu>2017-08-24 10:13:52 -0400
committerJames Turner <jturner@gemini.edu>2017-08-24 10:13:52 -0400
commit5481223b9d3eb8c3ac1a6a22f00bf755e12bb558 (patch)
tree61ff311fd1415673f03a0ea72f6704faf984c67c
parent437d3bc627d0f953be06fdc2b18a45b8346e6e04 (diff)
downloadastroconda-iraf-5481223b9d3eb8c3ac1a6a22f00bf755e12bb558.tar.gz
Initial definition of James's PyFU datacube mosaicking package for PyRAF & Python, which is fairly widely used to reduce GMOS data.
-rw-r--r--pyfu/bld.bat3
-rw-r--r--pyfu/build.sh21
-rw-r--r--pyfu/meta.yaml31
-rw-r--r--pyfu/post-link.sh4
-rw-r--r--pyfu/pre-unlink.sh1
-rw-r--r--pyfu/ur_extern.pkg3
6 files changed, 63 insertions, 0 deletions
diff --git a/pyfu/bld.bat b/pyfu/bld.bat
new file mode 100644
index 0000000..fa5316a
--- /dev/null
+++ b/pyfu/bld.bat
@@ -0,0 +1,3 @@
+
+echo Not supported on Windows
+exit 1 \ No newline at end of file
diff --git a/pyfu/build.sh b/pyfu/build.sh
new file mode 100644
index 0000000..2881c55
--- /dev/null
+++ b/pyfu/build.sh
@@ -0,0 +1,21 @@
+# Install as a Python package:
+python setup.py install || exit 1
+
+# Documentation:
+mkdir -p ${PREFIX}/share/pyfu && cp -p README LICENSE ${PREFIX}/share/pyfu/
+
+# Also set up as an IRAF package, just by linking to the Python version from
+# the iraf_extern directory (it doesn't need building & installing like an SPP
+# package but we use the defs from astroconda-iraf-helpers to put things in
+# the right places):
+. ac_iraf_defs
+
+ext_path="${PREFIX}/${extern_dir}"
+mkdir -p "$ext_path" || exit 1
+
+(cd "$ext_path" && ln -s ${SP_DIR}/pyfu .)
+
+# Copy some files for IRAF that don't get installed by setup.py:
+cp -p "${RECIPE_DIR}/${pkg_extpkg}" "${ext_path}/pyfu/"
+cp -p pyfu/pyfu.cl pyfu/*.par "${ext_path}/pyfu/"
+
diff --git a/pyfu/meta.yaml b/pyfu/meta.yaml
new file mode 100644
index 0000000..4d6e2bc
--- /dev/null
+++ b/pyfu/meta.yaml
@@ -0,0 +1,31 @@
+about:
+ home: http://drforum.gemini.edu/topic/pyfu-datacube-mosaicking-package
+ license: BSD
+ license_file: LICENSE
+ summary: IFU datacube mosaicking package for PyRAF and Python
+build:
+ number: '0'
+ # These must be copied from astroconda-iraf-helpers, as conda unhelpfully
+ # disallows the post-install step from depending on other packages:
+ always_include_files:
+ - bin/ac_config_iraf_pkg
+ - bin/ac_update_extern_pkg
+package:
+ name: pyfu
+ version: "0.9"
+source:
+ svn_url: http://scisoft.gemini.edu/svn/ifudr/pyfu/0.9
+requirements:
+ build:
+ - astroconda-iraf-helpers
+ - python x.x # syntax needed to build for each python ver.
+ run:
+ - python x.x
+ - numpy >=1.9 # (use same version as disco-stu)
+ - scipy >=0.14 # (to match the NumPy requirement)
+ - astropy >=1.0
+ - stsci.imagestats >=1.4
+ # PyRAF is an optional dependency if the IRAF interface is used but is not
+ # needed by the Python interface so don't require it here, as that would
+ # also drag in IRAF etc.
+
diff --git a/pyfu/post-link.sh b/pyfu/post-link.sh
new file mode 100644
index 0000000..7dea9c6
--- /dev/null
+++ b/pyfu/post-link.sh
@@ -0,0 +1,4 @@
+# Call a common script that updates extern.pkg for the new IRAF package:
+
+"$PREFIX/bin/ac_config_iraf_pkg" pyfu
+
diff --git a/pyfu/pre-unlink.sh b/pyfu/pre-unlink.sh
new file mode 100644
index 0000000..484bf02
--- /dev/null
+++ b/pyfu/pre-unlink.sh
@@ -0,0 +1 @@
+"$PREFIX/bin/ac_config_iraf_pkg" --remove pyfu 2>/dev/null; :
diff --git a/pyfu/ur_extern.pkg b/pyfu/ur_extern.pkg
new file mode 100644
index 0000000..9ef9f73
--- /dev/null
+++ b/pyfu/ur_extern.pkg
@@ -0,0 +1,3 @@
+reset pyfu = UR_VDIR
+task pyfu.pkg = pyfu$pyfu.cl
+