Blob Blame History Raw
%global srcname couchdb
%global sum A Python library for working with CouchDB
%global desc Providing a convenient high level interface for the CouchDB server.

Name:           python-%{srcname}
Version:        1.0
Release:        9%{?dist}
Summary:        %{sum}

Group:          Development/Languages
License:        BSD
URL:            https://github.com/djc/%{srcname}-python
Source0:        http://pypi.python.org/packages/source/C/CouchDB/CouchDB-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-setuptools
BuildRequires:  python2-devel, python3-devel
Obsoletes:      python-couchdb-devel <= 0.6.1

Patch0:         python-couchdb-0.9-shebang.patch

%description
%{desc}


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

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


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

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


%prep
%setup -q -n CouchDB-%{version}
%patch0 -p1


%build
%py2_build
%py3_build


%install
%py2_install
for i in couchdb-dump couchdb-load couchdb-replicate couchpy; do
    mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python2_version}
    pushd %{buildroot}%{_bindir}
    ln -s $i-%{python2_version} $i-2
    popd
done

%py3_install
for i in couchdb-dump couchdb-load couchdb-replicate couchpy; do
    mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
    pushd %{buildroot}%{_bindir}
    ln -s $i-%{python3_version} $i-3

    # the unversioned binary is Python2 one
    ln -s $i-%{python2_version} $i
    popd
done



%check
# tests are failing
#%%{__python2} setup.py test
#%%{__python3} setup.py test


%files -n python2-%{srcname}
%license COPYING
%doc README.rst ChangeLog.rst
%{_bindir}/couchdb-dump
%{_bindir}/couchdb-dump-2*
%{_bindir}/couchdb-load
%{_bindir}/couchdb-load-2*
%{_bindir}/couchdb-replicate
%{_bindir}/couchdb-replicate-2*
%{_bindir}/couchpy
%{_bindir}/couchpy-2*
%{python2_sitelib}/couchdb
%{python2_sitelib}/CouchDB*

%files -n python3-%{srcname}
%license COPYING
%doc README.rst ChangeLog.rst
%{_bindir}/couchdb-dump-3*
%{_bindir}/couchdb-load-3*
%{_bindir}/couchdb-replicate-3*
%{_bindir}/couchpy-3*
%{python3_sitelib}/couchdb
%{python3_sitelib}/CouchDB*


%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

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

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

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

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

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

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

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Sat Sep 26 2015 Tomas Hozza <thozza@gmail.com> - 1.0-1
- Update to 1.0
- Updated upstrean URL to point to GitHub
- Distribute also Python3 version of the package

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

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Oct 17 2013 Jonathan Steffan <jsteffan@fedoraproject.org> - 0.9-1
- Update to 0.9
- Remove couchdb requirement (RHBZ#622899)
- Remove -devel package

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Wed Dec 16 2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6.1-2
- Brown paper bag packaging fixes for the Fedora build system

* Tue Dec 15 2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6.1-1
- New upstream version

* Mon Dec 14 2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6-2
- Specfile cleanup based on review feedback

* Wed Nov 25 2009 Sebastian Dziallas <sebastian@when.com> - 0.6-1
- initial packaging