Blob Blame History Raw
%global pypi_name sphinxcontrib-actdiag

%if 0%{?fedora}
%global with_python3 1
%endif

%global common_desc sphinxcontribactdiag A sphinx extension for embedding \
activity diagram using actdiag. This extension enables you to insert activity \
diagrams into your document.


Name:           python-%{pypi_name}
Version:        0.8.5
Release:        1%{?dist}
Summary:        Sphinx "actdiag" extension

License:        BSD
URL:            http://github.com/blockdiag/sphinxcontrib-actdiag
Source0:        https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch


%description
%{common_desc}

%package -n     python2-%{pypi_name}
Summary:        Sphinx "actdiag" extension
%{?python_provide:%python_provide python2-%{pypi_name}}

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
Requires:       python-blockdiag >= 1.5.0
Requires:       python-actdiag >= 0.5.3
Requires:       python-sphinx >= 0.6

%description -n python2-%{pypi_name}
%{common_desc}

%if 0%{?with_python3}
%package -n     python3-%{pypi_name}
Summary:        Sphinx "actdiag" extension
%{?python_provide:%python_provide python3-%{pypi_name}}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
Requires:       python3-blockdiag >= 1.5.0
Requires:       python3-actdiag >= 0.5.3
Requires:       python3-sphinx >= 0.6

%description -n python3-%{pypi_name}
%{common_desc}
%endif


%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif

%install
%if 0%{?with_python3}
%py3_install
%endif

%py2_install


%files -n python2-%{pypi_name}
%license LICENSE
%doc README.rst
%{python2_sitelib}/sphinxcontrib_actdiag*nspkg.pth
%{python2_sitelib}/sphinxcontrib
%{python2_sitelib}/sphinxcontrib_actdiag-%{version}-py?.?.egg-info

%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/sphinxcontrib_actdiag*nspkg.pth
%{python3_sitelib}/sphinxcontrib
%{python3_sitelib}/sphinxcontrib_actdiag-%{version}-py?.?.egg-info
%endif

%changelog
* Tue Aug 29 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 0.8.5-1
- Initial package.