# set upstream name variable %global srcname slixmpp Name: python-slixmpp Version: 1.3.0 Release: 2%{?dist} Summary: Slixmpp is an XMPP library for Python 3.4+ License: MIT URL: https://github.com/poezio/%{srcname} Source0: https://github.com/poezio/%{srcname}/archive/slix-%{version}/%{name}-%{version}.tar.gz Patch0: patch-remove-aiodns-dependancy.patch BuildRequires: python3-devel BuildRequires: python3-Cython BuildRequires: libidn-devel # for docs BuildRequires: python2-sphinx # for tests BuildRequires: gnupg Requires: python3-pyasn1-modules %description Slixmpp is an MIT licensed XMPP library for Python 3.4+. It is a fork of SleekXMPP. Goals is to only rewrite the core of the library (the low level socket handling, the timers, the events dispatching) in order to remove all threads. %package -n python3-%{srcname} Summary: Slixmpp is an XMPP library for Python 3.4+ %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} Slixmpp is an MIT licensed XMPP library for Python 3.4+. It is a fork of SleekXMPP. Goals is to only rewrite the core of the library (the low level socket handling, the timers, the events dispatching) in order to remove all threads. %package -n python-%{srcname}-doc Summary: Documentation for Slixmpp BuildArch: noarch Requires: python3-%{srcname} %description -n python-%{srcname}-doc Slixmpp is an MIT licensed XMPP library for Python 3.4+. It is a fork of SleekXMPP. Goals is to only rewrite the core of the library (the low level socket handling, the timers, the events dispatching) in order to remove all threads. This package contains documentation in reST and HTML formats. %prep %autosetup -p0 -n %{srcname}-slix-%{version} %build %py3_build # Build sphinx documentation pushd docs/ make html popd # docs %install %py3_install # Install html docs mkdir -p %{buildroot}%{_pkgdocdir}/ cp -pr docs/_build/html %{buildroot}%{_pkgdocdir}/ # Move sources mv -f %{buildroot}%{_pkgdocdir}/html/_sources/ %{buildroot}%{_pkgdocdir}/rst/ # Remove buildinfo sphinx documentation rm -rf %{buildroot}%{_pkgdocdir}/html/.buildinfo # Fix non-standard modes (775) chmod 755 %{buildroot}%{python3_sitearch}/%{srcname}/stringprep.cpython-*.so %check %{__python3} run_tests.py %files -n python3-%{srcname} %license LICENSE %doc CONTRIBUTING.rst README.rst # For arch-specific packages: sitearch %{python3_sitearch}/%{srcname}-%{version}-*.egg-info/ %{python3_sitearch}/%{srcname}/ %files -n python-%{srcname}-doc %doc examples %{_pkgdocdir}/html/ %{_pkgdocdir}/rst/ %changelog * Mon Apr 2 2018 Matthieu Saulnier - 1.3.0-2 - Rename main package to python-slixmpp - Cleanup specfile - Replace build and install commands with %%py3_build and %%py3_install - Split in python3 subpackage - Split in doc subpackage * Sun Apr 1 2018 Matthieu Saulnier - 1.3.0-1 - Initial package