%global pypi_name couchbase Name: python-%{pypi_name} Version: 2.3.4 Release: 1%{?dist} Summary: Python client for Couchbase server License: ASL 2.0 URL: https://developer.couchbase.com/server/other-products/release-notes-archives/python-sdk Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz # http://review.couchbase.org/90525 Patch1: 0001-remove-executable-bits-and-shebangs-from-examples.patch # http://review.couchbase.org/90530 Patch2: 0002-docs-allow-to-build-docs-with-non-inlined-extension.patch # http://review.couchbase.org/90531 Patch3: 0003-docs-version-in-sphinx-config-must-be-a-string.patch # http://review.couchbase.org/90532 Patch4: 0004-docs-fix-sphinx-warnings.patch Patch5: 0005-do-not-install-tests-as-packages.patch BuildRequires: libcouchbase-devel BuildRequires: python2-devel BuildRequires: python2-testresources >= 0.2.7 BuildRequires: python2-pbr BuildRequires: python2-twisted BuildRequires: python2-gevent BuildRequires: python2-jsonschema BuildRequires: python2-configparser BuildRequires: python2-setuptools BuildRequires: python3-devel BuildRequires: python3-testresources >= 0.2.7 BuildRequires: python3-pbr BuildRequires: python3-twisted BuildRequires: python3-gevent BuildRequires: python3-jsonschema BuildRequires: python3-configparser BuildRequires: python3-setuptools BuildRequires: python3-sphinx BuildRequires: python3-numpydoc %description The Couchbase Python SDK allows Python applications to access a Couchbase cluster. The Python SDK offers a traditional synchronous API as well as integration with twisted, gevent, and asyncio. %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} The Couchbase Python SDK allows Python applications to access a Couchbase cluster. The Python SDK offers a traditional synchronous API as well as integration with twisted, gevent, and asyncio. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} The Couchbase Python SDK allows Python applications to access a Couchbase cluster. The Python SDK offers a traditional synchronous API as well as integration with twisted, gevent, and asyncio. %package -n python-%{pypi_name}-doc Summary: Documentation for Couchbase python client %description -n python-%{pypi_name}-doc Documentation for Couchbase python client. %prep %autosetup -n %{pypi_name}-%{version} -p1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build # generate html docs sphinx-build-3 docs/source html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install %py2_install %py3_install rm -rf %{python2_sitearch}/%{pypi_name}/tests rm -rf %{python3_sitearch}/%{pypi_name}/tests rm -rf %{python3_sitearch}/acouchbase/tests %files -n python2-%{pypi_name} %license LICENSE %doc README.rst %{python2_sitearch}/gcouchbase %{python2_sitearch}/%{pypi_name} %{python2_sitearch}/acouchbase %{python2_sitearch}/txcouchbase %{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitearch}/gcouchbase %{python3_sitearch}/%{pypi_name} %{python3_sitearch}/acouchbase %{python3_sitearch}/txcouchbase %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python-%{pypi_name}-doc %doc README.rst html examples %changelog * Mon Mar 5 2018 Sergey Avseyev - 2.3.4-1 - Initial package