[python-paver] Fix paver's use of os.path.samefile

Toshio くらとみ toshio at fedoraproject.org
Thu Jan 10 20:01:20 UTC 2013


commit 46dd968ff30a159c285e4f8dfc4fde8abd48ea8e
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Thu Jan 10 12:01:00 2013 -0800

    Fix paver's use of os.path.samefile

 paver-samefile-fix.patch |   13 +++++++++++++
 python-paver.spec        |   11 ++++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/paver-samefile-fix.patch b/paver-samefile-fix.patch
new file mode 100644
index 0000000..8ae4f9e
--- /dev/null
+++ b/paver-samefile-fix.patch
@@ -0,0 +1,13 @@
+Index: Paver-1.1.1/paver/path.py
+===================================================================
+--- Paver-1.1.1.orig/paver/path.py
++++ Paver-1.1.1/paver/path.py
+@@ -837,7 +837,7 @@ class path(_base):
+     def ismount(self): return os.path.ismount(self)
+ 
+     if hasattr(os.path, 'samefile'):
+-        def samefile(self): return os.path.samefile(self)
++        def samefile(self, otherfile): return os.path.samefile(self, otherfile)
+ 
+     def getatime(self): return os.path.getatime(self)
+     atime = property(
diff --git a/python-paver.spec b/python-paver.spec
index 5d8617f..93d7317 100644
--- a/python-paver.spec
+++ b/python-paver.spec
@@ -5,7 +5,7 @@
 %global srcname Paver
 Name: python-paver
 Version: 1.1.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Python-based build/distribution/deployment scripting tool
 
 Group: Development/Languages
@@ -14,6 +14,10 @@ Group: Development/Languages
 License: BSD and (MIT or GPLv2)
 URL: http://www.blueskyonmars.com/projects/paver/
 Source0: http://pypi.python.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz
+# Fix call to os.path.samefile
+# Submitted upstream https://github.com/paver/paver/pull/86
+# (Code has changed a little but this patch is the equivalent)
+Patch0: paver-samefile-fix.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch: noarch
@@ -54,6 +58,8 @@ now much easier.
 %prep
 %setup -q -n %{srcname}-%{version}
 
+%patch0 -p1
+
 # Note: This falls somewhere in between source and non-source.  It's a copy
 # of the essential files from the library that's being packaged.  But it's
 # zipped up.  For us, the paver command should find the uninstalled paver
@@ -82,6 +88,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Thu Jan 10 2013 Toshio Kuratomi <toshio at fedoraproject.org> - 1.1.1-2
+- Fix paver's use of os.path.samefile
+
 * Sun Aug 26 2012 Toshio Kuratomi <toshio at fedoraproject.org> - 1.1.1-1
 - New upstream bugfix
 


More information about the scm-commits mailing list