Browse Source

Fix Cython issue on Linux

Jonas Borgström 11 years ago
parent
commit
4bcc1b8ff9
2 changed files with 3 additions and 1 deletions
  1. 1 1
      attic/platform_linux.pyx
  2. 2 0
      attic/testsuite/platform.py

+ 1 - 1
attic/platform_linux.pyx

@@ -26,7 +26,7 @@ cdef extern from "acl/libacl.h":
 _comment_re = re.compile(' *#.*', re.M)
 _comment_re = re.compile(' *#.*', re.M)
 
 
 
 
-cdef acl_use_local_uid_gid(acl):
+def acl_use_local_uid_gid(acl):
     """Replace the user/group field with the local uid/gid if possible
     """Replace the user/group field with the local uid/gid if possible
     """
     """
     entries = []
     entries = []

+ 2 - 0
attic/testsuite/platform.py

@@ -1,5 +1,6 @@
 import os
 import os
 import shutil
 import shutil
+import sys
 import tempfile
 import tempfile
 import unittest
 import unittest
 from attic.platform import acl_get, acl_set
 from attic.platform import acl_get, acl_set
@@ -33,6 +34,7 @@ def fakeroot_detected():
     return 'FAKEROOTKEY' in os.environ
     return 'FAKEROOTKEY' in os.environ
 
 
 
 
+@unittest.skipUnless(sys.platform.startswith('linux'), 'linux only test')
 @unittest.skipIf(fakeroot_detected(), 'not compatible with fakeroot')
 @unittest.skipIf(fakeroot_detected(), 'not compatible with fakeroot')
 class PlatformLinuxTestCase(AtticTestCase):
 class PlatformLinuxTestCase(AtticTestCase):