Blob Blame Raw
%global srcname pyvo
%global commit 70090d64ecac4eab210c5d5537ea4498231d0186 
%global commit_date 20161005
%global shortcommit %(c=%{commit};echo ${c:0:7})
%global gitrel .%{commit_date}git%{shortcommit}

%global sum Access to remote data and services of the Virtual observatory (VO) using Python
%global desc                                                             \
PyVO is a package providing access to remote data and services of the    \
Virtual Observatory (VO) using Python.                                   \
                                                                         \
The pyvo module currently provides these main capabilities:              \
* Find archives that provide particular data of a particular type and/or \
  relates to a particular topic                                          \
* Search an archive for datasets of a particular type                    \
* Do simple searches on catalogs or databases                            \
* Get information about an object via its name                   


Name:           python-%{srcname}
Version:        0.0
Release:        0.1%{gitrel}%{?dist}
Summary:        %{sum}

License:        BSD
URL:            https://pypi.python.org/pypi/%{srcname}
Source0:        https://github.com/pyvirtobs/%{srcname}/archive/%{commit}.tar.gz#/%{srcname}-%{commit}.tar.gz
Patch0:         python-pyvo-removes-python-scripts.patch
Patch1:         python-pyvo-use_system_astropy_helpers.patch

BuildArch:      noarch
BuildRequires:  python2-astropy
BuildRequires:  python2-astropy-helpers
BuildRequires:  python2-dateutil
BuildRequires:  python2-devel

BuildRequires:  python3-astropy
BuildRequires:  python3-astropy-helpers
BuildRequires:  python3-dateutil
BuildRequires:  python3-devel

%description
%{desc}

%package -n python2-%{srcname}
Summary:        %{sum}
Requires:       astropy-tools
Requires:       python2-astropy
Requires:       python2-dateutil
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
%{desc}

%package -n python3-%{srcname}
Summary:        %{sum}
Requires:       astropy-tools
Requires:       python3-astropy
Requires:       python3-dateutil
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
%{desc}

%prep
%setup -q -n %{srcname}-%{commit}
%patch0 -p1
%patch1 -p1

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%files -n python2-%{srcname}
%license licenses/LICENSE.rst
%doc CHANGES.rst CONTRIBUTORS.rst README.rst
%{python2_sitelib}/*

%files -n python3-%{srcname}
%license licenses/LICENSE.rst
%doc CHANGES.rst CONTRIBUTORS.rst README.rst
%{python3_sitelib}/*

%changelog
* Sun Oct  5 2016 Christian Dersch <lupinix@mailbox.org> - 0.0-0.1.2016100570090d6
- Initial package