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