From cb523e2d3299b3d71b5ea68b75e793b81c1aa539c10502a69bdebd8b9379f290 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 31 Jan 2012 13:36:18 +0000 Subject: [PATCH] - Simplified macro usage - Don't package PKG-INFO or MANIFEST, this is setuptools bloat - Removed outdated %clean section >>>>>>> ./python-Levenshtein.changes.r2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Levenshtein?expand=0&rev=4 --- python-Levenshtein.changes | 8 ++++++++ python-Levenshtein.spec | 26 +++++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/python-Levenshtein.changes b/python-Levenshtein.changes index e4938a4..43760c0 100644 --- a/python-Levenshtein.changes +++ b/python-Levenshtein.changes @@ -1,9 +1,17 @@ +------------------------------------------------------------------- +Tue Jan 31 11:12:07 UTC 2012 - saschpe@suse.de + +- Simplified macro usage +- Don't package PKG-INFO or MANIFEST, this is setuptools bloat +- Removed outdated %clean section + ------------------------------------------------------------------- Tue Jan 31 11:43:49 UTC 2012 - elchevive@opensuse.org - change from python-setuptools to python-distribute ------------------------------------------------------------------- +>>>>>>> ./python-Levenshtein.changes.r2 Thu Jan 26 17:16:00 UTC 2012 - elchevive@opensuse.org - spec cleaning, remove --record-from-files diff --git a/python-Levenshtein.spec b/python-Levenshtein.spec index d4333a4..0eb6898 100644 --- a/python-Levenshtein.spec +++ b/python-Levenshtein.spec @@ -2,25 +2,27 @@ # spec file for package python-Levenshtein # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# # This file and all modifications and additions to this # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -%define mod_name Levenshtein -Name: python-%{mod_name} +Name: python-Levenshtein Version: 0.10.2 Release: 0 License: GPL-2.0+ Summary: Python extension computing string distances and similarities Url: http://github.com/miohtama/python-Levenshtein Group: Development/Libraries/Python -Source0: python-%{mod_name}-%{version}.tar.bz2 +Source0: python-Levenshtein-%{version}.tar.bz2 BuildRequires: python-devel BuildRequires: python-distribute -Requires: python-base >= %{py_ver} BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%endif %description The Levenshtein Python C extension module contains functions for fast @@ -34,23 +36,17 @@ computation of It supports both normal and Unicode strings. %prep -%setup -q -n "python-%{mod_name}-%{version}" +%setup -q %build -python ./setup.py build +python setup.py build %install -python ./setup.py install \ - --prefix="%{_prefix}" \ - --root=%{buildroot} \ - -%clean -[ -d %{buildroot} -a %{buildroot} != "" ] && rm -rf %{buildroot} +python setup.py install --prefix="%{_prefix}" --root=%{buildroot} %files %defattr(-,root,root) -%doc COPYING HISTORY.txt PKG-INFO README.rst MANIFEST NEWS -%python_sitearch/%{mod_name}.so -%python_sitearch/python_%{mod_name}-%{version}-py%{py_ver}.egg-info +%doc COPYING HISTORY.txt README.rst NEWS +%{python_sitearch}/* %changelog