summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2022-07-13 20:47:17 +0800
committerUniversebenzene2022-07-13 20:47:17 +0800
commitbb35dab352050c37627b5fc4a11b5897e308bc0f (patch)
tree00cb4bbfb976a52a06405ee0fe0138398dffd7f6
parentcc996671ec99515db80757fb211a4422220ba817 (diff)
downloadaur-bb35dab352050c37627b5fc4a11b5897e308bc0f.tar.gz
Update to version 1.5.0
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD26
-rw-r--r--datasets-use-local.patch77
4 files changed, 106 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4bbee79b3d55..78c250896d0a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
pkgbase = python-photutils
pkgdesc = Astropy Affiliated package for image photometry utilities
- pkgver = 1.4.0
+ pkgver = 1.5.0
pkgrel = 1
- url = http://photutils.readthedocs.io/
+ url = http://photutils.readthedocs.io
arch = i686
arch = x86_64
license = BSD
checkdepends = python-pytest-astropy
checkdepends = python-gwcs
- makedepends = cython>=0.28
+ makedepends = cython>=0.29.22
makedepends = python-setuptools-scm
makedepends = python-wheel
makedepends = python-build
@@ -20,8 +20,8 @@ pkgbase = python-photutils
makedepends = python-scikit-image
makedepends = python-sphinx-astropy
makedepends = graphviz
- source = https://files.pythonhosted.org/packages/source/p/photutils/photutils-1.4.0.tar.gz
- md5sums = 39647bdd3ca2d10564c44fe2a4196f72
+ source = https://files.pythonhosted.org/packages/source/p/photutils/photutils-1.5.0.tar.gz
+ md5sums = c010166dc3ecf3f44a87c229aa5bc7bd
pkgname = python-photutils
depends = python>=3.8
@@ -34,6 +34,7 @@ pkgname = python-photutils
optdepends = python-gwcs>=0.16: Used in make_gwcs to create a simple celestial gwcs object
optdepends = python-photutils-doc: Documentation for python-photutils
optdepends = python-bottleneck: Improves the performance of sigma clipping and other functionality that may require computing statistics on arrays with NaN values
+ optdepends = python-tqdm: Used to display optional progress bars
pkgname = python-photutils-doc
pkgdesc = Documentation for Python Photutils module
diff --git a/.gitignore b/.gitignore
index e896dcd6056d..b6be1d33b2a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,6 @@ pkg
*.part
*.pkg.tar.*
*.log
+*fit*
+*xml*
+*txt*
diff --git a/PKGBUILD b/PKGBUILD
index eff0a0f3ab6c..dc2c852f0aa0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,13 @@
pkgbase=python-photutils
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}" "python-${_pyname}-doc")
-pkgver=1.4.0
+pkgver=1.5.0
pkgrel=1
pkgdesc="Astropy Affiliated package for image photometry utilities"
arch=('i686' 'x86_64')
-url="http://photutils.readthedocs.io/"
+url="http://photutils.readthedocs.io"
license=('BSD')
-makedepends=('cython>=0.28'
+makedepends=('cython>=0.29.22'
'python-setuptools-scm'
'python-wheel'
'python-build'
@@ -22,7 +22,18 @@ makedepends=('cython>=0.28'
'graphviz')
checkdepends=('python-pytest-astropy' 'python-gwcs')
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
-md5sums=('39647bdd3ca2d10564c44fe2a4196f72')
+# "https://github.com/astropy/photutils-datasets/raw/main/data/M6707HH.fits"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/SA112-SF1-001R1.fit.gz"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/SA112-SF1-ra-dec-list.txt"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/hst_wfc3ir_f160w_simulated_starfield.fits"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/irac_ch1_flight.fits"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/irac_ch2_flight.fits"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/irac_ch3_flight.fits"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/irac_ch4_flight.fits"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/spitzer_example_catalog.xml"
+# "https://github.com/astropy/photutils-datasets/raw/main/data/spitzer_example_image.fits"
+# 'datasets-use-local.patch')
+md5sums=('c010166dc3ecf3f44a87c229aa5bc7bd')
get_pyver() {
python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'
@@ -32,6 +43,8 @@ prepare() {
cd ${srcdir}/${_pyname}-${pkgver}
sed -i "/oldest-supported-numpy/d" pyproject.toml
+# cp -v "${srcdir}"/{*.fit*,*.txt,*.xml} ${_pyname}/datasets/data
+# patch -Np1 -i "${srcdir}/datasets-use-local.patch"
}
build() {
@@ -46,7 +59,7 @@ build() {
check() {
cd ${srcdir}/${_pyname}-${pkgver}
- pytest "build/lib.linux-${CARCH}-$(get_pyver)" --remote-data || warning "Tests failed"
+ pytest "build/lib.linux-${CARCH}-$(get_pyver)" --remote-data=any || warning "Tests failed"
}
package_python-photutils() {
@@ -57,7 +70,8 @@ package_python-photutils() {
'python-matplotlib>=3.1: To power a variety of plotting features (e.g. plotting apertures'
'python-gwcs>=0.16: Used in make_gwcs to create a simple celestial gwcs object'
'python-photutils-doc: Documentation for python-photutils'
- 'python-bottleneck: Improves the performance of sigma clipping and other functionality that may require computing statistics on arrays with NaN values')
+ 'python-bottleneck: Improves the performance of sigma clipping and other functionality that may require computing statistics on arrays with NaN values'
+ 'python-tqdm: Used to display optional progress bars')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}"
diff --git a/datasets-use-local.patch b/datasets-use-local.patch
new file mode 100644
index 000000000000..f1306c8eec92
--- /dev/null
+++ b/datasets-use-local.patch
@@ -0,0 +1,77 @@
+--- a/photutils/datasets/load.py 2022-07-13 11:03:16.000000000 +0800
++++ b/photutils/datasets/load.py 2022-07-13 15:21:23.655360328 +0800
+@@ -105,8 +105,12 @@
+ hdu = load_spitzer_image()
+ plt.imshow(hdu.data, origin='lower', vmax=50)
+ """
+- path = get_path('spitzer_example_image.fits', location='remote',
+- show_progress=show_progress)
++ try:
++ path = get_path('spitzer_example_image.fits', location='remote',
++ show_progress=show_progress)
++ except (URLError, HTTPError): # timeout or not found
++ path = get_path('spitzer_example_image.fits', location='local',
++ show_progress=show_progress)
+ hdu = fits.open(path)[0]
+
+ return hdu
+@@ -149,8 +153,12 @@
+ plt.xlim(18.39, 18.05)
+ plt.ylim(0.13, 0.30)
+ """
+- path = get_path('spitzer_example_catalog.xml', location='remote',
+- show_progress=show_progress)
++ try:
++ path = get_path('spitzer_example_catalog.xml', location='remote',
++ show_progress=show_progress)
++ except Exception: # timeout or not found
++ path = get_path('spitzer_example_catalog.xml', location='local',
++ show_progress=show_progress)
+ table = Table.read(path)
+
+ return table
+@@ -216,7 +224,10 @@
+ raise ValueError('channel must be 1, 2, 3, or 4')
+
+ filepath = f'irac_ch{channel}_flight.fits'
+- path = get_path(filepath, location='remote', show_progress=show_progress)
++ try:
++ path = get_path(filepath, location='remote', show_progress=show_progress)
++ except Exception: # timeout or not found
++ path = get_path(filepath, location='local', show_progress=show_progress)
+ hdu = fits.open(path)[0]
+
+ return hdu
+@@ -287,8 +298,12 @@
+ hdu = load_star_image()
+ plt.imshow(hdu.data, origin='lower', interpolation='nearest')
+ """
+- path = get_path('M6707HH.fits', location='remote',
+- show_progress=show_progress)
++ try:
++ path = get_path('M6707HH.fits', location='remote',
++ show_progress=show_progress)
++ except Exception: # timeout or not found
++ path = get_path('M6707HH.fits', location='local',
++ show_progress=show_progress)
+ hdu = fits.open(path)[0]
+
+ return hdu
+@@ -322,9 +337,14 @@
+ hdu = load_simulated_hst_star_image()
+ plt.imshow(hdu.data, origin='lower', interpolation='nearest')
+ """
+- path = get_path('hst_wfc3ir_f160w_simulated_starfield.fits',
+- location='photutils-datasets',
+- show_progress=show_progress)
++ try:
++ path = get_path('hst_wfc3ir_f160w_simulated_starfield.fits',
++ location='photutils-datasets',
++ show_progress=show_progress)
++ except Exception: # timeout or not found
++ path = get_path('hst_wfc3ir_f160w_simulated_starfield.fits',
++ location='local',
++ show_progress=show_progress)
+ hdu = fits.open(path)[0]
+
+ return hdu