From 3a81bb29c2725406746dc0c058dc650850e9c7e8459935d10472069a9fa672f4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 14 Aug 2017 07:58:26 +0000 Subject: [PATCH] Accepting request 516198 from home:tbechtold:branches:devel:languages:python - convert to singlespec OBS-URL: https://build.opensuse.org/request/show/516198 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysendfile?expand=0&rev=12 --- python-pysendfile.changes | 5 +++++ python-pysendfile.spec | 25 +++++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/python-pysendfile.changes b/python-pysendfile.changes index ff87053..9821c5d 100644 --- a/python-pysendfile.changes +++ b/python-pysendfile.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 11 16:33:20 UTC 2017 - tbechtold@suse.com + +- convert to singlespec + ------------------------------------------------------------------- Thu Oct 2 18:40:28 UTC 2014 - p.drouand@gmail.com diff --git a/python-pysendfile.spec b/python-pysendfile.spec index df5df5c..1a0ed0e 100644 --- a/python-pysendfile.spec +++ b/python-pysendfile.spec @@ -1,7 +1,7 @@ # # spec file for package python-pysendfile # -# Copyright (c) 2014 SUSE LINUX Products 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-%{**}} %define mod_name pysendfile Name: python-pysendfile @@ -25,13 +26,12 @@ Summary: A Python interface to sendfile(2) License: MIT Group: Development/Languages/Python Url: http://code.google.com/p/pysendfile/ -Source: https://pypi.python.org/packages/source/p/pysendfile/pysendfile-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-nose +Source: https://files.pythonhosted.org/packages/source/p/pysendfile/pysendfile-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: python-rpm-macros 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 + +%python_subpackages %description A python interface to sendfile(2) system call. @@ -40,16 +40,13 @@ A python interface to sendfile(2) system call. %setup -q -n %{mod_name}-%{version} %build -python setup.py build +export CFLAGS="%{optflags}" +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -%check -#TODO: Absolute import, fix later -#nosetests - -%files +%files %{python_files} %defattr(-,root,root,-) %doc LICENSE README.rst %{python_sitearch}/*