Blame python-xnat.spec

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