summaryrefslogtreecommitdiff
path: root/dev-python/fitsio
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/fitsio')
-rw-r--r--dev-python/fitsio/Manifest9
-rw-r--r--dev-python/fitsio/files/fitsio-1.2.1-numpy-2.patch159
-rw-r--r--dev-python/fitsio/fitsio-1.2.1-r1.ebuild42
-rw-r--r--dev-python/fitsio/fitsio-1.2.1-r2.ebuild50
-rw-r--r--dev-python/fitsio/fitsio-1.2.4.ebuild (renamed from dev-python/fitsio/fitsio-1.2.2.ebuild)2
5 files changed, 3 insertions, 259 deletions
diff --git a/dev-python/fitsio/Manifest b/dev-python/fitsio/Manifest
index 124989859d5f..6b78c6dfcbad 100644
--- a/dev-python/fitsio/Manifest
+++ b/dev-python/fitsio/Manifest
@@ -1,10 +1,5 @@
-AUX fitsio-1.2.1-numpy-2.patch 6096 BLAKE2B 2e021c6f09e2b34135eae7062705ba50c4278181e2e5e53eb4a3f463fae28e7c6863750163f7b46411992c44a1681df2a850e0441296f03c702195c4d7a160d4 SHA512 b984064cee7f7760dd09ee94f6b4094ca17d4efff52c210f95c4728aa8871c995ebc31f2e7b7eea8817f382663b80b12093bd156b61d94c6f000da24a87644c8
-DIST fitsio-1.2.1-gcc-14.patch 30464 BLAKE2B 328d6321b68bd2f568aea649d2d8d7db4c2f8077f1208cec6199b1cc9399446f063d1010d586b77d635727c2285e9504bbfab614fbaae59f6c4638c7f7188372 SHA512 e1fea1968688cf265bfc8735c95b1ca211628fdea901d37b3cb4f76239c0a7c8e589fb78429e3535e3e1a2c25e1aec8929fe21db3a32d929774267c559464c2a
-DIST fitsio-1.2.1.gh.tar.gz 4584464 BLAKE2B 376d2afe2e637075fca88c24c17117600973dc81fbb006e3e8bf4ddab023db6a466653187b686a4beb75339559cb4b77e0bf927f09c991d9205ffb0e66ad17a6 SHA512 645c117c394a18cdbb0c5033a1446e1f6e6473f54d9556b7591f33873855a70860343b3e4811284d7dfa16696ef23a1abb74ee638318d7295eb85ec4b17f0309
-DIST fitsio-1.2.2.gh.tar.gz 4584305 BLAKE2B 285037e173d9e4dca1ac6d32012a23310c10bf3d1299af275b93dd749f34fe8f417e7d2f9062e9362416a1e6d4b2876a351041e1102c07209b89e0fdac6b647f SHA512 a479490cfdda28481b2e5d04033e7dcb9c97b99f22f2cb29c7bdb38015bd5a2d2ea7ccd291e109a0551b0340575ab5123fb8edc924766a15548112fdeb700677
DIST fitsio-1.2.3.gh.tar.gz 4507743 BLAKE2B 2b38b9b1be3eb7ab5ed67954f6c1310c03a99cbae71bb5716702d31bc69e09f8d73fb86696edb06bba78093d48ad784f280e7023fadc932190a82ce6748cf5af SHA512 11c2e8e26019bdc364d2a566c0680baa85d93a0a49eb9e5fc0ccc79f2566c616634a8bf10f1d8dbb4c1393675d11bb8d4e469d2f30a8cb88bfa73697ac9d4c57
-EBUILD fitsio-1.2.1-r1.ebuild 819 BLAKE2B 276de51dcaf05ca510b6616723a1da510d3a4e1bd8653c6eb9bd731776bc02ab29af1c7556f8d32f58d99f17ad2f5db4b07794c0e482264bb8d46d53c8cdfcf8 SHA512 c253c54a710bdc40ae647c799b6faeb736580b574f270d7f2a8c39914677836a5d50a7f9d0f6519ce204fa239f56b9f89e72591fa460d714a170a1517215e33c
-EBUILD fitsio-1.2.1-r2.ebuild 1037 BLAKE2B 0a2f499bdc3a230ec98c02079d688e200fab66fe3ca97b87069c78db55f6bf9500448bbe8538f65018980b95d2547d72115bce734dfb9c077b1f5c1aa24c204c SHA512 46b7bfeb015cf644b7e0c7e1dc449f62487ae9f89cf95f12e5207c018e95e8be6b7e6508d6efa0bc89a2f671a6e208efa972cbf4fb3f33b14cb04f3882504769
-EBUILD fitsio-1.2.2.ebuild 782 BLAKE2B 9c7eb5a402bf8b18ae4096b35b031d78368f712c3247a2e5929e89676220af74934014eef52e49a4f61f39806617d2527f16ce64e2a9232a8c2530eb74ade480 SHA512 4e8f02ae9cf06c7d2bd89df58192c1e42a459752b01aba9d6a2630c306684b9cf8afb2f31486a90f4d374481a842676243a9787b04863ad20032966ec8a7763c
+DIST fitsio-1.2.4.gh.tar.gz 4540756 BLAKE2B 445a6d2c5dd267fdf7eca5359eb378930b8a111c24c68c1728f00818aa2f04dabe486147e1c56fd36c8a096e4bcd89c6ed382b9bbfbd29f9b24f9a4195fa17ae SHA512 ca51957a413ee45b0adc71c97409e8055acf1c27f8f42838a4814ed9b5530a30c75579a4a567199d6524bdcd32de5c82fabdee1440577f1cc915543285ee7fe1
EBUILD fitsio-1.2.3.ebuild 790 BLAKE2B 654ebbdf30aa40837b2a491606cecd013faa143c149ae16f59955b1cf1d3db357054d000633d35f2331c71c50c28c4f09a31d9a1a8101f0acdb257215c7be12c SHA512 704b8c96ad2e60701602d333f341f09f64d733e839ceaeac4c1eb1c4c177295995fb24f591236199fe839d9aa4668753e1fb39d01bdd940e08f37e8f4e32c32e
+EBUILD fitsio-1.2.4.ebuild 790 BLAKE2B 654ebbdf30aa40837b2a491606cecd013faa143c149ae16f59955b1cf1d3db357054d000633d35f2331c71c50c28c4f09a31d9a1a8101f0acdb257215c7be12c SHA512 704b8c96ad2e60701602d333f341f09f64d733e839ceaeac4c1eb1c4c177295995fb24f591236199fe839d9aa4668753e1fb39d01bdd940e08f37e8f4e32c32e
MISC metadata.xml 947 BLAKE2B d51c4feb2baade20680a4568b05c28e217d4216f6035dfcbda05876bb7c4d804dc2b02576e2e67eb2b1890e18c86bca9ab4644b0fee69d213ece257d204681d5 SHA512 e8a29ec957adf538929d3639723cfe317c57f6c1d5b7a89a697a0f99dacdab1e21edb774acdb2dcb426f90e1221f9d0b9c008abaf462354d42797ab6bacf9162
diff --git a/dev-python/fitsio/files/fitsio-1.2.1-numpy-2.patch b/dev-python/fitsio/files/fitsio-1.2.1-numpy-2.patch
deleted file mode 100644
index cfc0b99a8f17..000000000000
--- a/dev-python/fitsio/files/fitsio-1.2.1-numpy-2.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-diff --git a/fitsio/fitslib.py b/fitsio/fitslib.py
-index 7ef718b..3d43549 100644
---- a/fitsio/fitslib.py
-+++ b/fitsio/fitslib.py
-@@ -25,7 +25,7 @@
- import numpy
-
- from . import _fitsio_wrap
--from .util import IS_PY3, mks, array_to_native, isstring
-+from .util import IS_PY3, mks, array_to_native, isstring, copy_if_needed
- from .header import FITSHDR
- from .hdu import (
- ANY_HDU, IMAGE_HDU, BINARY_TBL, ASCII_TBL,
-@@ -957,7 +957,7 @@ def create_image_hdu(self,
- if IS_PY3 and img2send.dtype.char == 'U':
- # for python3, we convert unicode to ascii
- # this will error if the character is not in ascii
-- img2send = img2send.astype('S', copy=False)
-+ img2send = img2send.astype('S', copy=copy_if_needed)
-
- else:
- self._ensure_empty_image_ok()
-@@ -1738,7 +1738,7 @@ def npy_obj2fits(data, name=None):
- else:
- fits_dtype = _table_npy2fits_form['S']
- else:
-- arr0 = numpy.array(first, copy=False)
-+ arr0 = numpy.array(first, copy=copy_if_needed)
- dtype0 = arr0.dtype
- npy_dtype = dtype0.descr[0][1][1:]
- if npy_dtype[0] == 'S' or npy_dtype[0] == 'U':
-diff --git a/fitsio/hdu/image.py b/fitsio/hdu/image.py
-index 8c06bcf..a2d16c8 100644
---- a/fitsio/hdu/image.py
-+++ b/fitsio/hdu/image.py
-@@ -27,7 +27,7 @@
-
- from math import floor
- from .base import HDUBase, IMAGE_HDU
--from ..util import IS_PY3, array_to_native
-+from ..util import IS_PY3, array_to_native, copy_if_needed
-
- # for python3 compat
- if IS_PY3:
-@@ -146,7 +146,7 @@ def write(self, img, start=0, **keys):
- if IS_PY3 and img_send.dtype.char == 'U':
- # for python3, we convert unicode to ascii
- # this will error if the character is not in ascii
-- img_send = img_send.astype('S', copy=False)
-+ img_send = img_send.astype('S', copy=copy_if_needed)
-
- if not numpy.isscalar(start):
- # convert to scalar offset
-diff --git a/fitsio/hdu/table.py b/fitsio/hdu/table.py
-index f210121..3b462b1 100644
---- a/fitsio/hdu/table.py
-+++ b/fitsio/hdu/table.py
-@@ -36,7 +36,8 @@
- array_to_native,
- array_to_native_c,
- FITSRuntimeWarning,
-- mks
-+ mks,
-+ copy_if_needed,
- )
- from .base import HDUBase, ASCII_TBL, IMAGE_HDU, _hdu_type_map
-
-@@ -282,7 +283,7 @@ def write(self, data, firstrow=0, columns=None, names=None, slow=False,
- if IS_PY3 and colref.dtype.char == 'U':
- # for python3, we convert unicode to ascii
- # this will error if the character is not in ascii
-- colref = colref.astype('S', copy=False)
-+ colref = colref.astype('S', copy=copy_if_needed)
-
- nonobj_arrays.append(colref)
-
-@@ -347,7 +348,7 @@ def write_column(self, column, data, firstrow=0, **keys):
- if IS_PY3 and data_send.dtype.char == 'U':
- # for python3, we convert unicode to ascii
- # this will error if the character is not in ascii
-- data_send = data_send.astype('S', copy=False)
-+ data_send = data_send.astype('S', copy=copy_if_needed)
-
- self._verify_column_data(colnum, data_send)
-
-@@ -1420,13 +1421,13 @@ def _extract_rows(self, rows, sort=False):
- Extract an array of rows from an input scalar or sequence
- """
- if rows is not None:
-- rows = np.array(rows, ndmin=1, copy=False, dtype='i8')
-+ rows = np.array(rows, ndmin=1, copy=copy_if_needed, dtype='i8')
- if sort:
- rows = np.unique(rows)
- return rows, None
-
- # returns unique, sorted. Force i8 for 32-bit systems
-- sortind = np.array(rows.argsort(), dtype='i8', copy=False)
-+ sortind = np.array(rows.argsort(), dtype='i8', copy=copy_if_needed)
-
- maxrow = self._info['nrows']-1
- if rows.size > 0:
-@@ -1583,7 +1584,7 @@ def _maybe_decode_fits_ascii_strings_to_unicode_py3(self, array):
- else:
- new_dt.append(_dt)
- if do_conversion:
-- array = array.astype(new_dt, copy=False)
-+ array = array.astype(new_dt, copy=copy_if_needed)
- return array
-
- def _convert_bool_array(self, array):
-@@ -1721,7 +1722,7 @@ def _read_var_column(self, colnum, rows, sortind, vstorage):
- descr = 'S%d' % max_size
- array = np.fromiter(dlist, descr)
- if IS_PY3:
-- array = array.astype('U', copy=False)
-+ array = array.astype('U', copy=copy_if_needed)
- else:
- descr = dlist[0].dtype.str
- array = np.zeros((len(dlist), max_size), dtype=descr)
-diff --git a/fitsio/util.py b/fitsio/util.py
-index 562b609..5d337be 100644
---- a/fitsio/util.py
-+++ b/fitsio/util.py
-@@ -41,7 +41,10 @@ def cfitsio_version(asfloat=False):
- numpy.uint64, numpy.int64)
-
- # different for py3
--_stypes += (numpy.string_, numpy.str_)
-+if numpy.lib.NumpyVersion(numpy.__version__) < "1.28.0":
-+ _stypes += (numpy.string_, numpy.str_,)
-+else:
-+ _stypes += (numpy.bytes_, numpy.str_,)
-
- # for header keywords
- _ftypes = (float, numpy.float32, numpy.float64)
-@@ -134,9 +137,22 @@ def array_to_native(array, inplace=False):
- return output
-
-
-+if numpy.lib.NumpyVersion(numpy.__version__) >= "2.0.0":
-+ copy_if_needed = None
-+elif numpy.lib.NumpyVersion(numpy.__version__) < "1.28.0":
-+ copy_if_needed = False
-+else:
-+ # 2.0.0 dev versions, handle cases where copy may or may not exist
-+ try:
-+ numpy.array([1]).__array__(copy=None)
-+ copy_if_needed = None
-+ except TypeError:
-+ copy_if_needed = False
-+
-+
- def array_to_native_c(array_in, inplace=False):
- # copy only made if not C order
-- arr = numpy.array(array_in, order='C', copy=False)
-+ arr = numpy.array(array_in, order='C', copy=copy_if_needed)
- return array_to_native(arr, inplace=inplace)
-
-
diff --git a/dev-python/fitsio/fitsio-1.2.1-r1.ebuild b/dev-python/fitsio/fitsio-1.2.1-r1.ebuild
deleted file mode 100644
index 95d01f95502b..000000000000
--- a/dev-python/fitsio/fitsio-1.2.1-r1.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python library to read from and write to FITS files"
-HOMEPAGE="
- https://github.com/esheldon/fitsio/
- https://pypi.org/project/fitsio/
-"
-SRC_URI="
- https://github.com/esheldon/fitsio/archive/${PV}.tar.gz
- -> ${P}.gh.tar.gz
-"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-
-DEPEND="
- <dev-python/numpy-2[${PYTHON_USEDEP}]
- >=dev-python/numpy-1.11[${PYTHON_USEDEP}]
- sci-libs/cfitsio:0=
-"
-RDEPEND="
- ${DEPEND}
-"
-
-distutils_enable_tests pytest
-
-export FITSIO_USE_SYSTEM_FITSIO=1
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
- epytest
-}
diff --git a/dev-python/fitsio/fitsio-1.2.1-r2.ebuild b/dev-python/fitsio/fitsio-1.2.1-r2.ebuild
deleted file mode 100644
index 5ad63bf814ce..000000000000
--- a/dev-python/fitsio/fitsio-1.2.1-r2.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python library to read from and write to FITS files"
-HOMEPAGE="
- https://github.com/esheldon/fitsio/
- https://pypi.org/project/fitsio/
-"
-SRC_URI="
- https://github.com/esheldon/fitsio/archive/${PV}.tar.gz
- -> ${P}.gh.tar.gz
- https://github.com/esheldon/fitsio/pull/394.patch
- -> fitsio-1.2.1-gcc-14.patch
-"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-
-DEPEND="
- >=dev-python/numpy-1.11:=[${PYTHON_USEDEP}]
- sci-libs/cfitsio:0=
-"
-RDEPEND="
- ${DEPEND}
-"
-
-distutils_enable_tests pytest
-
-PATCHES=(
- # https://github.com/esheldon/fitsio/pull/394
- "${DISTDIR}/${P}-gcc-14.patch"
- # https://github.com/esheldon/fitsio/pull/390
- "${FILESDIR}/${P}-numpy-2.patch"
-)
-
-export FITSIO_USE_SYSTEM_FITSIO=1
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
- epytest
-}
diff --git a/dev-python/fitsio/fitsio-1.2.2.ebuild b/dev-python/fitsio/fitsio-1.2.4.ebuild
index c0c1388a3eba..816390c41e42 100644
--- a/dev-python/fitsio/fitsio-1.2.2.ebuild
+++ b/dev-python/fitsio/fitsio-1.2.4.ebuild
@@ -25,7 +25,7 @@ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
DEPEND="
>=dev-python/numpy-1.11:=[${PYTHON_USEDEP}]
- sci-libs/cfitsio:0=
+ >=sci-libs/cfitsio-4.4.0:0=
"
RDEPEND="
${DEPEND}