diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..5725ec7 --- /dev/null +++ b/pre_checkin.sh @@ -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 diff --git a/python-pysendfile.changes b/python-pysendfile.changes index 7788013..0b12703 100644 --- a/python-pysendfile.changes +++ b/python-pysendfile.changes @@ -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 diff --git a/python-pysendfile.spec b/python-pysendfile.spec index efb0370..d28e99f 100644 --- a/python-pysendfile.spec +++ b/python-pysendfile.spec @@ -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} diff --git a/python3-pysendfile.changes b/python3-pysendfile.changes new file mode 100644 index 0000000..0b12703 --- /dev/null +++ b/python3-pysendfile.changes @@ -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 + diff --git a/python3-pysendfile.spec b/python3-pysendfile.spec new file mode 100644 index 0000000..61a3be3 --- /dev/null +++ b/python3-pysendfile.spec @@ -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