b798300
%if 0%{?fedora} >= 30
b798300
# disabled by default
b798300
%bcond_with py2
b798300
%else
b798300
%bcond_without py2
b798300
%endif
b798300
b798300
# disabled to begin with
b798300
%bcond_with tests
b798300
b798300
%global pypi_name xnat
5856ec2
b798300
%global desc %{expand: \
b798300
A new XNAT client that exposes XNAT objects/functions as python objects/functions.
b798300
The aim is to abstract as much of the REST API away as possible and make xnatpy feel
b798300
like native Python code. This reduces the need for the user to know the details
b798300
of the REST API. Low level functionality can still be accessed via the connection object
b798300
which has get, head, put, post, delete methods for more directly calling the REST API.}
b798300
b798300
Name:           python-%{pypi_name}
444289b
Version:        0.3.17
444289b
Release:        1%{?dist}
b798300
Summary:        A new XNAT client that exposes XNAT objects/functions as python objects/functions.
b798300
License:        ASL 2.0
b798300
URL:            http://pypi.python.org/pypi/%{pypi_name}/%{version}
b798300
Source0:        https://pypi.python.org/packages/source/x/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
b798300
BuildArch:      noarch
b798300
b798300
%description
b798300
%{desc}
b798300
b798300
%if %{with py2}
b798300
%package -n python2-%{pypi_name}
b798300
Summary:        %{summary}
b798300
5856ec2
BuildRequires: python2-devel
5856ec2
BuildRequires: python2-setuptools
5856ec2
BuildRequires: python2-isodate
5856ec2
BuildRequires: python2-requests
5856ec2
#BuildRequires: python2-progressbar2
5856ec2
BuildRequires: python2-sphinx_rtd_theme
5856ec2
BuildRequires: python2-six
b798300
b798300
%{?python_provide:%python_provide python2-%{pypi_name}}
b798300
b798300
%description -n python2-%{pypi_name}
b798300
%{desc}
b798300
%endif
b798300
b798300
%package -n python3-%{pypi_name}
b798300
Summary:        %{summary}
b798300
5856ec2
BuildRequires: python3-devel
5856ec2
BuildRequires: python3-setuptools
5856ec2
BuildRequires: python3-isodate
5856ec2
BuildRequires: python3-requests
5856ec2
#BuildRequires: python3-progressbar2
5856ec2
BuildRequires: python3-sphinx_rtd_theme
5856ec2
BuildRequires: python3-six
5856ec2
BuildRequires: python3-utils
b798300
b798300
%{?python_provide:%python_provide python3-%{pypi_name}}
b798300
b798300
%description -n python3-%{pypi_name}
b798300
%{desc}
b798300
b798300
%prep
b798300
%autosetup -n %{pypi_name}-%{version}
b798300
rm -rf %{pypi_name}.egg-info
b798300
b798300
%build
b798300
%py3_build
b798300
%if %{with py2}
b798300
%py2_build
b798300
%endif
b798300
b798300
%install
b798300
%if %{with py2}
b798300
%py2_install
b798300
%endif
b798300
%py3_install
b798300
b798300
%check
b798300
%if %{with tests}
b798300
%if %{with py2}
b798300
%{__python2} setup.py test
b798300
%endif
b798300
%{__python3} setup.py test
b798300
%endif
b798300
 
b798300
%if %{with py2}
b798300
%files -n python2-%{pypi_name}
b798300
%license LICENSE
444289b
%doc README.rst
b798300
%{_bindir}/xnat_cp_project
b798300
%{python2_sitelib}/%{pypi_name}-%{version}-py2.?.egg-info
b798300
%{python2_sitelib}/%{pypi_name}
b798300
%endif
b798300
b798300
%files -n python3-%{pypi_name}
b798300
%license LICENSE
444289b
%doc README.rst
b798300
%{_bindir}/xnat_cp_project
b798300
%{python3_sitelib}/xnat/
b798300
%{python3_sitelib}/xnat*.egg-info
b798300
b798300
%changelog
444289b
* Mon Apr 08 2019 Luis Bazan <lbazan@fedoraproject.org> - 0.3.17-1
444289b
- New upstream version
444289b
5856ec2
* Thu Nov 29 2018 Luis Bazan <lbazan@fedoraproject.org> - 0.3.11-2
5856ec2
- Add Buildrequires
5856ec2
b798300
* Mon Nov 19 2018 Luis Bazan <lbazan@fedoraproject.org> - 0.3.11-1
b798300
- New upstream