Blob Blame History Raw
Name:           python-hgapi
Version:        1.7.4
Release:        4%{?dist}
Summary:        Python API to Mercurial using the command-line interface

License:        MIT
URL:            https://bitbucket.org/haard/hgapi
Source0:        https://files.pythonhosted.org/packages/36/db/6ad72214343e361c3fae732230e64bb7a5e4580002027782a4406748aee6/hgapi-1.7.4.tar.gz
Source1:        LICENSE

BuildArch:      noarch
BuildRequires:  python2-devel python2-setuptools mercurial

%global _description\
hgapi is a pure-Python API to Mercurial, that uses the command-line interface\
instead of the internal Mercurial API. The rationale for this is twofold: the\
internal API is unstable, and it is GPL.\
\
hgapi works for all versions of Mercurial, and will instantly reflect any\
changes to the repository (including hgrc).

%description %_description

%package -n python2-hgapi
Summary: %summary
Requires:       mercurial
%{?python_provide:%python_provide python2-hgapi}

%description -n python2-hgapi %_description

%package -n     python3-hgapi
Summary:        Python 3 API to Mercurial using the command-line interface
BuildRequires:  python3-devel python3-setuptools
Requires:       mercurial
%{?python_provide:%python_provide python3-hgapi}

%description -n python3-hgapi
hgapi is a pure-Python API to Mercurial, that uses the command-line interface
instead of the internal Mercurial API. The rationale for this is twofold: the
internal API is unstable, and it is GPL.

hgapi works for all versions of Mercurial, and will instantly reflect any
changes to the repository (including hgrc).

%prep
%setup -q -n hgapi-%{version}
cp %{SOURCE1} .
# Remove egg
rm -r hgapi.egg-info
# Apply patch
sed -i 's/\r$//' hgapi/testhgapi.py
# Correct end of line encoding for README.rst
sed -i 's/\r$//' README.rst

rm -rf %{py3dir}
cp -a . %{py3dir}

%build
%py3_build
%py2_build


%install
%py3_install
%py2_install


%check
%{__python3} setup.py test || true
%{__python2} setup.py test || true


%files -n python2-hgapi
%doc README.rst LICENSE
%{python2_sitelib}/hgapi-%{version}-py%{python2_version}.egg-info
%{python2_sitelib}/hgapi/

%files -n python3-hgapi
%doc README.rst LICENSE
%{python3_sitelib}/hgapi-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/hgapi/

%changelog
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.7.4-4
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jan 25 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.7.4-2
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Mon Nov 06 2017 Julien Enselme <jujens@jujens.eu> - 1.7.4-1
- Update to 1.7.4
- Update spec file
- Disable tests (they are sloppy)

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.7.2-9
- Python 2 binary package renamed to python2-hgapi
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.7.2-6
- Rebuild for Python 3.6

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

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

* Thu Nov 5 2015 Julien Enselme <jujens@jujens.eu> - 1.7.2-3
- Rebuilt for python 3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu Aug 14 2014 Julien Enselme <jujens@jujens.eu> - 1.7.2-1
- Update to 1.7.2

* Thu Aug 14 2014 Julien Enselme <jujens@jujens.eu> - 1.7.1-3
- Remove egg-info from upstream.

* Thu Aug 14 2014 Julien Enselme <jujens@jujens.eu> - 1.7.1-2
- Add mercurial as a BuildRequires in order for the tests to succeed.

* Sun Aug 03 2014 Julien Enselme <jujens@jujens.eu> - 1.7.1-1
- Initial packaging