[Bug 1562643] Review Request: python3-slixmpp - Slixmpp is an XMPP library for Python 3.4+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1562643



--- Comment #2 from Robert-André Mauchin <zebob.m@xxxxxxxxx> ---
 - The name of the package should be python-slixmpp with a python3 subpackage

 - Not needed:

# package is Python 3.4+ compatible only
%global __python %{__python3}

 - Not needed, it's already defined

# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?__python2: %global __python2 %__python}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

 - Considering you do not provide a Python 2 package, this is not useful:

%if 0%{?fedora}
%bcond_without python3
%else
%bcond_with python3
%endif

 - There's no need to duplicate the source code like you do here:

mv %{srcname}-slix-%{version} python2
# Apply patches
pushd python2
%patch0 -p0
popd

%if %{with python3}
cp -a python2 python3
%endif # with python3

 - Use the provided macros:

CFLAGS="%{optflags}" %{__python3} setup.py build ⇒ %py3_build

%{__python3} setup.py install -O1 --skip-build --root %{buildroot} ⇒
%py3_install

 - No need for rm -rf %{buildroot}

 - Not needed

# Install html docs
mkdir -p %{buildroot}%{_pkgdocdir}/
cp -pr python3/docs/_build/html %{buildroot}%{_pkgdocdir}/

Just install them with %doc

 - Add "examples" to %doc



Here's my take on your SPEC:



%global srcname slixmpp

Name:           python-slixmpp
Version:        1.3.0
Release:        1%{?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:  python3-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.


%prep
%autosetup -p0 -n %{srcname}-slix-%{version}


%build
%py3_build

# Build sphinx documentation
pushd docs/
make html
rm -rf _build/html/.{doctrees,buildinfo}
popd


%install
%py3_install

# Fix non-standard modes (775)
chmod 0755 %{buildroot}%{python3_sitearch}/%{srcname}/stringprep.cpython-*.so


%check
%{__python3} run_tests.py


%files -n python3-%{srcname}
%license LICENSE
%doc CONTRIBUTING.rst README.rst docs/_build/html examples
%{python3_sitearch}/%{srcname}-%{version}-py3.6.egg-info/
%{python3_sitearch}/%{srcname}/


%changelog
* Sun Apr  1 2018 Matthieu Saulnier <fantom@xxxxxxxxxxxxxxxxx> - 1.3.0-1
- Initial package

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux