14
0

Accepting request 156321 from devel:languages:python

Python3 support
Remove macros usage (forwarded request 156306 from posophe)

OBS-URL: https://build.opensuse.org/request/show/156321
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pysendfile?expand=0&rev=3
This commit is contained in:
Stephan Kulow
2013-02-25 19:41:57 +00:00
committed by Git OBS Bridge
5 changed files with 79 additions and 4 deletions

4
pre_checkin.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
sed 's,^\(Name: *\)python-,\1python3-,;s,^\(Requires: *\)python-,\1python3-,;s,^\(BuildRequires: *\)python-,\1python3-,;s,python setup.py,python3 setup.py,;s,python_sitelib,python3_sitelib,;s,python_sitearch,python3_sitearch,' python-pysendfile.spec > python3-pysendfile.spec
cp python-pysendfile.changes python3-pysendfile.changes

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jan 21 15:50:12 UTC 2013 - p.drouand@gmail.com
- Add python3 support
-------------------------------------------------------------------
Thu Nov 8 11:35:29 UTC 2012 - saschpe@suse.de

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pysendfile
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -14,6 +14,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
%define mod_name pysendfile
Name: python-pysendfile
Version: 2.0.0
@@ -22,7 +23,7 @@ License: MIT
Summary: A Python interface to sendfile(2)
Url: http://code.google.com/p/pysendfile/
Group: Development/Languages/Python
Source: http://pysendfile.googlecode.com/files/pysendfile-%{version}.tar.gz
Source: http://pysendfile.googlecode.com/files/%{mod_name}-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-nose
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -34,10 +35,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
A python interface to sendfile(2) system call.
%prep
%setup -q -n pysendfile-%{version}
%setup -q -n %{mod_name}-%{version}
%build
CFLAGS="%{optflags}" python setup.py build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

View File

@@ -0,0 +1,10 @@
-------------------------------------------------------------------
Mon Jan 21 15:50:12 UTC 2013 - p.drouand@gmail.com
- Add python3 support
-------------------------------------------------------------------
Thu Nov 8 11:35:29 UTC 2012 - saschpe@suse.de
- Initial version

55
python3-pysendfile.spec Normal file
View File

@@ -0,0 +1,55 @@
#
# spec file for package python-pysendfile
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
%define mod_name pysendfile
Name: python3-pysendfile
Version: 2.0.0
Release: 0
License: MIT
Summary: A Python interface to sendfile(2)
Url: http://code.google.com/p/pysendfile/
Group: Development/Languages/Python
Source: http://pysendfile.googlecode.com/files/%{mod_name}-%{version}.tar.gz
BuildRequires: python3-devel
BuildRequires: python3-nose
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python3_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
%description
A python interface to sendfile(2) system call.
%prep
%setup -q -n %{mod_name}-%{version}
%build
python3 setup.py build
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
#TODO: Absolute import, fix later
#nosetests
%files
%defattr(-,root,root,-)
%doc LICENSE README
%{python3_sitearch}/*
%changelog