python-sphinxcontrib-websup.../python-sphinxcontrib-websupport.spec
Alexander Stefanov c478b2a4cf new pkg
2020-02-10 19:19:50 +00:00

59 lines
1.5 KiB
RPMSpec

%global pypi_name sphinxcontrib-websupport
%bcond_with tests
Name: python-sphinxcontrib-websupport
Version: 1.1.2
Release: %mkrel 2
Group: Development/Python
Summary: Sphinx API for Web Apps
License: BSD
URL: https://pypi.python.org/pypi/sphinxcontrib-websupport
Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: pkgconfig(python3)
BuildRequires: python3-mock
%if %{with tests}
BuildRequires: python3-pytest
%endif
BuildRequires: python3-setuptools
%description
sphinxcontrib-webuspport provides a Python API to easily integrate Sphinx
documentation into your Web application.
%package -n python3-%{pypi_name}
Summary: Sphinx API for Web Apps
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
sphinxcontrib-webuspport provides a Python API to easily integrate Sphinx
documentation into your Web application.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
%install
%py3_install
#we don't want these
rm -rf %{buildroot}/%{python3_sitelib}/*-nspkg.pth
%if %{with tests}
%check
PYTHONPATH=. py.test tests/
%endif
%files -n python3-%{pypi_name}
%doc README.rst
%{python3_sitelib}/sphinxcontrib/
%{python3_sitelib}/sphinxcontrib_websupport-%{version}-py%{python3_version}.egg-info
#%%{python3_sitelib}/sphinxcontrib_websupport-%%{version}-py%%{python3_version}-nspkg.pth