%bcond_with doc %global obspy_programs dataless2resp dataless2xseed flinn-engdahl indexer mopad mseed-recordanalyzer plot print reftek-rescue runtests scan sds-report xseed2dataless %global srcname obspy Name: python-%{srcname} Version: 1.2.2 Release: 1%{?dist} Summary: A Python Toolbox for seismology/seismological observatories Group: Development/Libraries License: LGPLv3 URL: https://www.obspy.org/ Source0: https://github.com/obspy/obspy/archive/%{version}/%{name}-%{version}.tar.gz Patch0001: 0001-Fix-duplicate-page-number-in-citation.patch Patch0002: 0002-Update-make_citations-to-work-with-pybtex-0.22.patch Patch0003: 0001-Update-bundled-autosummary-to-match-Sphinx-2.patch # Revert a hack for legacy Python. Patch0004: revert-py2-print-change.patch BuildRequires: gcc # BuildRequires: libmseed-devel >= 2.19.4 %description ObsPy is an open-source project dedicated to provide a Python framework for processing seismological data. It provides parsers for common file formats, clients to access data centers and seismological signal processing routines which allow the manipulation of seismological time series (see Beyreuther et al. 2010, Megies et al. 2011). The goal of the ObsPy project is to facilitate rapid application development for seismology. %package -n python3-%{srcname} Summary: A Python Toolbox for seismology/seismological observatories Group: Development/Libraries %{?python_provide:%python_provide python3-obspy} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-future >= 0.12.4 BuildRequires: python3-numpy >= 1.6.1 BuildRequires: python3-mock BuildRequires: python3-scipy >= 0.9.0 BuildRequires: python3-lxml BuildRequires: python3-matplotlib BuildRequires: python3-basemap BuildRequires: python3-sqlalchemy BuildRequires: python3-decorator BuildRequires: python3-requests # Tests BuildRequires: python3-flake8 >= 2 BuildRequires: python3-pyproj BuildRequires: python3-pep8-naming BuildRequires: gdal-python3 BuildRequires: python3-nose # Documentation %if %{with doc} BuildRequires: help2man BuildRequires: python3-sphinx BuildRequires: python3-sphinx-bootstrap-theme BuildRequires: python3-pybtex %endif Requires: python3-future Requires: python3-numpy Requires: python3-scipy Requires: python3-lxml Requires: python3-matplotlib Requires: python3-basemap Requires: python3-sqlalchemy Requires: python3-decorator Requires: python3-requests # These two are for matplotlib only Requires: python3-mock Requires: python3-nose %global __provides_exclude_from ^%{python3_sitearch}/.*\\.so$ %description -n python3-%{srcname} ObsPy is an open-source project dedicated to provide a Python framework for processing seismological data. It provides parsers for common file formats, clients to access data centers and seismological signal processing routines which allow the manipulation of seismological time series (see Beyreuther et al. 2010, Megies et al. 2011). The goal of the ObsPy project is to facilitate rapid application development for seismology. %if %{with doc} %package doc Summary: A Python Toolbox for seismology/seismological observatories Group: Documentation %description doc Documentation for ObsPy. %endif %prep %setup -q -n %{srcname}-%{version} %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 rm obspy/scripts/_print.py %patch0004 -p1 echo %{version} > obspy/RELEASE-VERSION find -name '*.py' | xargs sed -i '1s|^#!python|#!%{python3}|' chmod -x \ obspy/taup/tests/data/TauP_test_data/gendata.sh \ obspy/io/mseed/src/libmseed/test/*.test \ obspy/io/seiscomp/tests/data/zero_poles_and_zeros.sc3ml %build %{py3_build} %if %{with doc} %{python3} setup.py build_man %endif %install %{py3_install} %if %{with doc} %{python3} setup.py install_man --skip-build --root %{buildroot} %endif pushd %{buildroot}%{_bindir} for prog in %{obspy_programs}; do mv obspy-${prog} obspy-${prog}-%{python3_version} ln -s obspy-${prog}-%{python3_version} obspy-${prog}-3 ln -s obspy-${prog}-3 obspy-${prog} done popd %if %{with doc} pushd %{buildroot}%{_mandir}/man1 for prog in %{obspy_programs}; do mv obspy-${prog}.1 obspy-${prog}-%{python3_version}.1 ln -s obspy-${prog}-%{python3_version}.1 obspy-${prog}-3.1 ln -s obspy-${prog}-3.1 obspy-${prog}.1 done popd pushd misc/docs PYTHONPATH="%{buildroot}%{python3_sitearch}" make html PYTHON="%{python3}" SPHINXBUILD=sphinx-build-%{python3_version} rm build/html/.buildinfo popd %endif %check PYTHONPATH="%{buildroot}%{python3_sitearch}" PATH="%{buildroot}%{_bindir}:$PATH" \ obspy-runtests-3 -d || exit 0 %if %{with doc} %files doc %doc misc/docs/build/html %endif %files -n python3-%{srcname} %doc README.md CHANGELOG.txt CONTRIBUTING.md %license LICENSE.txt %{_bindir}/%{srcname}-dataless2resp %{_bindir}/%{srcname}-dataless2xseed %{_bindir}/%{srcname}-flinn-engdahl %{_bindir}/%{srcname}-indexer %{_bindir}/%{srcname}-mopad %{_bindir}/%{srcname}-mseed-recordanalyzer %{_bindir}/%{srcname}-plot %{_bindir}/%{srcname}-print %{_bindir}/%{srcname}-reftek-rescue %{_bindir}/%{srcname}-runtests %{_bindir}/%{srcname}-scan %{_bindir}/%{srcname}-sds-report %{_bindir}/%{srcname}-xseed2dataless %{_bindir}/%{srcname}-dataless2resp-3 %{_bindir}/%{srcname}-dataless2xseed-3 %{_bindir}/%{srcname}-flinn-engdahl-3 %{_bindir}/%{srcname}-indexer-3 %{_bindir}/%{srcname}-mopad-3 %{_bindir}/%{srcname}-mseed-recordanalyzer-3 %{_bindir}/%{srcname}-plot-3 %{_bindir}/%{srcname}-print-3 %{_bindir}/%{srcname}-reftek-rescue-3 %{_bindir}/%{srcname}-runtests-3 %{_bindir}/%{srcname}-scan-3 %{_bindir}/%{srcname}-sds-report-3 %{_bindir}/%{srcname}-xseed2dataless-3 %{_bindir}/%{srcname}-dataless2resp-%{python3_version} %{_bindir}/%{srcname}-dataless2xseed-%{python3_version} %{_bindir}/%{srcname}-flinn-engdahl-%{python3_version} %{_bindir}/%{srcname}-indexer-%{python3_version} %{_bindir}/%{srcname}-mopad-%{python3_version} %{_bindir}/%{srcname}-mseed-recordanalyzer-%{python3_version} %{_bindir}/%{srcname}-plot-%{python3_version} %{_bindir}/%{srcname}-print-%{python3_version} %{_bindir}/%{srcname}-reftek-rescue-%{python3_version} %{_bindir}/%{srcname}-runtests-%{python3_version} %{_bindir}/%{srcname}-scan-%{python3_version} %{_bindir}/%{srcname}-sds-report-%{python3_version} %{_bindir}/%{srcname}-xseed2dataless-%{python3_version} %if %{with doc} %{_mandir}/man1/%{srcname}-dataless2resp.1* %{_mandir}/man1/%{srcname}-dataless2xseed.1* %{_mandir}/man1/%{srcname}-flinn-engdahl.1* %{_mandir}/man1/%{srcname}-indexer.1* %{_mandir}/man1/%{srcname}-mopad.1* %{_mandir}/man1/%{srcname}-mseed-recordanalyzer.1* %{_mandir}/man1/%{srcname}-plot.1* %{_mandir}/man1/%{srcname}-print.1* %{_mandir}/man1/%{srcname}-reftek-rescue.1* %{_mandir}/man1/%{srcname}-runtests.1* %{_mandir}/man1/%{srcname}-scan.1* %{_mandir}/man1/%{srcname}-sds-report.1* %{_mandir}/man1/%{srcname}-xseed2dataless.1* %{_mandir}/man1/%{srcname}-dataless2resp-3.1* %{_mandir}/man1/%{srcname}-dataless2xseed-3.1* %{_mandir}/man1/%{srcname}-flinn-engdahl-3.1* %{_mandir}/man1/%{srcname}-indexer-3.1* %{_mandir}/man1/%{srcname}-mopad-3.1* %{_mandir}/man1/%{srcname}-mseed-recordanalyzer-3.1* %{_mandir}/man1/%{srcname}-plot-3.1* %{_mandir}/man1/%{srcname}-print-3.1* %{_mandir}/man1/%{srcname}-reftek-rescue-3.1* %{_mandir}/man1/%{srcname}-runtests-3.1* %{_mandir}/man1/%{srcname}-scan-3.1* %{_mandir}/man1/%{srcname}-sds-report-3.1* %{_mandir}/man1/%{srcname}-xseed2dataless-3.1* %{_mandir}/man1/%{srcname}-dataless2resp-%{python3_version}.1* %{_mandir}/man1/%{srcname}-dataless2xseed-%{python3_version}.1* %{_mandir}/man1/%{srcname}-flinn-engdahl-%{python3_version}.1* %{_mandir}/man1/%{srcname}-indexer-%{python3_version}.1* %{_mandir}/man1/%{srcname}-mopad-%{python3_version}.1* %{_mandir}/man1/%{srcname}-mseed-recordanalyzer-%{python3_version}.1* %{_mandir}/man1/%{srcname}-plot-%{python3_version}.1* %{_mandir}/man1/%{srcname}-print-%{python3_version}.1* %{_mandir}/man1/%{srcname}-reftek-rescue-%{python3_version}.1* %{_mandir}/man1/%{srcname}-runtests-%{python3_version}.1* %{_mandir}/man1/%{srcname}-scan-%{python3_version}.1* %{_mandir}/man1/%{srcname}-sds-report-%{python3_version}.1* %{_mandir}/man1/%{srcname}-xseed2dataless-%{python3_version}.1* %endif %{python3_sitearch}/%{srcname}* %changelog * Mon Aug 10 2020 Elliott Sales de Andrade 1.2.2-1 - Update obspy to 1.2.2 - Fix unnecessary executable bits - Use bundled libmseed again - Remove extra broken comments * Fri May 03 2019 Elliott Sales de Andrade 1.1.1-5 - Workaround copr using a single srpm. * Fri May 03 2019 Elliott Sales de Andrade 1.1.1-4 - Don't patch autosummary on Fedora <30. * Fri May 03 2019 Elliott Sales de Andrade 1.1.1-3 - Fix build against Sphinx 2. - Fix documentation build with pybtex 0.22.0+. * Thu May 02 2019 Elliott Sales de Andrade 1.1.1-2 - Split apart Python 2 and 3 subpackages. - Fix files in Python 2 subpackage. - Remove now-unused patch. * Wed May 01 2019 Elliott Sales de Andrade 1.1.1-1 - Update to 1.1.1. - Switch to tag archive URL. * Wed May 01 2019 Elliott Sales de Andrade 1.1.0-4 - Setup python2 subpackages. (quantum.analyst@gmail.com) - Remove old conditions. (quantum.analyst@gmail.com) * Sun Dec 09 2018 Elliott Sales de Andrade 1.1.0-3 - Ignore test failures for now. * Sat Nov 17 2018 Elliott Sales de Andrade 1.1.0-2 - Backport patch to fix Sphinx 1.7. - Add explicit gcc BR. * Fri Oct 27 2017 Elliott Sales de Andrade 1.1.0-1 - Update to latest release. - Stop unbundling evalresp. * Fri Jul 14 2017 Elliott Sales de Andrade 1.0.3-2 - Patch in support for Matplotlib 2. * Fri Mar 3 2017 Elliott Sales de Andrade 1.0.3-1 - New upstream release * Wed Oct 19 2016 Elliott Sales de Andrade 1.0.2-3 - Fix compatibility with newer libmseed - Patch several mseed issues * Thu Sep 22 2016 Elliott Sales de Andrade 1.0.2-2 - Fix broken entry point * Wed Aug 3 2016 Elliott Sales de Andrade 1.0.2-1 - New upstream release * Sat Mar 26 2016 Elliott Sales de Andrade 1.0.1-2 - Remove gdal-python3 BR for Fedora 22, which doesn't support it - Fix build against NumPy 1.11 * Sat Mar 26 2016 Elliott Sales de Andrade 1.0.1-1 - New upstream release * Sun Feb 28 2016 Elliott Sales de Andrade 1.0.0-3 - Update future dependency to match official Fedora/EPEL naming * Sat Feb 20 2016 Elliott Sales de Andrade 1.0.0-2 - Build documentation on Python 2 again * Sat Feb 20 2016 Elliott Sales de Andrade 1.0.0-1 - New upstream release - Make Python 3 the default binary if available - Build documentation with Python 3 if available - Add python-mock and python-nose to requirements since matplotlib falsely needs it - Stop building documentation against mlpy - Remove suds-jurko dependency * Sat May 16 2015 Elliott Sales de Andrade 0.10.2-2 - Add BR on python-pybtex - Patch to build with NumPy 1.4 * Fri May 15 2015 Elliott Sales de Andrade 0.10.2-1 - New upstream release * Fri Mar 20 2015 Elliott Sales de Andrade 0.10.1-1 - New upstream release * Thu Mar 19 2015 Elliott Sales de Andrade 0.10.0-2 - Fix error in stored version * Thu Mar 19 2015 Elliott Sales de Andrade 0.10.0-1 - Initial RPM release