Blob Blame History Raw
%if 0%{?fedora}
%global with_python3 1
%else
%global with_python3 0
%endif

%global srcname inifile
%global sum A small INI library for Python

Name:			python-inifile
Version:		0.3
Release:		6%{?dist}
Summary:		%{sum}

License:		BSD
URL:			https://github.com/mitsuhiko/python-%{srcname}
Source0:		https://pypi.python.org/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz
Source1:		LICENSE

BuildArch:		noarch
BuildRequires:	python2-devel
BuildRequires:	python-setuptools
%if 0%{?with_python3}
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
%endif

%description
%{sum}

%package -n python2-%{srcname}
Summary:		%{sum}
%{?python_provide:%python_provide python2-%{srcname}}

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

%if 0%{?with_python3}
%package -n python3-%{srcname}
Summary:		%{sum}
%{?python_provide:%python_provide python3-%{srcname}}

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

%endif

%prep
%autosetup -n %{srcname}-%{version}
cp -a %{SOURCE1} .


%build

%py2_build

%if 0%{?with_python3}
%py3_build	
%endif


%install
%py2_install

%if 0%{?with_python3}
%py3_install
%endif

%files -n python2-%{srcname}
%license LICENSE
%{python2_sitelib}/%{srcname}-%{version}-*.egg-info
%{python2_sitelib}/%{srcname}.py*

%if 0%{?with_python3}
%files -n python3-%{srcname}
%license LICENSE
%{python3_sitelib}/%{srcname}-%{version}-*.egg-info
%{python3_sitelib}/%{srcname}.py
%{python3_sitelib}/__pycache__/%{srcname}.*.py*
%endif

%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.3-5
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jan 20 2016 Stratakis Charalampos <cstratak@redhat.com> - 0.3-2
- Minor spec file improvements

* Mon Jan 18 2016 Stratakis Charalampos <cstratak@redhat.com> - 0.3-1
- Initial RPM release