diff --git a/python-slip-0.6.5.tar.bz2 b/python-slip-0.6.5.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..7a647693925e1e2175599744d1f39159978df0ee Binary files /dev/null and b/python-slip-0.6.5.tar.bz2 differ diff --git a/python-slip.spec b/python-slip.spec new file mode 100644 index 0000000000000000000000000000000000000000..2dd5e5ff27adc5b825b95bf430417cdc058af66c --- /dev/null +++ b/python-slip.spec @@ -0,0 +1,89 @@ +%define anolis_release 1 +Name: python-slip +Version: 0.6.5 +Release: %{anolis_release}%{?dist} +Summary: Convenience, extension and workaround code for Python 2.x + +License: GPLv2+ +URL: https://github.com/nphilipp/python-slip +Source0: https://github.com/nphilipp/python-slip/releases/download/python-slip-%{version}/python-slip-%{version}.tar.bz2 + +BuildArch: noarch + +BuildRequires: make +BuildRequires: python3 +BuildRequires: python3-devel + +%global _description\ +The Simple Library for Python 2.x packages contain miscellaneous code for\ +convenience, extension and workaround purposes.\ +\ +This package provides the "slip" and the "slip.util" modules. + +%description %_description + +%package -n python3-slip +Summary: Convenience, extension and workaround code for Python 3.x +Requires: python3-libselinux + +%description -n python3-slip +The Simple Library for Python 3.x packages contain miscellaneous code for +convenience, extension and workaround purposes. + +This package provides the "slip" and the "slip.util" modules. + +%package -n python3-slip-dbus +Summary: Convenience functions for dbus services in Python 3.x +Requires: python3-slip = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: python3-dbus >= 0.80 +# Don't require any of pygobject2/3 because slip.dbus works with either one. In +# theory users of slip.dbus should require one or the other anyway to use the +# main loop. +# +# No hard requirement on polkit to allow minimal installs without polkit and +# its dependencies. +Conflicts: PolicyKit < 0.8-3 +Requires: python3-decorator +Requires: python3-six +%{?python_provide:%python_provide python3-slip-dbus} + +%description -n python3-slip-dbus +The Simple Library for Python 3.x packages contain miscellaneous code for +convenience, extension and workaround purposes. + +This package provides slip.dbus.service.Object, which is a dbus.service.Object +derivative that ends itself after a certain time without being used and/or if +there are no clients anymore on the message bus, as well as convenience +functions and decorators for integrating a dbus service with PolicyKit. + +%prep +%autosetup -p1 + +find . -name '*.py' -o -name '*.py.in' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' + + +%build + +make PYTHON=%{__python3} %{?_smp_mflags} + +%install + +make install PYTHON=%{__python3} DESTDIR=%buildroot + +%files -n python3-slip +%doc COPYING doc/dbus +%dir %{python3_sitelib}/slip/ +%{python3_sitelib}/slip/__pycache__ +%{python3_sitelib}/slip/__init__.py* +%{python3_sitelib}/slip/util +%{python3_sitelib}/slip/_wrappers +%{python3_sitelib}/slip-%{version}-py%{python3_version}.egg-info + +%files -n python3-slip-dbus +%doc doc/dbus/* +%{python3_sitelib}/slip/dbus +%{python3_sitelib}/slip.dbus-%{version}-py%{python3_version}.egg-info + +%changelog +* Thu Mar 10 2022 Liwei Ge - 0.6.5-1 +- Init version from upstream v0.6.5