diff options
author | Universebenzene | 2020-04-24 23:58:29 +0800 |
---|---|---|
committer | Universebenzene | 2020-04-24 23:58:29 +0800 |
commit | 73171da0be9b336365dfc4a3bcc60a9b13bf5c1b (patch) | |
tree | fdcab173e3b75f3d6b838bc72da07b12f9cefdc6 | |
parent | 10653a0c62c96c23526437804c20ed6eeb1a7402 (diff) | |
download | aur-73171da0be9b336365dfc4a3bcc60a9b13bf5c1b.tar.gz |
Update to version 0.9.1
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | add-tests-subdir-to-copy.patch | 20 | ||||
-rw-r--r-- | use_system_xpa.patch | 87 |
5 files changed, 139 insertions, 54 deletions
@@ -1,33 +1,34 @@ pkgbase = python-imexam pkgdesc = A package for functionality like IRAF's imexamine - pkgver = 0.8.1 + pkgver = 0.9.1 pkgrel = 1 - url = https://imexam.readthedocs.io/ - arch = i686 + url = https://imexam.readthedocs.io arch = x86_64 license = BSD license = MIT + checkdepends = python-pytest makedepends = cython - makedepends = python-ginga - makedepends = python-astropy-helpers>=3.1 - makedepends = python-sphinx-astropy + makedepends = python-setuptools-scm makedepends = xpa - source = https://files.pythonhosted.org/packages/source/i/imexam/imexam-0.8.1.tar.gz + makedepends = python-sphinx-astropy + makedepends = python-ginga + makedepends = python-photutils + source = https://files.pythonhosted.org/packages/source/i/imexam/imexam-0.9.1.tar.gz source = use_system_xpa.patch - md5sums = 009489ebdcd6f3a66736b4035b7aa313 - md5sums = 2d4bc5f01b53f02a384dbc802d1d3ee5 + source = add-tests-subdir-to-copy.patch + md5sums = 07aae0abbbe4983665fd31fa2aa3b07f + md5sums = 66b06d6b0ef7fee444e1ffb5adb15b15 + md5sums = 05b3136e0437fae80962efafe6de3636 pkgname = python-imexam - depends = python>=3.5 - depends = python-astropy + depends = python>=3.6 + depends = python-astropy>=3.0 depends = python-matplotlib + depends = xpa 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 - optdepends = python-pytest-astropy: For testing - optdepends = python-astropy<3.2: For testing pkgname = python-imexam-doc pkgdesc = Documentation for Python imexam module diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..e896dcd6056d --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +src +pkg +*.src.tar.gz +*.tar.gz +*.tar.bz2 +*.part +*.pkg.tar.* +*.log @@ -2,60 +2,65 @@ pkgbase=python-imexam _pyname=${pkgbase#python-} pkgname=("python-${_pyname}" "python-${_pyname}-doc") -pkgver=0.8.1 +pkgver=0.9.1 pkgrel=1 pkgdesc="A package for functionality like IRAF's imexamine" -arch=('i686' 'x86_64') -url="https://imexam.readthedocs.io/" +arch=('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') +makedepends=('cython' 'python-setuptools-scm' 'xpa' 'python-sphinx-astropy' 'python-ginga' 'python-photutils') +checkdepends=('python-pytest') source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz" - 'use_system_xpa.patch') -md5sums=('009489ebdcd6f3a66736b4035b7aa313' - '2d4bc5f01b53f02a384dbc802d1d3ee5') + 'use_system_xpa.patch' + 'add-tests-subdir-to-copy.patch') +md5sums=('07aae0abbbe4983665fd31fa2aa3b07f' + '66b06d6b0ef7fee444e1ffb5adb15b15' + '05b3136e0437fae80962efafe6de3636') prepare() { cd ${srcdir}/${_pyname}-${pkgver} - sed -i -e '/auto_use/s/True/False/' setup.cfg patch -Np1 -i "${srcdir}/use_system_xpa.patch" + patch -Np1 -i "${srcdir}/add-tests-subdir-to-copy.patch" + export _pyver=$(python -V | cut -c 8-10) } build() { cd ${srcdir}/${_pyname}-${pkgver} - python setup.py build --use-system-libraries --offline + python setup.py build + cp ${_pyname}/*.so build/lib*/${_pyname} msg "Building Docs" - python setup.py build_docs +# python setup.py build_sphinx + cd ${srcdir}/${_pyname}-${pkgver}/docs + PYTHONPATH="../build/lib.linux-x86_64-${_pyver}" make html } -#check() { -# cd ${srcdir}/${_pyname}-${pkgver} -# -# python setup.py test -#} +check() { + cd ${srcdir}/${_pyname}-${pkgver} + + pytest +} package_python-imexam() { - depends=('python>=3.5' 'python-astropy' 'python-matplotlib') + depends=('python>=3.6' 'python-astropy>=3.0' 'python-matplotlib' 'xpa') 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' - 'python-pytest-astropy: For testing' - 'python-astropy<3.2: For testing') + 'python-imexam-doc: Documentation for imexam') +# 'python-pytest-astropy: For testing' 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 + python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 } package_python-imexam-doc() { pkgdesc="Documentation for Python imexam module" cd ${srcdir}/${_pyname}-${pkgver}/docs/_build + install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../licenses/{LICENSE.rst,LICENSE_MIT.txt} install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}" cp -a html "${pkgdir}/usr/share/doc/${pkgbase}" } diff --git a/add-tests-subdir-to-copy.patch b/add-tests-subdir-to-copy.patch new file mode 100644 index 000000000000..2323358d61a2 --- /dev/null +++ b/add-tests-subdir-to-copy.patch @@ -0,0 +1,20 @@ +From: Ole Streicher <olebole@debian.org> +Date: Thu, 16 Apr 2020 13:24:10 +0200 +Subject: Add tests subdir to copy + +--- + setup.cfg | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.cfg b/setup.cfg +index 9a22f76..b6aed77 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -27,6 +27,7 @@ setup_requires = + setuptools >= 30.3.0 + packages = + imexam ++ imexam/tests + install_requires = + numpy>=1.14 + scipy>=0.18 diff --git a/use_system_xpa.patch b/use_system_xpa.patch index a0fcbffa3df9..b6cf4048828c 100644 --- a/use_system_xpa.patch +++ b/use_system_xpa.patch @@ -1,42 +1,93 @@ ---- 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 @@ +From: Ole Streicher <ole@aip.de> +Date: Fri, 21 Apr 2017 13:40:06 +0200 +Subject: Use external xpa + +--- + setup.py | 39 ++++++--------------------------------- + 1 file changed, 6 insertions(+), 33 deletions(-) + +diff --git a/setup.py b/setup.py +index dbd93f5..0915595 100644 +--- a/setup.py ++++ b/setup.py +@@ -154,19 +154,14 @@ if not sys.platform.startswith('win'): xpaio.c """.split() +- package_data[PACKAGENAME].extend(XPA_FILES) +- suffix_lib = importlib.machinery.EXTENSION_SUFFIXES[0] +- package_data[PACKAGENAME].append(XPA_LIBNAME+suffix_lib) +- - 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", + xpa_module = Extension("imexam."+XPA_LIBNAME, sources=XPA_SOURCES, - include_dirs=[XPALIB_DIR], define_macros=XPALIB_DEFINES, - depends=[CONF_H_NAME], -+ libraries=['xpa'], ++ libraries = ['xpa'], ) if use_cython: ext = cythonize(xpa_module) +@@ -195,23 +190,11 @@ if not sys.platform.startswith('win'): + ('bdist_base', 'bdist_base')) - class my_clean(clean): def run(self): -- import subprocess -- subprocess.call(["make", "clean"], -- cwd=XPALIB_DIR) +- try: +- if os.access(XPALIB_DIR + "Makefile", os.F_OK): +- check_call(["make", "clean"], cwd=XPALIB_DIR) +- except CalledProcessError as e: +- print(e) +- exit(1) 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): +- xpa_bins = ["xpaaccess", +- "xpaget", +- "xpainfo", +- "xpamb", +- "xpans", +- "xpaset", +- ] ++ xpa_bins = [] + for file in xpa_bins: + myfile = current_env + "/bin/" + file + if os.access(myfile, os.F_OK): +@@ -233,7 +216,7 @@ if not sys.platform.startswith('win'): + def initialize_options(self): + super().initialize_options() + self.noremake = None +- self.remake = True ++ self.remake = False + + def finalize_options(self): + super().finalize_options() +@@ -264,16 +247,6 @@ if not sys.platform.startswith('win'): 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) + super().build_extensions() + +- def run(self): +- try: +- check_call(["sh", "./configure","--prefix="+current_env], cwd=XPALIB_DIR) +- check_call(["make", "clean"],cwd=XPALIB_DIR) +- check_call(["make", "install"], cwd=XPALIB_DIR) +- except CalledProcessError as e: +- print(e) +- exit(1) +- build_ext.run(self) +- + - cmdclass.update({'build_ext': build_ext_with_configure, + cmdclass.update({'install' : InstallWithRemake, +@@ -301,4 +274,4 @@ setup( + package_data=package_data, + package_dir={'imexam': 'imexam'}, + ext_modules=ext, +-) +\ No newline at end of file ++) |