From da8a8afb223fe7c8043a5fec0d7f32283917e3a2 Mon Sep 17 00:00:00 2001 From: Mikle Kolyada Date: Sat, 28 Dec 2019 19:41:32 +0300 Subject: [PATCH] dev-python/spectrial-cube: remove last-rited pkg Signed-off-by: Mikle Kolyada --- dev-python/spectral-cube/Manifest | 1 - .../spectral-cube-0.4.0-looseversion.patch | 139 ------------------ dev-python/spectral-cube/metadata.xml | 19 --- .../spectral-cube/spectral-cube-0.4.0.ebuild | 52 ------- 4 files changed, 211 deletions(-) delete mode 100644 dev-python/spectral-cube/Manifest delete mode 100644 dev-python/spectral-cube/files/spectral-cube-0.4.0-looseversion.patch delete mode 100644 dev-python/spectral-cube/metadata.xml delete mode 100644 dev-python/spectral-cube/spectral-cube-0.4.0.ebuild diff --git a/dev-python/spectral-cube/Manifest b/dev-python/spectral-cube/Manifest deleted file mode 100644 index c0717432bc00..000000000000 --- a/dev-python/spectral-cube/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST spectral-cube-0.4.0.tar.gz 290453 BLAKE2B 3e41ca0e6d925e36269c638aabc9e4df70ac8abf9ac2a59c4425435bbcb2d0b9b1ec1140e47828d597665a0164dc7c0b88d929762ca5c7bf72b5b16aa31f97d1 SHA512 20970d1be0d836bd07ea96ee909300f28eaf2ab4ded7b4525eb68399d242b864fe93120a16ef2ef35eba5f547c0cbe90b07c27ef44ab1910dbbe97230fbab84e diff --git a/dev-python/spectral-cube/files/spectral-cube-0.4.0-looseversion.patch b/dev-python/spectral-cube/files/spectral-cube-0.4.0-looseversion.patch deleted file mode 100644 index 42147de559a5..000000000000 --- a/dev-python/spectral-cube/files/spectral-cube-0.4.0-looseversion.patch +++ /dev/null @@ -1,139 +0,0 @@ -From: Ole Streicher -Date: Tue, 12 Jul 2016 08:54:59 +0200 -Subject: Use LooseVersion instead of StrictVersion. - -StrictVersion fails on numpy RCs. LooseVersion is a compromise until something better is available. ---- - spectral_cube/np_compat.py | 4 ++-- - spectral_cube/spectral_cube.py | 4 ++-- - spectral_cube/tests/test_masks.py | 4 ++-- - spectral_cube/tests/test_moments.py | 4 ++-- - spectral_cube/tests/test_spectral_cube.py | 10 +++++----- - 5 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/spectral_cube/np_compat.py b/spectral_cube/np_compat.py -index e72b4d9..dd9080a 100644 ---- a/spectral_cube/np_compat.py -+++ b/spectral_cube/np_compat.py -@@ -1,7 +1,7 @@ - from __future__ import print_function, absolute_import, division - - import numpy as np --from distutils.version import StrictVersion -+from distutils.version import LooseVersion - - def allbadtonan(function): - """ -@@ -11,7 +11,7 @@ def allbadtonan(function): - """ - def f(data, axis=None): - result = function(data, axis=axis) -- if StrictVersion(np.__version__) >= StrictVersion('1.9.0'): -+ if LooseVersion(np.__version__) >= LooseVersion('1.9.0'): - if axis is None: - if np.all(np.isnan(data)): - return np.nan -diff --git a/spectral_cube/spectral_cube.py b/spectral_cube/spectral_cube.py -index 231245d..fa61119 100644 ---- a/spectral_cube/spectral_cube.py -+++ b/spectral_cube/spectral_cube.py -@@ -34,7 +34,7 @@ from .lower_dimensional_structures import (Projection, Slice, OneDSpectrum, - LowerDimensionalObject) - from .base_class import BaseNDClass, SpectralAxisMixinClass, DOPPLER_CONVENTIONS - --from distutils.version import StrictVersion -+from distutils.version import LooseVersion - - __all__ = ['SpectralCube', 'VaryingResolutionSpectralCube'] - -@@ -2072,7 +2072,7 @@ class BaseSpectralCube(BaseNDClass, SpectralAxisMixinClass): - import yt - - if ('dev' in yt.__version__ or -- StrictVersion(yt.__version__) >= StrictVersion('3.0')): -+ LooseVersion(yt.__version__) >= LooseVersion('3.0')): - - from yt.frontends.fits.api import FITSDataset - from yt.units.unit_object import UnitParseError -diff --git a/spectral_cube/tests/test_masks.py b/spectral_cube/tests/test_masks.py -index 9116cb3..42a2125 100644 ---- a/spectral_cube/tests/test_masks.py -+++ b/spectral_cube/tests/test_masks.py -@@ -14,7 +14,7 @@ from .. import (BooleanArrayMask, SpectralCube, LazyMask, LazyComparisonMask, - FunctionMask, CompositeMask) - from ..masks import is_broadcastable_and_smaller, dims_to_skip, view_of_subset - --from distutils.version import StrictVersion -+from distutils.version import LooseVersion - - - def test_spectral_cube_mask(): -@@ -370,7 +370,7 @@ def test_flat_mask(): - assert np.all(cube.sum(axis=0)[mask_array] == mcube.sum(axis=0)[mask_array]) - assert np.all(np.isnan(mcube.sum(axis=0)[~mask_array])) - --@pytest.mark.skipif(StrictVersion(np.__version__) < StrictVersion('1.7'), -+@pytest.mark.skipif(LooseVersion(np.__version__) < LooseVersion('1.7'), - reason='Numpy <1.7 does not support multi-slice indexing.') - def test_flat_mask_spectral(): - cube, data = cube_and_raw('adv.fits') -diff --git a/spectral_cube/tests/test_moments.py b/spectral_cube/tests/test_moments.py -index 9b118fd..82eff40 100644 ---- a/spectral_cube/tests/test_moments.py -+++ b/spectral_cube/tests/test_moments.py -@@ -1,7 +1,7 @@ - from __future__ import print_function, absolute_import, division - - import warnings --from distutils.version import StrictVersion -+from distutils.version import LooseVersion - - import pytest - import numpy as np -@@ -78,7 +78,7 @@ axis_order = pytest.mark.parametrize(('axis', 'order'), - (1, 0), (1, 1), (1, 2), - (2, 0), (2, 1), (2, 2))) - --if StrictVersion(astropy.__version__[:3]) >= StrictVersion('1.0'): -+if LooseVersion(astropy.__version__[:3]) >= LooseVersion('1.0'): - # The relative error is slightly larger on astropy-dev - # There is no obvious reason for this. - rtol = 2e-7 -diff --git a/spectral_cube/tests/test_spectral_cube.py b/spectral_cube/tests/test_spectral_cube.py -index 025e6bd..4dce3bb 100644 ---- a/spectral_cube/tests/test_spectral_cube.py -+++ b/spectral_cube/tests/test_spectral_cube.py -@@ -4,7 +4,7 @@ import operator - import itertools - import warnings - import mmap --from distutils.version import StrictVersion, LooseVersion -+from distutils.version import LooseVersion, LooseVersion - - # needed to test for warnings later - warnings.simplefilter('always', UserWarning) -@@ -468,12 +468,12 @@ class TestNumpyMethods(BaseTest): - scmed = self.c.apply_numpy_function(np.median, axis=0) - # this checks whether numpy <=1.9.3 has a bug? - # as far as I can tell, np==1.9.3 no longer has this bug/feature -- #if StrictVersion(np.__version__) <= StrictVersion('1.9.3'): -+ #if LooseVersion(np.__version__) <= LooseVersion('1.9.3'): - # # print statements added so we get more info in the travis builds -- # print("Numpy version is: {0}".format(StrictVersion(np.__version__))) -+ # print("Numpy version is: {0}".format(LooseVersion(np.__version__))) - # assert np.count_nonzero(np.isnan(scmed)) == 5 - #else: -- # print("Numpy version is: {0}".format(StrictVersion(np.__version__))) -+ # print("Numpy version is: {0}".format(LooseVersion(np.__version__))) - assert np.count_nonzero(np.isnan(scmed)) == 6 - - scmed = self.c.apply_numpy_function(np.nanmedian, axis=0) -@@ -667,7 +667,7 @@ def test_read_write_rountrip(tmpdir): - assert cube.shape == cube.shape - assert_allclose(cube._data, cube2._data) - if (((hasattr(_wcs, '__version__') -- and StrictVersion(_wcs.__version__) < StrictVersion('5.9')) -+ and LooseVersion(_wcs.__version__) < LooseVersion('5.9')) - or not hasattr(_wcs, '__version__'))): - # see https://github.com/astropy/astropy/pull/3992 for reasons: - # we should upgrade this for 5.10 when the absolute accuracy is diff --git a/dev-python/spectral-cube/metadata.xml b/dev-python/spectral-cube/metadata.xml deleted file mode 100644 index 0cc45ca202a5..000000000000 --- a/dev-python/spectral-cube/metadata.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - sci-astronomy@gentoo.org - Gentoo Astronomy Project - - - The spectral-cube astronomy python module provides an easy way to - read, manipulate, analyze, and write data cubes with two - positional dimensions and one spectral dimension, optionally with - Stokes parameters. It aims to be a versatile data container for - building custom analysis routines. - - - spectral-cube - astropy/spectral-cube - - diff --git a/dev-python/spectral-cube/spectral-cube-0.4.0.ebuild b/dev-python/spectral-cube/spectral-cube-0.4.0.ebuild deleted file mode 100644 index b5ae97f1c121..000000000000 --- a/dev-python/spectral-cube/spectral-cube-0.4.0.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_{5,6} ) -inherit distutils-r1 - -DESCRIPTION="Manipulate astronomical data cubes with Python" -HOMEPAGE="https://spectral-cube.readthedocs.org/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" - -LICENSE="BSD" -SLOT="0" -IUSE="doc test" -RESTRICT="!test? ( test )" - -RDEPEND="dev-python/astropy[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND} - dev-python/astropy-helpers[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] - doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) - test? ( dev-python/pytest[${PYTHON_USEDEP}] )" - -PATCHES=( "${FILESDIR}"/${P}-looseversion.patch ) - -python_prepare_all() { - sed -i -e '/auto_use/s/True/False/' setup.cfg || die - distutils-r1_python_prepare_all -} - -python_compile_all() { - if use doc; then - python_setup - PYTHONPATH="${BUILD_DIR}"/lib \ - esetup.py build_sphinx --no-intersphinx - fi -} - -python_test() { - pushd spectral_cube/tests/data > /dev/null - "${PYTHON}" make_test_cubes.py - popd > /dev/null - esetup.py test -} - -python_install_all() { - use doc && local HTML_DOCS=( docs/_build/html/ ) - distutils-r1_python_install_all -} -- 2.26.2