New upstream (1.0)
This commit is contained in:
parent
61d404e606
commit
2689ec26e7
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
|||||||
/astropy-0.4.2.tar.gz
|
/astropy-0.4.2.tar.gz
|
||||||
/astropy-0.4.3.tar.gz
|
/astropy-0.4.3.tar.gz
|
||||||
/astropy-0.4.4.tar.gz
|
/astropy-0.4.4.tar.gz
|
||||||
|
/astropy-1.0.tar.gz
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
diff -ur lib.linux-x86_64-3.3/astropy/io/misc/tests/test_hdf5.py lib.linux-x86_64-3.3fix/astropy/io/misc/tests/test_hdf5.py
|
|
||||||
--- lib.linux-x86_64-3.3/astropy/io/misc/tests/test_hdf5.py 2014-03-22 01:01:35.923603681 +0100
|
|
||||||
+++ lib.linux-x86_64-3.3fix/astropy/io/misc/tests/test_hdf5.py 2014-03-22 00:57:32.590614870 +0100
|
|
||||||
@@ -352,7 +352,7 @@
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif('not HAS_H5PY')
|
|
||||||
-def test_skip_meta(tmpdir):
|
|
||||||
+def no_test_skip_meta(tmpdir):
|
|
||||||
|
|
||||||
test_file = str(tmpdir.join('test.hdf5'))
|
|
||||||
|
|
||||||
diff -ur lib.linux-x86_64-3.3/astropy/tests/helper.py lib.linux-x86_64-3.3fix/astropy/tests/helper.py
|
|
||||||
--- lib.linux-x86_64-3.3/astropy/tests/helper.py 2014-03-22 00:02:26.000000000 +0100
|
|
||||||
+++ lib.linux-x86_64-3.3fix/astropy/tests/helper.py 2014-03-22 00:40:47.401385121 +0100
|
|
||||||
@@ -21,6 +21,7 @@
|
|
||||||
import shutil
|
|
||||||
import tempfile
|
|
||||||
import warnings
|
|
||||||
+import types
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Import pkg_resources to prevent it from issuing warnings upon being
|
|
||||||
@@ -492,15 +493,12 @@
|
|
||||||
assert len(w) > 0
|
|
||||||
"""
|
|
||||||
def __init__(self, *classes):
|
|
||||||
- for module in list(six.itervalues(sys.modules)):
|
|
||||||
- if hasattr(module, '__warningregistry__'):
|
|
||||||
- del module.__warningregistry__
|
|
||||||
super(catch_warnings, self).__init__(record=True)
|
|
||||||
self.classes = classes
|
|
||||||
|
|
||||||
def __enter__(self):
|
|
||||||
warning_list = super(catch_warnings, self).__enter__()
|
|
||||||
- warnings.resetwarnings()
|
|
||||||
+ treat_deprecations_as_exceptions()
|
|
||||||
if len(self.classes) == 0:
|
|
||||||
warnings.simplefilter('always')
|
|
||||||
else:
|
|
||||||
@@ -509,6 +507,8 @@
|
|
||||||
warnings.simplefilter('always', cls)
|
|
||||||
return warning_list
|
|
||||||
|
|
||||||
+ def __exit__(self, type, value, traceback):
|
|
||||||
+ treat_deprecations_as_exceptions()
|
|
||||||
|
|
||||||
def assert_follows_unicode_guidelines(
|
|
||||||
x, roundtrip=None):
|
|
||||||
@@ -570,3 +570,16 @@
|
|
||||||
assert x.__class__(bytes_x) == x
|
|
||||||
assert x.__class__(unicode_x) == x
|
|
||||||
assert eval(repr_x, roundtrip) == x
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def treat_deprecations_as_exceptions():
|
|
||||||
+ for module in list(six.itervalues(sys.modules)):
|
|
||||||
+ # We don't want to deal with six.MovedModules, only "real"
|
|
||||||
+ # modules.
|
|
||||||
+ if (isinstance(module, types.ModuleType) and
|
|
||||||
+ hasattr(module, '__warningregistry__')):
|
|
||||||
+ del module.__warningregistry__
|
|
||||||
+
|
|
||||||
+ warnings.resetwarnings()
|
|
||||||
+ warnings.simplefilter('ignore', DeprecationWarning)
|
|
@ -1,35 +0,0 @@
|
|||||||
diff -ur astropy-0.3.2/astropy/io/fits/hdu/base.py astropy-0.3.2.checksum/astropy/io/fits/hdu/base.py
|
|
||||||
--- astropy-0.3.2/astropy/io/fits/hdu/base.py 2014-05-19 15:50:15.540882206 +0200
|
|
||||||
+++ astropy-0.3.2.checksum/astropy/io/fits/hdu/base.py 2014-05-19 15:51:32.084487630 +0200
|
|
||||||
@@ -1581,8 +1581,8 @@
|
|
||||||
|
|
||||||
hi = sum32 >> u16
|
|
||||||
lo = sum32 & uFFFF
|
|
||||||
- hi += np.add.reduce(bytes[0::2])
|
|
||||||
- lo += np.add.reduce(bytes[1::2])
|
|
||||||
+ hi += np.add.reduce(bytes[0::2], dtype=np.uint64)
|
|
||||||
+ lo += np.add.reduce(bytes[1::2], dtype=np.uint64)
|
|
||||||
|
|
||||||
if (bytes.nbytes // 2) % 2:
|
|
||||||
lo += last << u8
|
|
||||||
diff -ur astropy-0.3.2/astropy/io/fits/tests/test_checksum.py astropy-0.3.2.checksum/astropy/io/fits/tests/test_checksum.py
|
|
||||||
--- astropy-0.3.2/astropy/io/fits/tests/test_checksum.py 2014-05-19 15:50:15.549882277 +0200
|
|
||||||
+++ astropy-0.3.2.checksum/astropy/io/fits/tests/test_checksum.py 2014-05-19 15:52:39.844024043 +0200
|
|
||||||
@@ -42,7 +42,7 @@
|
|
||||||
hdul.close()
|
|
||||||
|
|
||||||
def test_image_create(self):
|
|
||||||
- n = np.arange(100)
|
|
||||||
+ n = np.arange(100, dtype=np.int64)
|
|
||||||
hdu = fits.PrimaryHDU(n)
|
|
||||||
hdu.writeto(self.temp('tmp.fits'), clobber=True, checksum=True)
|
|
||||||
with fits.open(self.temp('tmp.fits'), checksum=True) as hdul:
|
|
||||||
@@ -57,7 +57,7 @@
|
|
||||||
assert hdul[0].header['DATASUM'] == '4950'
|
|
||||||
|
|
||||||
def test_nonstandard_checksum(self):
|
|
||||||
- hdu = fits.PrimaryHDU(np.arange(10.0 ** 6))
|
|
||||||
+ hdu = fits.PrimaryHDU(np.arange(10.0 ** 6, dtype=np.float64))
|
|
||||||
hdu.writeto(self.temp('tmp.fits'), clobber=True,
|
|
||||||
checksum='nonstandard')
|
|
||||||
del hdu
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -ur astropy-0.4.2/astropy/config/tests/test_configs.py astropy-0.4.2.conf/astropy/config/tests/test_configs.py
|
|
||||||
--- astropy-0.4.2/astropy/config/tests/test_configs.py 2014-12-05 00:03:10.533260470 +0100
|
|
||||||
+++ astropy-0.4.2.conf/astropy/config/tests/test_configs.py 2014-12-05 00:05:13.581269048 +0100
|
|
||||||
@@ -107,7 +107,7 @@
|
|
||||||
while apycfg.parent is not apycfg:
|
|
||||||
apycfg = apycfg.parent
|
|
||||||
f = tmpdir.join('astropy.cfg')
|
|
||||||
- with io.open(f.strpath, 'w', encoding='utf-8') as fd:
|
|
||||||
+ with io.open(f.strpath, 'wb') as fd:
|
|
||||||
apycfg.write(fd)
|
|
||||||
with io.open(f.strpath, 'rU', encoding='utf-8') as fd:
|
|
||||||
lns = [x.strip() for x in f.readlines()]
|
|
@ -1,121 +0,0 @@
|
|||||||
From f80125940eaa93ec0b2d0f579fcaaaff07698344 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Droettboom <mdboom@gmail.com>
|
|
||||||
Date: Mon, 24 Mar 2014 12:20:08 -0400
|
|
||||||
Subject: [PATCH] Override Install and InstallLib commands to also adjust the
|
|
||||||
library directory to be the platform-specific one. [#2223]
|
|
||||||
|
|
||||||
---
|
|
||||||
astropy/setup_helpers.py | 73 +++++++++++++++++++++++++++++++-----------------
|
|
||||||
1 file changed, 47 insertions(+), 26 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/astropy/setup_helpers.py b/astropy/setup_helpers.py
|
|
||||||
index 2cfadbd..536bc1e 100644
|
|
||||||
--- a/astropy/setup_helpers.py
|
|
||||||
+++ b/astropy/setup_helpers.py
|
|
||||||
@@ -28,6 +28,8 @@
|
|
||||||
from distutils.command.sdist import sdist as DistutilsSdist
|
|
||||||
from setuptools.command.build_ext import build_ext as SetuptoolsBuildExt
|
|
||||||
from setuptools.command.build_py import build_py as SetuptoolsBuildPy
|
|
||||||
+from setuptools.command.install import install as SetuptoolsInstall
|
|
||||||
+from setuptools.command.install_lib import install_lib as SetuptoolsInstallLib
|
|
||||||
|
|
||||||
from setuptools.command.register import register as SetuptoolsRegister
|
|
||||||
from setuptools import find_packages
|
|
||||||
@@ -362,19 +364,25 @@ def register_commands(package, version, release):
|
|
||||||
_registered_commands = {
|
|
||||||
'test': generate_test_command(package),
|
|
||||||
|
|
||||||
- # Use distutils' sdist because it respects package_data.
|
|
||||||
- # setuptools/distributes sdist requires duplication of information in
|
|
||||||
- # MANIFEST.in
|
|
||||||
- 'sdist': DistutilsSdist,
|
|
||||||
+ # Use distutils' sdist because it respects package_data.
|
|
||||||
+ # setuptools/distributes sdist requires duplication of information in
|
|
||||||
+ # MANIFEST.in
|
|
||||||
+ 'sdist': DistutilsSdist,
|
|
||||||
|
|
||||||
- # The exact form of the build_ext command depends on whether or not
|
|
||||||
- # we're building a release version
|
|
||||||
- 'build_ext': generate_build_ext_command(package, release),
|
|
||||||
+ # The exact form of the build_ext command depends on whether or not
|
|
||||||
+ # we're building a release version
|
|
||||||
+ 'build_ext': generate_build_ext_command(package, release),
|
|
||||||
|
|
||||||
- # We have a custom build_py to generate the default configuration file
|
|
||||||
- 'build_py': AstropyBuildPy,
|
|
||||||
+ # We have a custom build_py to generate the default configuration file
|
|
||||||
+ 'build_py': AstropyBuildPy,
|
|
||||||
|
|
||||||
- 'register': AstropyRegister
|
|
||||||
+ # Since install can (in some circumstances) be run without
|
|
||||||
+ # first building, we also need to override install and
|
|
||||||
+ # install_lib. See #2223
|
|
||||||
+ 'install': AstropyInstall,
|
|
||||||
+ 'install_lib': AstropyInstallLib,
|
|
||||||
+
|
|
||||||
+ 'register': AstropyRegister
|
|
||||||
}
|
|
||||||
|
|
||||||
try:
|
|
||||||
@@ -542,6 +550,29 @@ def run(self):
|
|
||||||
return type('build_ext', (basecls, object), attrs)
|
|
||||||
|
|
||||||
|
|
||||||
+def _get_platlib_dir(cmd):
|
|
||||||
+ plat_specifier = '.{0}-{1}'.format(cmd.plat_name, sys.version[0:3])
|
|
||||||
+ return os.path.join(cmd.build_base, 'lib' + plat_specifier)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+class AstropyInstall(SetuptoolsInstall):
|
|
||||||
+
|
|
||||||
+ def finalize_options(self):
|
|
||||||
+ build_cmd = self.get_finalized_command('build')
|
|
||||||
+ platlib_dir = _get_platlib_dir(build_cmd)
|
|
||||||
+ self.build_lib = platlib_dir
|
|
||||||
+ SetuptoolsInstall.finalize_options(self)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+class AstropyInstallLib(SetuptoolsInstallLib):
|
|
||||||
+
|
|
||||||
+ def finalize_options(self):
|
|
||||||
+ build_cmd = self.get_finalized_command('build')
|
|
||||||
+ platlib_dir = _get_platlib_dir(build_cmd)
|
|
||||||
+ self.build_dir = platlib_dir
|
|
||||||
+ SetuptoolsInstallLib.finalize_options(self)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
class AstropyBuildPy(SetuptoolsBuildPy):
|
|
||||||
|
|
||||||
def finalize_options(self):
|
|
||||||
@@ -550,22 +581,12 @@ def finalize_options(self):
|
|
||||||
# for projects with only pure-Python source (this is desirable
|
|
||||||
# specifically for support of multiple Python version).
|
|
||||||
build_cmd = self.get_finalized_command('build')
|
|
||||||
- plat_specifier = '.{0}-{1}'.format(build_cmd.plat_name,
|
|
||||||
- sys.version[0:3])
|
|
||||||
- # Do this unconditionally
|
|
||||||
- build_purelib = os.path.join(build_cmd.build_base,
|
|
||||||
- 'lib' + plat_specifier)
|
|
||||||
- build_cmd.build_purelib = build_purelib
|
|
||||||
- build_cmd.build_lib = build_purelib
|
|
||||||
-
|
|
||||||
- # Ugly hack: We also need to 'fix' the build_lib option on the
|
|
||||||
- # install command--it would be better just to override that command
|
|
||||||
- # entirely, but we can get around that extra effort by doing it here
|
|
||||||
- install_cmd = self.get_finalized_command('install')
|
|
||||||
- install_cmd.build_lib = build_purelib
|
|
||||||
- install_lib_cmd = self.get_finalized_command('install_lib')
|
|
||||||
- install_lib_cmd.build_dir = build_purelib
|
|
||||||
- self.build_lib = build_purelib
|
|
||||||
+ platlib_dir = _get_platlib_dir(build_cmd)
|
|
||||||
+
|
|
||||||
+ build_cmd.build_purelib = platlib_dir
|
|
||||||
+ build_cmd.build_lib = platlib_dir
|
|
||||||
+ self.build_lib = platlib_dir
|
|
||||||
+
|
|
||||||
SetuptoolsBuildPy.finalize_options(self)
|
|
||||||
|
|
||||||
def run_2to3(self, files, doctests=False):
|
|
||||||
--
|
|
||||||
1.8.5.5
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
diff -ur astropy-0.3.2/astropy/io/fits/tests/test_checksum.py astropy-0.3.2.skip2171.patch/astropy/io/fits/tests/test_checksum.py
|
|
||||||
--- astropy-0.3.2/astropy/io/fits/tests/test_checksum.py 2014-05-26 18:28:14.308460414 +0200
|
|
||||||
+++ astropy-0.3.2.skip2171.patch/astropy/io/fits/tests/test_checksum.py 2014-05-26 18:42:19.060391868 +0200
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
hdul.close()
|
|
||||||
|
|
||||||
def test_image_create(self):
|
|
||||||
+ pytest.skip("Skip in Fedora. (github isssue 2171)")
|
|
||||||
n = np.arange(100)
|
|
||||||
hdu = fits.PrimaryHDU(n)
|
|
||||||
hdu.writeto(self.temp('tmp.fits'), clobber=True, checksum=True)
|
|
||||||
@@ -57,6 +58,7 @@
|
|
||||||
assert hdul[0].header['DATASUM'] == '4950'
|
|
||||||
|
|
||||||
def test_nonstandard_checksum(self):
|
|
||||||
+ pytest.skip("Skip in Fedora. (github isssue 2171)")
|
|
||||||
hdu = fits.PrimaryHDU(np.arange(10.0 ** 6))
|
|
||||||
hdu.writeto(self.temp('tmp.fits'), clobber=True,
|
|
||||||
checksum='nonstandard')
|
|
@ -1,19 +0,0 @@
|
|||||||
diff -ur astropy-0.4.2/astropy/modeling/tests/test_models.py astropy-0.4.2.2516/astropy/modeling/tests/test_models.py
|
|
||||||
--- astropy-0.4.2/astropy/modeling/tests/test_models.py 2014-12-05 11:26:51.485613491 +0100
|
|
||||||
+++ astropy-0.4.2.2516/astropy/modeling/tests/test_models.py 2014-12-05 11:26:29.097428190 +0100
|
|
||||||
@@ -395,6 +395,7 @@
|
|
||||||
y = test_parameters['y_values']
|
|
||||||
utils.assert_allclose(model(x), y, atol=self.eval_error)
|
|
||||||
|
|
||||||
+ @pytest.mark.xfail(reason="xfail in Fedora. (github isssue #2516)")
|
|
||||||
@pytest.mark.skipif('not HAS_SCIPY')
|
|
||||||
def test_fitter1D(self, model_class, test_parameters):
|
|
||||||
"""
|
|
||||||
@@ -431,6 +431,7 @@
|
|
||||||
utils.assert_allclose(fitted, expected, atol=self.fit_error)
|
|
||||||
|
|
||||||
@pytest.mark.skipif('not HAS_SCIPY')
|
|
||||||
+ @pytest.mark.xfail(reason='xfail in Fedora, bug #2156')
|
|
||||||
def test_deriv_1D(self, model_class, test_parameters):
|
|
||||||
"""
|
|
||||||
Test the derivative of a model by comparing results with an estimated derivative
|
|
@ -1,27 +0,0 @@
|
|||||||
diff -ur astropy-0.4.2/astropy/table/tests/test_groups.py astropy-0.4.2.xxxx/astropy/table/tests/test_groups.py
|
|
||||||
--- astropy-0.4.2/astropy/table/tests/test_groups.py 2014-12-08 23:29:00.055308187 +0100
|
|
||||||
+++ astropy-0.4.2.xxxx/astropy/table/tests/test_groups.py 2014-12-08 23:28:05.222892528 +0100
|
|
||||||
@@ -245,6 +245,7 @@
|
|
||||||
assert np.all(t2.groups.keys['a'] == np.array([0, 2]))
|
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.xfail(reason="Skip in Fedora. (github isssue #3180)")
|
|
||||||
def test_grouped_item_access():
|
|
||||||
"""
|
|
||||||
Test that column slicing preserves grouping
|
|
||||||
@@ -398,6 +399,7 @@
|
|
||||||
assert 'grouped_by_table_cols' not in tg['c'].groups.keys.meta
|
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.xfail(reason="Skip in Fedora. (github isssue #3180)")
|
|
||||||
def test_table_aggregate():
|
|
||||||
"""
|
|
||||||
Aggregate a table
|
|
||||||
@@ -518,6 +520,7 @@
|
|
||||||
' 2']
|
|
||||||
|
|
||||||
|
|
||||||
+@pytest.mark.xfail(reason="Skip in Fedora. (github isssue #3180)")
|
|
||||||
def test_column_aggregate():
|
|
||||||
"""
|
|
||||||
Aggregate a single table column
|
|
@ -1,36 +0,0 @@
|
|||||||
diff -ur astropy-0.3.2/astropy/coordinates/angle_utilities.py astropy-0.3.2.ply/astropy/coordinates/angle_utilities.py
|
|
||||||
--- astropy-0.3.2/astropy/coordinates/angle_utilities.py 2014-05-22 11:59:59.700577989 +0200
|
|
||||||
+++ astropy-0.3.2.ply/astropy/coordinates/angle_utilities.py 2014-05-22 12:01:18.907194201 +0200
|
|
||||||
@@ -51,7 +51,7 @@
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def _make_parser(cls):
|
|
||||||
- from ..extern.ply import lex, yacc
|
|
||||||
+ from ply import lex, yacc
|
|
||||||
|
|
||||||
# List of token names.
|
|
||||||
tokens = (
|
|
||||||
diff -ur astropy-0.3.2/astropy/units/format/cds.py astropy-0.3.2.ply/astropy/units/format/cds.py
|
|
||||||
--- astropy-0.3.2/astropy/units/format/cds.py 2014-05-22 11:59:59.814578873 +0200
|
|
||||||
+++ astropy-0.3.2.ply/astropy/units/format/cds.py 2014-05-22 12:01:32.922303728 +0200
|
|
||||||
@@ -63,7 +63,7 @@
|
|
||||||
YACC grammar in the `unity library
|
|
||||||
<https://bitbucket.org/nxg/unity/>`_.
|
|
||||||
"""
|
|
||||||
- from ...extern.ply import lex, yacc
|
|
||||||
+ from ply import lex, yacc
|
|
||||||
|
|
||||||
tokens = (
|
|
||||||
'PRODUCT',
|
|
||||||
diff -ur astropy-0.3.2/astropy/units/format/generic.py astropy-0.3.2.ply/astropy/units/format/generic.py
|
|
||||||
--- astropy-0.3.2/astropy/units/format/generic.py 2014-05-22 11:59:59.817578896 +0200
|
|
||||||
+++ astropy-0.3.2.ply/astropy/units/format/generic.py 2014-05-22 12:01:48.698427183 +0200
|
|
||||||
@@ -48,7 +48,7 @@
|
|
||||||
formats, the only difference being the set of available unit
|
|
||||||
strings.
|
|
||||||
"""
|
|
||||||
- from ...extern.ply import lex, yacc
|
|
||||||
+ from ply import lex, yacc
|
|
||||||
|
|
||||||
tokens = (
|
|
||||||
'DOUBLE_STAR',
|
|
@ -1,12 +1,13 @@
|
|||||||
diff -ur astropy-0.4.1/astropy/tests/helper.py astropy-0.4.1.pytest/astropy/tests/helper.py
|
diff -ur astropy-1.0/astropy/tests/helper.py astropy-1.0.pytest/astropy/tests/helper.py
|
||||||
--- astropy-0.4.1/astropy/tests/helper.py 2014-09-01 23:06:03.280899166 +0200
|
--- astropy-1.0/astropy/tests/helper.py 2015-02-18 22:45:32.000000000 +0100
|
||||||
+++ astropy-0.4.1.pytest/astropy/tests/helper.py 2014-09-01 23:08:32.232105514 +0200
|
+++ astropy-1.0.pytest/astropy/tests/helper.py 2015-02-19 16:20:28.201778929 +0100
|
||||||
@@ -37,7 +37,8 @@
|
@@ -35,8 +35,8 @@
|
||||||
from ..utils.exceptions import AstropyWarning
|
AstropyDeprecationWarning,
|
||||||
|
AstropyPendingDeprecationWarning)
|
||||||
from ..config import configuration
|
from ..config import configuration
|
||||||
|
-
|
||||||
-if os.environ.get('ASTROPY_USE_SYSTEM_PYTEST') or '_pytest' in sys.modules:
|
-if os.environ.get('ASTROPY_USE_SYSTEM_PYTEST') or '_pytest' in sys.modules:
|
||||||
+# Use system pytest always, modified in the Fedora package
|
+# Modified by Fedora package
|
||||||
+if True or os.environ.get('ASTROPY_USE_SYSTEM_PYTEST') or '_pytest' in sys.modules:
|
+if True or os.environ.get('ASTROPY_USE_SYSTEM_PYTEST') or '_pytest' in sys.modules:
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
diff -ur astropy-0.3.2/astropy/wcs/setup_package.py astropy-0.3.2.wcslib/astropy/wcs/setup_package.py
|
|
||||||
--- astropy-0.3.2/astropy/wcs/setup_package.py 2014-05-21 11:19:24.260042437 +0200
|
|
||||||
+++ astropy-0.3.2.wcslib/astropy/wcs/setup_package.py 2014-05-21 11:20:53.103770423 +0200
|
|
||||||
@@ -309,10 +309,11 @@
|
|
||||||
'wcsmath.h',
|
|
||||||
'wcsprintf.h',
|
|
||||||
]
|
|
||||||
- for header in wcslib_headers:
|
|
||||||
- shutil.copy(join('cextern', 'wcslib', 'C', header),
|
|
||||||
+ if not setup_helpers.use_system_library('wcslib'):
|
|
||||||
+ for header in wcslib_headers:
|
|
||||||
+ shutil.copy(join('cextern', 'wcslib', 'C', header),
|
|
||||||
join('astropy', 'wcs', 'include', 'wcslib', header))
|
|
||||||
- api_files.append(join('include', 'wcslib', header))
|
|
||||||
+ api_files.append(join('include', 'wcslib', header))
|
|
||||||
|
|
||||||
return {
|
|
||||||
str('astropy.wcs.tests'): ['data/*.hdr', 'data/*.fits',
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -ur astropy-0.3/astropy/wcs/tests/data/validate.txt astropy-0.3.wcslib320/astropy/wcs/tests/data/validate.txt
|
|
||||||
--- astropy-0.3/astropy/wcs/tests/data/validate.txt 2013-11-21 01:59:14.000000000 +0100
|
|
||||||
+++ astropy-0.3.wcslib320/astropy/wcs/tests/data/validate.txt 2014-01-10 11:21:45.889992784 +0100
|
|
||||||
@@ -11,6 +11,6 @@
|
|
||||||
WCS key ' ':
|
|
||||||
- The WCS transformation has more axes (3) than the image it is
|
|
||||||
associated with (0)
|
|
||||||
- - 'celfix' made the change 'In CUNIT2 : Mismatched units type
|
|
||||||
+ - 'celfix' made the change 'In CUNIT3 : Mismatched units type
|
|
||||||
'length': have 'Hz', want 'm''.
|
|
||||||
- 'unitfix' made the change 'Changed units: 'HZ ' -> 'Hz''.
|
|
@ -1,24 +0,0 @@
|
|||||||
diff -ur astropy-0.3.2/astropy/wcs/tests/test_wcsprm.py astropy-0.3.2.wcslib.423/astropy/wcs/tests/test_wcsprm.py
|
|
||||||
--- astropy-0.3.2/astropy/wcs/tests/test_wcsprm.py 2014-05-26 11:14:27.023648667 +0200
|
|
||||||
+++ astropy-0.3.2.wcslib.423/astropy/wcs/tests/test_wcsprm.py 2014-05-26 11:13:49.630346134 +0200
|
|
||||||
@@ -639,7 +639,7 @@
|
|
||||||
|
|
||||||
def test_velangl():
|
|
||||||
w = _wcs.Wcsprm()
|
|
||||||
- assert w.velangl == 0.0
|
|
||||||
+ assert np.isnan(w.velangl)
|
|
||||||
w.velangl = 42.0
|
|
||||||
assert w.velangl == 42.0
|
|
||||||
del w.velangl
|
|
||||||
diff -ur astropy-0.3.2/astropy/wcs/tests/test_wcs.py astropy-0.3.2.wcslib.423/astropy/wcs/tests/test_wcs.py
|
|
||||||
--- astropy-0.3.2/astropy/wcs/tests/test_wcs.py 2014-05-26 11:14:27.021648651 +0200
|
|
||||||
+++ astropy-0.3.2.wcslib.423/astropy/wcs/tests/test_wcs.py 2014-05-26 11:14:41.149762955 +0200
|
|
||||||
@@ -453,7 +453,7 @@
|
|
||||||
|
|
||||||
def test_to_header_string():
|
|
||||||
header_string = """
|
|
||||||
- WCSAXES = 2 / Number of coordinate axes CRPIX1 = 0 / Pixel coordinate of reference point CRPIX2 = 0 / Pixel coordinate of reference point CDELT1 = 1 / Coordinate increment at reference point CDELT2 = 1 / Coordinate increment at reference point CRVAL1 = 0 / Coordinate value at reference point CRVAL2 = 0 / Coordinate value at reference point LATPOLE = 90 / [deg] Native latitude of celestial pole RESTFRQ = 0 / [Hz] Line rest frequency RESTWAV = 0 / [Hz] Line rest wavelength END"""
|
|
||||||
+ WCSAXES = 2 / Number of coordinate axes CRPIX1 = 0.0 / Pixel coordinate of reference point CRPIX2 = 0.0 / Pixel coordinate of reference point CDELT1 = 1.0 / Coordinate increment at reference point CDELT2 = 1.0 / Coordinate increment at reference point CRVAL1 = 0.0 / Coordinate value at reference point CRVAL2 = 0.0 / Coordinate value at reference point LATPOLE = 90.0 / [deg] Native latitude of celestial pole END"""
|
|
||||||
|
|
||||||
w = wcs.WCS()
|
|
||||||
assert w.to_header_string().strip() == header_string.strip()
|
|
@ -2,7 +2,7 @@
|
|||||||
%global upname astropy
|
%global upname astropy
|
||||||
|
|
||||||
Name: python-astropy
|
Name: python-astropy
|
||||||
Version: 0.4.4
|
Version: 1.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A Community Python Library for Astronomy
|
Summary: A Community Python Library for Astronomy
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -14,13 +14,6 @@ Source2: astropy-ply.py
|
|||||||
Patch0: python-astropy-system-configobj.patch
|
Patch0: python-astropy-system-configobj.patch
|
||||||
Patch1: python-astropy-system-pytest.patch
|
Patch1: python-astropy-system-pytest.patch
|
||||||
Patch2: python-astropy-system-six.patch
|
Patch2: python-astropy-system-six.patch
|
||||||
Patch3: python-astropy-configobj5.patch
|
|
||||||
# Disable problematic test (upstream 2516)
|
|
||||||
# https://github.com/astropy/astropy/issues/2516
|
|
||||||
Patch4: python-astropy-skiptest2516.patch
|
|
||||||
# Disable problematic test (upstream 3180)
|
|
||||||
# https://github.com/astropy/astropy/issues/3180
|
|
||||||
Patch5: python-astropy-skiptest3180.patch
|
|
||||||
|
|
||||||
BuildRequires: python2-devel python-setuptools numpy
|
BuildRequires: python2-devel python-setuptools numpy
|
||||||
BuildRequires: scipy h5py
|
BuildRequires: scipy h5py
|
||||||
@ -30,8 +23,10 @@ BuildRequires: python-matplotlib
|
|||||||
BuildRequires: python-configobj
|
BuildRequires: python-configobj
|
||||||
BuildRequires: expat-devel
|
BuildRequires: expat-devel
|
||||||
BuildRequires: cfitsio-devel
|
BuildRequires: cfitsio-devel
|
||||||
BuildRequires: wcslib-devel >= 4.23
|
BuildRequires: wcslib-devel >= 4.25
|
||||||
BuildRequires: erfa-devel
|
BuildRequires: erfa-devel
|
||||||
|
#
|
||||||
|
BuildRequires: texlive-ucs
|
||||||
|
|
||||||
Requires: numpy
|
Requires: numpy
|
||||||
Requires: python-configobj pytest python-six python-ply
|
Requires: python-configobj pytest python-six python-ply
|
||||||
@ -39,7 +34,7 @@ Requires: python-configobj pytest python-six python-ply
|
|||||||
Requires: scipy h5py
|
Requires: scipy h5py
|
||||||
Requires: /usr/bin/xmllint
|
Requires: /usr/bin/xmllint
|
||||||
|
|
||||||
Provides: bundled(jquery) = 1.10
|
Provides: bundled(jquery) = 1.11
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Astropy project is a common effort to develop a single core package
|
The Astropy project is a common effort to develop a single core package
|
||||||
@ -69,10 +64,12 @@ BuildRequires: python3-matplotlib
|
|||||||
BuildRequires: python3-configobj
|
BuildRequires: python3-configobj
|
||||||
#
|
#
|
||||||
BuildRequires: expat-devel
|
BuildRequires: expat-devel
|
||||||
BuildRequires: wcslib-devel >= 4.23
|
BuildRequires: wcslib-devel >= 4.25
|
||||||
BuildRequires: erfa-devel
|
BuildRequires: erfa-devel
|
||||||
BuildRequires: cfitsio-devel
|
BuildRequires: cfitsio-devel
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
#
|
||||||
|
BuildRequires: texlive-ucs
|
||||||
|
|
||||||
Requires: python3-numpy
|
Requires: python3-numpy
|
||||||
Requires: python3-configobj
|
Requires: python3-configobj
|
||||||
@ -83,7 +80,7 @@ Requires: python3-ply
|
|||||||
Requires: python3-scipy python3-h5py
|
Requires: python3-scipy python3-h5py
|
||||||
Requires: /usr/bin/xmllint
|
Requires: /usr/bin/xmllint
|
||||||
|
|
||||||
Provides: bundled(jquery) = 1.10
|
Provides: bundled(jquery) = 1.11
|
||||||
|
|
||||||
%description -n python3-%{upname}
|
%description -n python3-%{upname}
|
||||||
The Astropy project is a common effort to develop a single core package
|
The Astropy project is a common effort to develop a single core package
|
||||||
@ -107,7 +104,7 @@ This package contains the full API documentation for %{name}.
|
|||||||
%package -n %{upname}-tools
|
%package -n %{upname}-tools
|
||||||
Summary: Astropy utility tools
|
Summary: Astropy utility tools
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: python-%{upname} = %{version}-%{release}
|
Requires: python3-%{upname} = %{version}-%{release}
|
||||||
|
|
||||||
%description -n %{upname}-tools
|
%description -n %{upname}-tools
|
||||||
Utilities provided by Astropy: 'volint' for validating a Virtual Observatory
|
Utilities provided by Astropy: 'volint' for validating a Virtual Observatory
|
||||||
@ -117,6 +114,14 @@ files, 'wcslint' for validating the WCS keywords in a FITS file.
|
|||||||
%setup -qn %{upname}-%{version}
|
%setup -qn %{upname}-%{version}
|
||||||
cp %{SOURCE1} README.dist
|
cp %{SOURCE1} README.dist
|
||||||
rm -rf astropy*egg-info
|
rm -rf astropy*egg-info
|
||||||
|
# Use system configobj
|
||||||
|
%patch0 -p1
|
||||||
|
# Use system pytest
|
||||||
|
%patch1 -p1
|
||||||
|
# Use system six
|
||||||
|
%patch2 -p1
|
||||||
|
# Use system ply
|
||||||
|
cp %{SOURCE2} astropy/extern/ply.py
|
||||||
|
|
||||||
# Remove expat, erfa, cfitsio and wcslib
|
# Remove expat, erfa, cfitsio and wcslib
|
||||||
rm -rf cextern/expat
|
rm -rf cextern/expat
|
||||||
@ -124,36 +129,13 @@ rm -rf cextern/erfa
|
|||||||
rm -rf cextern/cfitsio
|
rm -rf cextern/cfitsio
|
||||||
rm -rf cextern/wcslib
|
rm -rf cextern/wcslib
|
||||||
|
|
||||||
# Unbundle configobj
|
|
||||||
rm -rf astropy/extern/configobj*
|
|
||||||
%patch0 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
|
|
||||||
# Unbundle pytest
|
|
||||||
rm -rf astropy/extern/pytest*
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
# Unbundle six
|
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
# Unbundle ply
|
|
||||||
rm -rf astropy/extern/ply*
|
|
||||||
cp %{SOURCE2} astropy/extern/ply.py
|
|
||||||
|
|
||||||
# Disable problematic test (upstream #2516)
|
|
||||||
%patch4 -p1
|
|
||||||
# Mark problematic test as xfail (upstream #3180)
|
|
||||||
%patch5 -p1
|
|
||||||
|
|
||||||
echo "[build]" >> setup.cfg
|
echo "[build]" >> setup.cfg
|
||||||
echo "use_system_libraries=1" >> setup.cfg
|
echo "use_system_libraries=1" >> setup.cfg
|
||||||
|
|
||||||
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
cp -a . %{py3dir}
|
cp -a . %{py3dir}
|
||||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
@ -165,13 +147,11 @@ rm -f docs/_build/html/.buildinfo
|
|||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
CFLAGS="%{optflags}" %{__python3} setup.py build --offline
|
CFLAGS="%{optflags}" %{__python3} setup.py build --offline
|
||||||
# Not working, python3-sphinx bug
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1014505
|
|
||||||
%{__python3} setup.py build_sphinx --offline
|
%{__python3} setup.py build_sphinx --offline
|
||||||
|
rm -f docs/_build/html/.buildinfo
|
||||||
popd
|
popd
|
||||||
# Copying the python2 docs for the moment
|
|
||||||
mkdir -p docs/_build3/
|
mkdir -p docs/_build3/
|
||||||
cp -r docs/_build/html docs/_build3/
|
cp -r %{py3dir}/docs/_build/html docs/_build3/
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -186,48 +166,45 @@ popd
|
|||||||
|
|
||||||
find %{buildroot} -name "*.so" | xargs chmod 755
|
find %{buildroot} -name "*.so" | xargs chmod 755
|
||||||
|
|
||||||
# install_scripts target seems to overwrite the shebang of the scripts
|
|
||||||
# it doesn't matter the the order of the installs
|
|
||||||
# fixing it here
|
|
||||||
for i in %{buildroot}/usr/bin/*; do
|
|
||||||
sed -i '1s|^#!%{__python3}|#!%{__python2}|' $i
|
|
||||||
done
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd %{buildroot}/%{python2_sitearch}
|
pushd %{buildroot}/%{python2_sitearch}
|
||||||
#py.test-%{python2_version} -k "not test_web_profile" astropy
|
py.test-%{python2_version} -k "not test_web_profile" astropy
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{buildroot}/%{python3_sitearch}
|
pushd %{buildroot}/%{python3_sitearch}
|
||||||
#py.test-%{python3_version} -k "not test_web_profile" astropy
|
py.test-%{python3_version} -k "not test_web_profile" astropy
|
||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.rst README.dist licenses/LICENSE.rst
|
%doc README.rst README.dist
|
||||||
|
%license licenses/LICENSE.rst
|
||||||
%{python2_sitearch}/*
|
%{python2_sitearch}/*
|
||||||
|
|
||||||
%files -n %{upname}-tools
|
%files -n %{upname}-tools
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
# These two are provided by pyfits
|
|
||||||
%exclude %{_bindir}/fitsdiff
|
|
||||||
%exclude %{_bindir}/fitscheck
|
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc README.rst README.dist licenses/LICENSE.rst docs/_build/html
|
%doc README.rst README.dist docs/_build/html
|
||||||
|
%license licenses/LICENSE.rst
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-%{upname}
|
%files -n python3-%{upname}
|
||||||
%doc README.rst licenses/LICENSE.rst README.dist
|
%doc README.rst README.dist
|
||||||
|
%license licenses/LICENSE.rst
|
||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/*
|
||||||
|
|
||||||
%files -n python3-%{upname}-doc
|
%files -n python3-%{upname}-doc
|
||||||
%doc README.rst README.dist licenses/LICENSE.rst docs/_build3/html
|
%doc README.rst README.dist docs/_build3/html
|
||||||
|
%license licenses/LICENSE.rst
|
||||||
|
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 19 2015 Sergio Pascual <sergiopr@fedoraproject.org> - 1.0-1
|
||||||
|
- New upstream (1.0)
|
||||||
|
|
||||||
* Thu Jan 22 2015 Sergio Pascual <sergiopr@fedoraproject.org> - 0.4.4-1
|
* Thu Jan 22 2015 Sergio Pascual <sergiopr@fedoraproject.org> - 0.4.4-1
|
||||||
- New upstream (0.4.4)
|
- New upstream (0.4.4)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user