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}/*