File python-sphinxtogithub.spec of Package python-sphinxtogithub
#
# spec file for package python-sphinxtogithub
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define modname sphinxtogithub
Name: python-%{modname}
Version: 1.1.0
Release: 0
Summary: Prepare the html output of the Sphinx documentation system for github pages
License: BSD-3-Clause
Group: Development/Libraries/Python
Url: https://pypi.python.org/pypi/sphinxtogithub
Source0: https://pypi.python.org/packages/source/s/sphinxtogithub/sphinxtogithub-%{version}.tar.gz
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%else
BuildArch: noarch
%endif
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A Python script for preparing the html output of the Sphinx
documentation system for github pages. It renames any top level
folders which start with an underscore and edits any references
to them within the html files.
%prep
%setup -q -n %{modname}-%{version}
sed -i -e 1d sphinxtogithub/sphinxtogithub.py
%build
python setup.py build
%install
python setup.py install --root %{buildroot} --prefix=%{_prefix}
%fdupes %{buildroot}%{python_sitelib}
# Do not package tests
rm -rf %{buildroot}%{python_sitelib}/tests
%files
%defattr(-,root,root)
%doc README.rst LICENCE
%{_bindir}/%{modname}
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}-py%{py_ver}.egg-info
%changelog