From 6f05f770eed80e4787a6b44968a19cc162cd8dbc3a36b14117ed723b630e13c9 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Thu, 31 Aug 2017 10:42:54 +0000 Subject: [PATCH] Accepting request 519802 from devel:languages:python:singlespec-staging - singlespec auto-conversion - update to 0.9.6: * fixes for sysctl compatibility issues - update to version 0.9.5: * no changelog available - point the source URL to pypi - remove unwanted shebang in pyinotify.py - Avoid using github source link to please factory-auto - Initial python3 support - Update to 0.9.4 version - Cleanup spec file - spec file boiler plate update (by the system, or someone) - add pyinotify wrapper - fix license in spec file - updated to 0.9.1 - cleanup spec file - update to 0.9.0 - update to 0.7.1 - create package (version 0.6.2) OBS-URL: https://build.opensuse.org/request/show/519802 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyinotify?expand=0&rev=26 --- python-pyinotify.changes | 6 ++++++ python-pyinotify.spec | 39 ++++++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/python-pyinotify.changes b/python-pyinotify.changes index 10aad76..2d67a24 100644 --- a/python-pyinotify.changes +++ b/python-pyinotify.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 24 13:50:56 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Mon Jan 4 14:35:03 UTC 2016 - dmueller@suse.com @@ -60,3 +65,4 @@ Fri Sep 15 11:42:54 CEST 2006 - poeml@suse.de - create package (version 0.6.2) + diff --git a/python-pyinotify.spec b/python-pyinotify.spec index 9fecec5..2a413da 100644 --- a/python-pyinotify.spec +++ b/python-pyinotify.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyinotify # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyinotify Version: 0.9.6 Release: 0 @@ -23,15 +24,15 @@ Summary: Python module for watching filesystems changes License: MIT Group: Development/Libraries/Python Url: http://github.com/seb-m/pyinotify -Source: https://pypi.python.org/packages/source/p/pyinotify/pyinotify-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/p/pyinotify/pyinotify-%{version}.tar.gz Source1: pyinotify -BuildRequires: python-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros BuildArch: noarch -%endif +Requires(post): update-alternatives +Requires(postun): update-alternatives +%python_subpackages %description pyinotify is a Python module for watching filesystems changes. By its design @@ -53,18 +54,30 @@ notifications. %setup -q -n pyinotify-%{version} # remove unwanted shebang sed -i '/^#!/ d' python2/pyinotify.py +sed -i "s|#!/usr/bin/env python|#!%__python2|" python2/examples/*py +sed -i "s|#!/usr/bin/env python|#!%__python3|" python3/examples/*py %build -python setup.py build +%python_build %install -python ./setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/pyinotify +%python_clone -a %{buildroot}%{_bindir}/pyinotify -%files +%post +%python_install_alternative pyinotify + +%postun +%python_uninstall_alternative pyinotify + +%files %{python_files} %defattr(-,root,root) -%doc ACKS COPYING README.md python2/examples -%{_bindir}/pyinotify +%doc ACKS COPYING README.md +%doc old/ChangeLog old/NEWS +%python2_only %doc python2/examples +%python3_only %doc python3/examples +%python_alternative %{_bindir}/pyinotify %{python_sitelib}/* %changelog