SPECS/python-sphinx/python-sphinx.spec
2d879f6b
 %{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
b2bb0264
 %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
 
7b5e2aec
 Summary:       Python documentation generator
 Name:          python-sphinx
bfd9864f
 Version:       1.5.3
2d879f6b
 Release:       4%{?dist}
7b5e2aec
 Group:         Development/Tools
 License:       BSD-2-Clause
 URL:           http://www.vmware.com
b2bb0264
 Vendor:        VMware, Inc.
 Distribution:  Photon
bfd9864f
 Source0:       https://pypi.python.org/packages/a7/df/4487783152b14f2b7cd0b0c9afb119b262c584bf972b90ab544b61b74c62/Sphinx-%{version}.tar.gz
 %define sha1 Sphinx=e296be1f697ba5eda7941570d718544df8182648
7b5e2aec
 BuildRequires: python2
 BuildRequires: python2-libs
 BuildRequires: python2-devel
 BuildRequires: python-setuptools
b2bb0264
 BuildRequires: python-babel
 BuildRequires: python-docutils
 BuildRequires: python-jinja2
 BuildRequires: python-Pygments
 BuildRequires: python-six
 BuildRequires: python-alabaster
 BuildRequires: python-imagesize
 BuildRequires: python-requests
 BuildRequires: python-snowballstemmer
 BuildRequires: python-typing
 BuildRequires: python-pytest
 BuildRequires: python-pip
7b5e2aec
 
b2bb0264
 Requires:      python2
 Requires:      python2-libs
 Requires:      python-babel
 Requires:      python-docutils
 Requires:      python-jinja2
 Requires:      python-Pygments
 Requires:      python-six
 Requires:      python-alabaster
 Requires:      python-imagesize
 Requires:      python-requests
 Requires:      python-snowballstemmer
 Requires:      python-typing
7b5e2aec
 
421d1f6b
 BuildArch:      noarch
 
7b5e2aec
 %description
 Sphinx is a tool that makes it easy to create intelligent and
 beautiful documentation for Python projects (or other documents
 consisting of multiple reStructuredText sources), written by Georg
 Brandl. It was originally created to translate the new Python
 documentation, but has now been cleaned up in the hope that it will be
 useful to many other projects.
 
b2bb0264
 %package -n    python3-sphinx
 Summary:       Python documentation generator
 BuildRequires: python3
 BuildRequires: python3-devel
 BuildRequires: python3-babel
 BuildRequires: python3-docutils
 BuildRequires: python3-jinja2
 BuildRequires: python3-Pygments
 BuildRequires: python3-six
 BuildRequires: python3-alabaster
 BuildRequires: python3-imagesize
 BuildRequires: python3-requests
 BuildRequires: python3-snowballstemmer
 BuildRequires: python3-pytest
 
 Requires:      python3
 Requires:      python3-libs
 Requires:      python3-babel
 Requires:      python3-docutils
 Requires:      python3-jinja2
 Requires:      python3-Pygments
 Requires:      python3-six
 Requires:      python3-alabaster
 Requires:      python3-imagesize
 Requires:      python3-requests
 Requires:      python3-snowballstemmer
 
 %description -n python3-sphinx
 
 Python 3 version.
 
7b5e2aec
 %prep
 %setup -q -n Sphinx-%{version}
b2bb0264
 rm -rf ../p3dir
 cp -a . ../p3dir
7b5e2aec
 
 %build
2d879f6b
 python2 setup.py build
b2bb0264
 pushd ../p3dir
 python3 setup.py build
 popd
7b5e2aec
 
 %install
b2bb0264
 pushd ../p3dir
 python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
2d879f6b
 mv %{buildroot}/%{_bindir}/sphinx-quickstart %{buildroot}/%{_bindir}/sphinx-quickstart3
 mv %{buildroot}/%{_bindir}/sphinx-build %{buildroot}/%{_bindir}/sphinx-build3
 mv %{buildroot}/%{_bindir}/sphinx-autogen %{buildroot}/%{_bindir}/sphinx-autogen3
 mv %{buildroot}/%{_bindir}/sphinx-apidoc %{buildroot}/%{_bindir}/sphinx-apidoc3
b2bb0264
 popd
2d879f6b
 python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
b2bb0264
 
 %check
 make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
 
 %clean
7b5e2aec
 
 %files
 %defattr(-,root,root)
2d879f6b
 %{_bindir}/sphinx-quickstart
 %{_bindir}/sphinx-build
 %{_bindir}/sphinx-autogen
 %{_bindir}/sphinx-apidoc
 %{python2_sitelib}/*
7b5e2aec
 
b2bb0264
 %files -n python3-sphinx
 %defattr(-,root,root)
2d879f6b
 %{_bindir}/sphinx-quickstart3
 %{_bindir}/sphinx-build3
 %{_bindir}/sphinx-autogen3
 %{_bindir}/sphinx-apidoc3
b2bb0264
 %{python3_sitelib}/*
 
7b5e2aec
 %changelog
2d879f6b
 *   Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.5.3-4
 -   Keep the original python2 scripts and rename the python3 scripts
b2bb0264
 *   Wed Apr 26 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.5.3-3
 -   BuildRequires and Requires python-babel, python-docutils, python-jinja2,
     python-Pygments, python-six, python-alabaster, python-imagesize,
     python-requests and python-snowballstemmer. Adding python3 version
421d1f6b
 *   Tue Apr 25 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.5.3-2
 -   Fix arch
bfd9864f
 *   Thu Mar 30 2017 Sarah Choi <sarahc@vmware.com> 1.5.3-1
 -   Upgrade version to 1.5.3
7b5e2aec
 *   Fri Dec 16 2016 Dheeraj Shetty <dheerajs@vmware.com> 1.5.1-1
 -   Initial