Name: python-gitapi
Version: 1.1.0
Release: 0.a3%{?dist}.6
Summary: Pure-Python API to git, which uses the command-line interface
License: MIT
URL: https://bitbucket.org/haard/gitapi
Source0: https://pypi.python.org/packages/source/g/gitapi/gitapi-%{version}a2.tar.gz
# Ask upstream to include license in a separate file here:
# https://bitbucket.org/haard/gitapi/issue/3/include-the-license-in-a-separate-file
Source1: LICENSE
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools git
%global _description\
Pure-Python API to git, which uses the command-line interface.
%description %_description
%package -n python2-gitapi
Summary: %summary
Requires: git
%{?python_provide:%python_provide python2-gitapi}
%description -n python2-gitapi %_description
%package -n python3-gitapi
Summary: Pure-Python API to git, which uses the command-line interface
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: git
%description -n python3-gitapi
Pure-Python API to git, which uses the command-line interface.
%prep
%setup -q -n gitapi-%{version}a2
cp %{SOURCE1} .
# Remove egg
rm -r gitapi.egg-info
# Apply patches
sed -i 's/\r$//' gitapi/testgitapi.py
# Correct end of line encoding for README.rst
sed -i 's/\r$//' README.rst
# Prep python3
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
pushd %{py3dir}
%{__python3} setup.py build
popd
%{__python2} setup.py build
%install
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%files -n python2-gitapi
%doc README.rst LICENSE
%{python2_sitelib}/gitapi-%{version}a2-py%{python2_version}.egg-info
%{python2_sitelib}/gitapi/
%files -n python3-gitapi
%doc README.rst LICENSE
%{python3_sitelib}/gitapi-%{version}a2-py%{python3_version}.egg-info
%{python3_sitelib}/gitapi/
%changelog
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.0-0.a3.6
- Python 2 binary package renamed to python2-gitapi
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-0.a3.5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-0.a3.4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-0.a3.3
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-0.a3.2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-0.a3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Nov 5 2015 Julien Enselme <jujens@jujens.eu> - 1.1.0-0.a3
- Rebuilt for python 3.5
* Fri Jun 19 2015 Julien Enselme <jujens@jujens.eu> - 1.1.0-0.a2
- Update to 1.1.0a2
- Reformat BuildRequires
- Remove tests (cannot pass any more)
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Oct 27 2014 Julien Enselme <jujens@jujens.eu> - 1.0.1-1
- Update to 1.0.1
* Mon Oct 27 2014 Julien Enselme <jujens@jujens.eu> - 1.0.0-5
- Add license as source and not as patch.
- Use %%{version} tag in patch.
* Fri Aug 29 2014 Julien Enselme <jujens@jujens.eu> - 1.0.0-4
- Fix the wrong-file-end-of-line-encoding error in README.rst.
- Fix the summary-not-capitalized error.
- Add the license file.
* Thu Aug 14 2014 Julien Enselme <jujens@jujens.eu> - 1.0.0-3
- Don't duplicate the BR of gitapi.
- Remove egg-info from upstream.
* Thu Aug 14 2014 Julien Enselme <jujens@jujens.eu> - 1.0.0-2
- Add git as a BuildRequires. The git command is required to complete the tests.
- Add patch1 to configure author in the git repos to avoid the 'Please tell me who you are.' git error.
* Sun Aug 03 2014 Julien Enselme <jujens@jujens.eu> - 1.0.0-1
- Initial packaging.