Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 344546 Details for
Bug 464766
dev-python/lockfile - add python3 support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ebuild patch
add-python3-support-for-lockfile.diff (text/plain), 4.31 KB, created by
solj
on 2013-04-05 19:21:15 UTC
(
hide
)
Description:
ebuild patch
Filename:
MIME Type:
Creator:
solj
Created:
2013-04-05 19:21:15 UTC
Size:
4.31 KB
patch
obsolete
>diff -uNr lockfile/files/lockfile-0.9.1-py3k.patch /usr/portage/dev-python/lockfile/files/lockfile-0.9.1-py3k.patch >--- lockfile/files/lockfile-0.9.1-py3k.patch 1969-12-31 18:00:00.000000000 -0600 >+++ /usr/portage/dev-python/lockfile/files/lockfile-0.9.1-py3k.patch 2013-04-05 13:55:44.747730637 -0500 >@@ -0,0 +1,105 @@ >+diff --git a/lockfile/__init__.py b/lockfile/__init__.py >+index 7bb7b35..668b426 100644 >+--- a/lockfile/__init__.py >++++ b/lockfile/__init__.py >+@@ -1,4 +1,3 @@ >+- >+ """ >+ lockfile.py - Platform-independent advisory file locks. >+ >+@@ -50,6 +49,8 @@ Exceptions: >+ NotMyLock - File was locked but not by the current thread/process >+ """ >+ >++from __future__ import absolute_import >++ >+ import sys >+ import socket >+ import os >+@@ -257,7 +258,7 @@ def LinkFileLock(*args, **kwds): >+ Do not use in new code. Instead, import LinkLockFile from the >+ lockfile.linklockfile module. >+ """ >+- import linklockfile >++ from . import linklockfile >+ return _fl_helper(linklockfile.LinkLockFile, "lockfile.linklockfile", >+ *args, **kwds) >+ >+@@ -267,7 +268,7 @@ def MkdirFileLock(*args, **kwds): >+ Do not use in new code. Instead, import MkdirLockFile from the >+ lockfile.mkdirlockfile module. >+ """ >+- import mkdirlockfile >++ from . import mkdirlockfile >+ return _fl_helper(mkdirlockfile.MkdirLockFile, "lockfile.mkdirlockfile", >+ *args, **kwds) >+ >+@@ -277,7 +278,7 @@ def SQLiteFileLock(*args, **kwds): >+ Do not use in new code. Instead, import SQLiteLockFile from the >+ lockfile.mkdirlockfile module. >+ """ >+- import sqlitelockfile >++ from . import sqlitelockfile >+ return _fl_helper(sqlitelockfile.SQLiteLockFile, "lockfile.sqlitelockfile", >+ *args, **kwds) >+ >+@@ -306,10 +307,10 @@ def locked(path, timeout=None): >+ return decor >+ >+ if hasattr(os, "link"): >+- import linklockfile as _llf >++ from . import linklockfile as _llf >+ LockFile = _llf.LinkLockFile >+ else: >+- import mkdirlockfile as _mlf >++ from . import mkdirlockfile as _mlf >+ LockFile = _mlf.MkdirLockFile >+ >+ FileLock = LockFile >+diff --git a/lockfile/pidlockfile.py b/lockfile/pidlockfile.py >+index 3fc8f63..a965ba8 100644 >+--- a/lockfile/pidlockfile.py >++++ b/lockfile/pidlockfile.py >+@@ -78,7 +78,7 @@ class PIDLockFile(LockBase): >+ while True: >+ try: >+ write_pid_to_pidfile(self.path) >+- except OSError, exc: >++ except OSError as exc: >+ if exc.errno == errno.EEXIST: >+ # The lock creation failed. Maybe sleep a bit. >+ if timeout is not None and time.time() > end_time: >+@@ -159,7 +159,7 @@ def write_pid_to_pidfile(pidfile_path): >+ >+ """ >+ open_flags = (os.O_CREAT | os.O_EXCL | os.O_WRONLY) >+- open_mode = 0644 >++ open_mode = 0o644 >+ pidfile_fd = os.open(pidfile_path, open_flags, open_mode) >+ pidfile = os.fdopen(pidfile_fd, 'w') >+ >+@@ -186,7 +186,7 @@ def remove_existing_pidfile(pidfile_path): >+ """ >+ try: >+ os.remove(pidfile_path) >+- except OSError, exc: >++ except OSError as exc: >+ if exc.errno == errno.ENOENT: >+ pass >+ else: >+diff --git a/lockfile/sqlitelockfile.py b/lockfile/sqlitelockfile.py >+index ec75490..d596229 100644 >+--- a/lockfile/sqlitelockfile.py >++++ b/lockfile/sqlitelockfile.py >+@@ -3,6 +3,11 @@ from __future__ import absolute_import, division >+ import time >+ import os >+ >++try: >++ unicode >++except NameError: >++ unicode = str >++ >+ from . import LockBase, NotLocked, NotMyLock, LockTimeout, AlreadyLocked >+ >+ class SQLiteLockFile(LockBase): >diff -uNr lockfile/lockfile-0.9.1.ebuild /usr/portage/dev-python/lockfile/lockfile-0.9.1.ebuild >--- lockfile/lockfile-0.9.1.ebuild 2012-06-09 03:31:11.000000000 -0500 >+++ /usr/portage/dev-python/lockfile/lockfile-0.9.1.ebuild 2013-04-05 14:12:52.260002883 -0500 >@@ -5,8 +5,9 @@ > EAPI="3" > PYTHON_DEPEND="2:2.5" > SUPPORT_PYTHON_ABIS="1" >-RESTRICT_PYTHON_ABIS="2.4 3.*" >+RESTRICT_PYTHON_ABIS="2.4" > >+inherit eutils > inherit distutils > > DESCRIPTION="Platform-independent file locking module" >@@ -23,6 +24,12 @@ > > DOCS="ACKS README RELEASE-NOTES" > >+src_unpack() { >+ unpack ${A} >+ cd "${S}" >+ epatch "${FILESDIR}/${P}-py3k.patch" >+} >+ > src_compile() { > distutils_src_compile >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 464766
: 344546