[packages/python-pyxmpp2] - initial; test suite doesn't work correctly so disabled; using github tarball because official tarb
arekm
arekm at pld-linux.org
Fri Feb 1 11:53:44 CET 2019
commit 8455c69071f8058a379546e0035faec7ea83037f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Feb 1 11:53:21 2019 +0100
- initial; test suite doesn't work correctly so disabled; using github tarball because official tarball is incomplete (missing some doc/ files)
python-pyxmpp2.spec | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
---
diff --git a/python-pyxmpp2.spec b/python-pyxmpp2.spec
new file mode 100644
index 0000000..84760bc
--- /dev/null
+++ b/python-pyxmpp2.spec
@@ -0,0 +1,139 @@
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%bcond_with tests # unit tests
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define module pyxmpp2
+%define egg_name pyxmpp2
+%define pypi_name pyxmpp2
+Summary: XMPP implementation for Python
+Name: python-%{pypi_name}
+Version: 2.0.1
+Release: 1
+License: LGPL v2.1+
+Group: Libraries/Python
+#Source0: https://github.com/Jajcus/pyxmpp2/releases/download/2.0.1/pyxmpp2-2.0.1.tar.gz
+Source0: https://github.com/Jajcus/pyxmpp2/archive/%{version}.tar.gz
+# Source0-md5: add2c546f4473385c7222b623175e6ba
+URL: https://github.com/Jajcus/pyxmpp2
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires: python-modules
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-pyasn1
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pyasn1
+%endif
+%endif
+Requires: python-dns >= 1.16.0
+Requires: python-modules
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+XMPP implementation for Python.
+
+%package -n python3-%{pypi_name}
+Summary: XMPP implementation for Python
+Group: Libraries/Python
+Requires: python3-dns >= 1.16.0
+Requires: python3-modules
+
+%description -n python3-%{pypi_name}
+XMPP implementation for Python.
+
+%package apidocs
+Summary: API documentation for Python %{module} module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
+Group: Documentation
+
+%description apidocs
+API documentation for Python %{module} module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona %{module}.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%if %{with doc}
+cd doc
+%{__make}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+# when files are installed in other way that standard 'setup.py
+# they need to be (re-)compiled
+# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+# in case there are examples provided
+%if %{with python2}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
+cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
+find $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version} -name '*.py' \
+ | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
+%endif
+%if %{with python3}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
+cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
+find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -name '*.py' \
+ | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.rst TODO
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{_examplesdir}/python-%{pypi_name}-%{version}
+%endif
+
+%if %{with python3}
+%files -n python3-%{pypi_name}
+%defattr(644,root,root,755)
+%doc README.rst TODO
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{_examplesdir}/python3-%{pypi_name}-%{version}
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/www/api/*
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pyxmpp2.git/commitdiff/8455c69071f8058a379546e0035faec7ea83037f
More information about the pld-cvs-commit
mailing list