summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2019-01-20 01:50:33 +0800
committerUniversebenzene2019-01-20 01:50:33 +0800
commit31ace6799fa02b6a644e3af74ba6295366243f75 (patch)
tree6ddb900f61b215276b598a24ace3941a22299f1d
downloadaur-31ace6799fa02b6a644e3af74ba6295366243f75.tar.gz
Initial import 0.8.1
-rw-r--r--.SRCINFO36
-rw-r--r--PKGBUILD59
-rw-r--r--use_system_xpa.patch42
3 files changed, 137 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..16fe7239588
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,36 @@
+# Generated by mksrcinfo v8
+# Sat Jan 19 17:46:45 UTC 2019
+pkgbase = python-imexam
+ pkgdesc = A package for functionality like IRAF's imexamine
+ pkgver = 0.8.1
+ pkgrel = 1
+ url = https://imexam.readthedocs.io/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ license = MIT
+ checkdepends = python-pytest-astropy
+ checkdepends = python-photutils
+ makedepends = cython
+ makedepends = python-ginga
+ makedepends = python-astropy-helpers>=3.1
+ makedepends = python-sphinx-astropy
+ makedepends = xpa
+ source = https://files.pythonhosted.org/packages/source/i/imexam/imexam-0.8.1.tar.gz
+ source = use_system_xpa.patch
+ md5sums = 009489ebdcd6f3a66736b4035b7aa313
+ md5sums = 2d4bc5f01b53f02a384dbc802d1d3ee5
+
+pkgname = python-imexam
+ depends = python>=3.5
+ depends = python-astropy
+ depends = python-matplotlib
+ optdepends = python-ginga: For Ginga viewer support
+ optdepends = xpa: For connection with DS9
+ optdepends = ds9: For DS9 viewer support
+ optdepends = python-photutils: For photometry features
+ optdepends = python-imexam-doc: Documentation for imexam
+
+pkgname = python-imexam-doc
+ pkgdesc = Documentation for Python imexam module
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..afecd97b28a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Astro Benzene <universebenzene at sina dot com>
+pkgbase=python-imexam
+_pyname=${pkgbase#python-}
+pkgname=("python-${_pyname}" "python-${_pyname}-doc")
+pkgver=0.8.1
+pkgrel=1
+pkgdesc="A package for functionality like IRAF's imexamine"
+arch=('i686' 'x86_64')
+url="https://imexam.readthedocs.io/"
+license=('BSD' 'MIT')
+makedepends=('cython' 'python-ginga' 'python-astropy-helpers>=3.1' 'python-sphinx-astropy' 'xpa')
+checkdepends=('python-pytest-astropy' 'python-photutils')
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
+ 'use_system_xpa.patch')
+md5sums=('009489ebdcd6f3a66736b4035b7aa313'
+ '2d4bc5f01b53f02a384dbc802d1d3ee5')
+
+prepare() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ sed -i -e '/auto_use/s/True/False/' setup.cfg
+ patch -Np1 -i "${srcdir}/use_system_xpa.patch"
+}
+
+build() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+ python setup.py build --use-system-libraries --offline
+
+ msg "Building Docs"
+ python setup.py build_docs
+}
+
+check() {
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ python setup.py test
+}
+
+package_python-imexam() {
+ depends=('python>=3.5' 'python-astropy' 'python-matplotlib')
+ optdepends=('python-ginga: For Ginga viewer support'
+ 'xpa: For connection with DS9'
+ 'ds9: For DS9 viewer support'
+ 'python-photutils: For photometry features'
+ 'python-imexam-doc: Documentation for imexam')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" licenses/{LICENSE.rst,LICENSE_MIT.txt}
+ install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+ python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 --use-system-libraries --offline
+}
+
+package_python-imexam-doc() {
+ pkgdesc="Documentation for Python imexam module"
+ cd ${srcdir}/${_pyname}-${pkgver}/docs/_build
+
+ install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
+}
diff --git a/use_system_xpa.patch b/use_system_xpa.patch
new file mode 100644
index 00000000000..a0fcbffa3df
--- /dev/null
+++ b/use_system_xpa.patch
@@ -0,0 +1,42 @@
+--- a/setup.py 2018-12-15 04:45:58.000000000 +0800
++++ b/setup.py 2019-01-19 23:43:53.493115239 +0800
+@@ -121,24 +121,20 @@
+ xpaio.c
+ """.split()
+
+- XPA_SOURCES = [os.path.join(XPALIB_DIR, c) for c in XPA_FILES]
+- XPALIB_DEFINES = [("HAVE_CONFIG_H", "1")]
++ XPA_SOURCES = []
++ XPALIB_DEFINES = []
+ XPA_SOURCES.append(CYTHON_SOURCE)
+
+ xpa_module = Extension("xpa",
+ sources=XPA_SOURCES,
+- include_dirs=[XPALIB_DIR],
+ define_macros=XPALIB_DEFINES,
+- depends=[CONF_H_NAME],
++ libraries=['xpa'],
+ )
+ if use_cython:
+ ext = cythonize(xpa_module)
+
+ class my_clean(clean):
+ def run(self):
+- import subprocess
+- subprocess.call(["make", "clean"],
+- cwd=XPALIB_DIR)
+ if os.access(CONF_H_NAME, os.F_OK):
+ os.remove(CONF_H_NAME)
+ os.remove("wrappers/xpa.c")
+@@ -147,11 +143,6 @@
+
+ class build_ext_with_configure(build_ext):
+ def build_extensions(self):
+- import subprocess
+- subprocess.call(["make", "-f", "Makefile", "clean"],
+- cwd=XPALIB_DIR)
+- subprocess.call(["sh", "./configure"], cwd=XPALIB_DIR)
+- subprocess.call(["make", "-f", "Makefile"], cwd=XPALIB_DIR)
+ build_ext.build_extensions(self)
+
+ cmdclass.update({'build_ext': build_ext_with_configure,