summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2024-05-10 18:53:54 +0800
committerUniversebenzene2024-05-10 18:53:54 +0800
commit8ab2733995ea795977a2c41c87d709d5b72aa93a (patch)
treea656b4dab3ed1dd7d617126d5b1dd16b64ea45b9
parent47bbcee3bc185c0cd86d9b57792f8954ddd1f228 (diff)
downloadaur-8ab2733995ea795977a2c41c87d709d5b72aa93a.tar.gz
Update to version 1.0.10
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD59
-rw-r--r--fix-doc-underline-length.patch38
-rw-r--r--setup.cfg12
4 files changed, 100 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a7c049892d58..817cfdcbf840 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,27 @@
pkgbase = python-stsci.skypac
pkgdesc = Sky matching for image mosaic
- pkgver = 1.0.9
+ pkgver = 1.0.10
pkgrel = 1
url = https://stsci-skypac.readthedocs.io
arch = any
- license = BSD
+ license = BSD-3-Clause
checkdepends = python-pytest-doctestplus
makedepends = python-setuptools-scm
makedepends = python-wheel
makedepends = python-build
makedepends = python-installer
- makedepends = python-pytest-runner
+ makedepends = python-numpydoc
+ makedepends = python-stsci_rtd_theme
makedepends = python-stwcs
makedepends = python-stsci.imagestats
makedepends = python-spherical_geometry>=1.2.2
- makedepends = python-stsci_rtd_theme
- makedepends = python-sphinx_rtd_theme
- makedepends = python-numpydoc
makedepends = texlive-latexextra
- source = https://github.com/spacetelescope/stsci.skypac/archive/1.0.9.tar.gz
- md5sums = ceeadf5f02d6df7ac973d901edc32ccf
+ source = https://files.pythonhosted.org/packages/source/s/stsci_skypac/stsci_skypac-1.0.10.tar.gz
+ source = fix-doc-underline-length.patch
+ source = setup.cfg
+ md5sums = 3b330075f9bad82e802c93ec17e5db17
+ md5sums = 4f6d5bbf0720af0687f560e8ae97762b
+ md5sums = b9f7309fbf09f7a05455a1d176b9e492
pkgname = python-stsci.skypac
depends = python>=3.5
diff --git a/PKGBUILD b/PKGBUILD
index 966d354d6ab5..c8fac705e87c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,46 @@
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-stsci.skypac
-_pyname=${pkgbase#python-}
-pkgname=("python-${_pyname}" "python-${_pyname}-doc")
-pkgver=1.0.9
+_pname=${pkgbase#python-}
+_pyname=${_pname//./_}
+pkgname=("python-${_pname}" "python-${_pname}-doc")
+pkgver=1.0.10
pkgrel=1
pkgdesc="Sky matching for image mosaic"
arch=('any')
url="https://stsci-skypac.readthedocs.io"
-license=('BSD')
-makedepends=('python-setuptools-scm' 'python-wheel' 'python-build' 'python-installer' 'python-pytest-runner' 'python-stwcs' 'python-stsci.imagestats' 'python-spherical_geometry>=1.2.2' 'python-stsci_rtd_theme' 'python-sphinx_rtd_theme' 'python-numpydoc' 'texlive-latexextra')
-checkdepends=('python-pytest-doctestplus')
-source=("https://github.com/spacetelescope/stsci.skypac/archive/${pkgver}.tar.gz")
-md5sums=('ceeadf5f02d6df7ac973d901edc32ccf')
-
-get_pyver () {
- python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'
+license=('BSD-3-Clause')
+makedepends=('python-setuptools-scm'
+ 'python-wheel'
+ 'python-build'
+ 'python-installer'
+ 'python-numpydoc'
+ 'python-stsci_rtd_theme'
+ 'python-stwcs'
+ 'python-stsci.imagestats'
+ 'python-spherical_geometry>=1.2.2'
+ 'texlive-latexextra') # latex.fmt: -latex; anyfontsize.sty: latexextra
+# 'python-pytest-runner'
+# 'python-sphinx_rtd_theme'
+checkdepends=('python-pytest-doctestplus') # stwcs, imagestats spherical_geometry already in makedepends
+#source=("https://github.com/spacetelescope/stsci.skypac/archive/${pkgver}.tar.gz")
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz"
+ 'fix-doc-underline-length.patch'
+ 'setup.cfg')
+md5sums=('3b330075f9bad82e802c93ec17e5db17'
+ '4f6d5bbf0720af0687f560e8ae97762b'
+ 'b9f7309fbf09f7a05455a1d176b9e492')
+
+get_pyver() {
+ python -c "import sys; print('$1'.join(map(str, sys.version_info[:2])))"
}
+
prepare() {
- export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+# export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
+ cat ${srcdir}/setup.cfg >> setup.cfg
+ patch -Np1 -i "${srcdir}/fix-doc-underline-length.patch"
}
build() {
@@ -26,16 +48,15 @@ build() {
python -m build --wheel --no-isolation
msg "Building Docs"
- ln -rs ${srcdir}/${_pyname}-${pkgver}/${_pyname/-/_}*egg-info \
- build/lib/${_pyname/-/_}-${pkgver}-py$(get_pyver).egg-info
- cd ${srcdir}/${_pyname}-${pkgver}/docs
- PYTHONPATH="../build/lib" make html
+ ln -rs ${srcdir}/${_pyname}-${pkgver}/${_pyname/_/.}*egg-info \
+ build/lib/${_pyname/_/.}-${pkgver}-py$(get_pyver).egg-info
+ PYTHONPATH="../build/lib" make -C docs html
}
check() {
cd ${srcdir}/${_pyname}-${pkgver}
- PYTHONPATH="build/lib" pytest || warning "Tests failed"
+ pytest || warning "Tests failed" # -vv -l -ra --color=yes -o console_output_style=count
}
package_python-stsci.skypac() {
@@ -46,8 +67,8 @@ package_python-stsci.skypac() {
install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE.txt
install -D -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" README.md
python -m installer --destdir="${pkgdir}" dist/*.whl
- rm "${pkgdir}/usr/lib/python$(get_pyver)/site-packages/stsci/__init__.py"
- rm "${pkgdir}/usr/lib/python$(get_pyver)/site-packages/stsci/__pycache__"/*
+ rm "${pkgdir}/usr/lib/python$(get_pyver .)/site-packages/stsci/__init__.py"
+ rm "${pkgdir}/usr/lib/python$(get_pyver .)/site-packages/stsci/__pycache__"/*
}
package_python-stsci.skypac-doc() {
diff --git a/fix-doc-underline-length.patch b/fix-doc-underline-length.patch
new file mode 100644
index 000000000000..2203bc6a15b3
--- /dev/null
+++ b/fix-doc-underline-length.patch
@@ -0,0 +1,38 @@
+--- a/stsci/skypac/region.py 2024-05-07 03:03:03.000000000 +0800
++++ b/stsci/skypac/region.py 2024-05-10 15:57:00.630415748 +0800
+@@ -41,7 +41,7 @@
+ Base class for regions.
+
+ Parameters
+- -------------
++ ----------
+ rid: int or string
+ region ID
+ coordinate_system: astropy.wcs.CoordinateSystem instance or a string
+--- a/stsci/skypac/skystatistics.py 2024-05-07 03:03:03.000000000 +0800
++++ b/stsci/skypac/skystatistics.py 2024-05-10 15:57:46.118042948 +0800
+@@ -28,7 +28,7 @@
+ """ Initializes the SkyStats object.
+
+ Parameters
+- -----------
++ ----------
+ skystat: str
+ Sets the statistics that will be returned by the
+ `~SkyStats.calc_sky`. The following statistics are supported:
+@@ -78,13 +78,13 @@
+ """ Computes statistics on data.
+
+ Parameters
+- -----------
++ ----------
+ data: numpy.ndarray
+ A numpy array of values for which the statistics needs to be
+ computed.
+
+ Returns
+- --------
++ -------
+ statistics: tuple
+ A tuple of two values: (``skyvalue``, ``npix``), where ``skyvalue``
+ is the statistics specified by the `skystat` parameter during
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 000000000000..132fdff2eb8b
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,12 @@
+[metadata]
+package_name = stsci.skypac
+description = Sky matching on image mosaic
+long_description = README.md
+author = Mihai Cara, Warren Hack, Pey Lian Lim
+author_email = help@stsci.edu
+license = BSD-3-Clause
+edit_on_github = False
+github_project = spacetelescope/stsci.skypac
+description-file = README.md
+url = https://github.com/spacetelescope/stsci.skypac
+homepage = https://github.com/spacetelescope/stsci.skypac