1 |
commit: cefc60a8a7aca2ca9468fe31bb2ea0bcef011804 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 2 11:02:23 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 2 11:47:12 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cefc60a8 |
7 |
|
8 |
Revert "dev-python/lockfile: Drop old" |
9 |
|
10 |
This reverts commit b001341676e39eca2364fea454ab5221e7fe2c8d. |
11 |
|
12 |
dev-python/lockfile/Manifest | 2 + |
13 |
dev-python/lockfile/files/py3-support.patch | 107 +++++++++++++++++++++ |
14 |
...ile-0.11.0-r1.ebuild => lockfile-0.10.2.ebuild} | 11 +-- |
15 |
dev-python/lockfile/lockfile-0.11.0-r1.ebuild | 2 +- |
16 |
dev-python/lockfile/lockfile-0.9.1-r1.ebuild | 43 +++++++++ |
17 |
5 files changed, 156 insertions(+), 9 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/lockfile/Manifest b/dev-python/lockfile/Manifest |
20 |
index 4be3a3c..bfa50c8 100644 |
21 |
--- a/dev-python/lockfile/Manifest |
22 |
+++ b/dev-python/lockfile/Manifest |
23 |
@@ -1 +1,3 @@ |
24 |
+DIST lockfile-0.10.2.tar.gz 20662 SHA256 9e42252f17d1dd89ee31745e0c4fbe58862c25147eb0ef5295c9cd9bcb4ea2c1 SHA512 7d70bcf7c343228f144687dd2cbc47a525034a68134fa626077d08308e6abce80559e36e9f65859d4c46873c712f62e1d6bb2aeec422d337332b65caf2e430a8 WHIRLPOOL d23a0b99da2304d9c884e69df7fbae4e507d7bab35fe450f2062aba44b4c85fd2c1585012cd02a56c886b50c44fb5a470afe13546f828297c498c3a8551eda86 |
25 |
DIST lockfile-0.11.0.tar.gz 20909 SHA256 eed7e0c829135aaaf2a9df83652bc6e2cc50175d933741c25aac0394674e7fd3 SHA512 6c4c69e1434194076a99f8134a2558c791675d420a17687dfd5b38c1303564392ecc388ec285d55a20027bcbcbc1b3475a489b70390796c46346b89d4b18ad89 WHIRLPOOL 3fe41cec5f22109ce17e249a02469201e74cc6facd18bbcd5d6b75984f1f72e66d36eab68772d9bc6aa0c1ef6597f3bdf8f8757d9f867323d152cca8a47a445f |
26 |
+DIST lockfile-0.9.1.tar.gz 16949 SHA256 88d8ea8d435ee5691117a87d1ca8fed2f8da881eb145295bf6895ac2c416e95d SHA512 1f7e2b13c42df730339e653a361bf4b85a289d62ed9277f159ab454b1e951d922884086299912472236ce0772d5eceebab7e0c6407590bb2ccbe9c56b664de05 WHIRLPOOL 543bc9ad7e937feba52c6132eee3356a9a229c8866f4f605f8399343a676fc98f62bf33f121c4f8dcbac8e18f38168561d34119efea5e30b53427a7e7283055d |
27 |
|
28 |
diff --git a/dev-python/lockfile/files/py3-support.patch b/dev-python/lockfile/files/py3-support.patch |
29 |
new file mode 100644 |
30 |
index 0000000..ca6349a |
31 |
--- /dev/null |
32 |
+++ b/dev-python/lockfile/files/py3-support.patch |
33 |
@@ -0,0 +1,107 @@ |
34 |
+# https://github.com/smontanaro/pylockfile/commit/379fa0b6131995f96f5bd048906fc0bd3c2527f7 |
35 |
+# https://github.com/smontanaro/pylockfile/commit/eeead7d35e9a97b457b90edd241fd031df68d57b |
36 |
+# https://github.com/smontanaro/pylockfile/commit/bf2627a5b9f83e1bbcf1b5030a693acb6236a211 |
37 |
+--- a/lockfile/__init__.py |
38 |
++++ b/lockfile/__init__.py |
39 |
+@@ -1,4 +1,3 @@ |
40 |
+- |
41 |
+ """ |
42 |
+ lockfile.py - Platform-independent advisory file locks. |
43 |
+ |
44 |
+@@ -50,6 +49,8 @@ Exceptions: |
45 |
+ NotMyLock - File was locked but not by the current thread/process |
46 |
+ """ |
47 |
+ |
48 |
++from __future__ import absolute_import |
49 |
++ |
50 |
+ import sys |
51 |
+ import socket |
52 |
+ import os |
53 |
+@@ -257,7 +258,7 @@ def LinkFileLock(*args, **kwds): |
54 |
+ Do not use in new code. Instead, import LinkLockFile from the |
55 |
+ lockfile.linklockfile module. |
56 |
+ """ |
57 |
+- import linklockfile |
58 |
++ from . import linklockfile |
59 |
+ return _fl_helper(linklockfile.LinkLockFile, "lockfile.linklockfile", |
60 |
+ *args, **kwds) |
61 |
+ |
62 |
+@@ -267,7 +268,7 @@ def MkdirFileLock(*args, **kwds): |
63 |
+ Do not use in new code. Instead, import MkdirLockFile from the |
64 |
+ lockfile.mkdirlockfile module. |
65 |
+ """ |
66 |
+- import mkdirlockfile |
67 |
++ from . import mkdirlockfile |
68 |
+ return _fl_helper(mkdirlockfile.MkdirLockFile, "lockfile.mkdirlockfile", |
69 |
+ *args, **kwds) |
70 |
+ |
71 |
+@@ -277,7 +278,7 @@ def SQLiteFileLock(*args, **kwds): |
72 |
+ Do not use in new code. Instead, import SQLiteLockFile from the |
73 |
+ lockfile.mkdirlockfile module. |
74 |
+ """ |
75 |
+- import sqlitelockfile |
76 |
++ from . import sqlitelockfile |
77 |
+ return _fl_helper(sqlitelockfile.SQLiteLockFile, "lockfile.sqlitelockfile", |
78 |
+ *args, **kwds) |
79 |
+ |
80 |
+@@ -306,10 +307,10 @@ def locked(path, timeout=None): |
81 |
+ return decor |
82 |
+ |
83 |
+ if hasattr(os, "link"): |
84 |
+- import linklockfile as _llf |
85 |
++ from . import linklockfile as _llf |
86 |
+ LockFile = _llf.LinkLockFile |
87 |
+ else: |
88 |
+- import mkdirlockfile as _mlf |
89 |
++ from . import mkdirlockfile as _mlf |
90 |
+ LockFile = _mlf.MkdirLockFile |
91 |
+ |
92 |
+ FileLock = LockFile |
93 |
+diff --git a/lockfile/pidlockfile.py b/lockfile/pidlockfile.py |
94 |
+index 3fc8f63..a965ba8 100644 |
95 |
+--- a/lockfile/pidlockfile.py |
96 |
++++ b/lockfile/pidlockfile.py |
97 |
+@@ -78,7 +78,7 @@ class PIDLockFile(LockBase): |
98 |
+ while True: |
99 |
+ try: |
100 |
+ write_pid_to_pidfile(self.path) |
101 |
+- except OSError, exc: |
102 |
++ except OSError as exc: |
103 |
+ if exc.errno == errno.EEXIST: |
104 |
+ # The lock creation failed. Maybe sleep a bit. |
105 |
+ if timeout is not None and time.time() > end_time: |
106 |
+@@ -159,7 +159,7 @@ def write_pid_to_pidfile(pidfile_path): |
107 |
+ |
108 |
+ """ |
109 |
+ open_flags = (os.O_CREAT | os.O_EXCL | os.O_WRONLY) |
110 |
+- open_mode = 0644 |
111 |
++ open_mode = 0o644 |
112 |
+ pidfile_fd = os.open(pidfile_path, open_flags, open_mode) |
113 |
+ pidfile = os.fdopen(pidfile_fd, 'w') |
114 |
+ |
115 |
+@@ -186,7 +186,7 @@ def remove_existing_pidfile(pidfile_path): |
116 |
+ """ |
117 |
+ try: |
118 |
+ os.remove(pidfile_path) |
119 |
+- except OSError, exc: |
120 |
++ except OSError as exc: |
121 |
+ if exc.errno == errno.ENOENT: |
122 |
+ pass |
123 |
+ else: |
124 |
+diff --git a/lockfile/sqlitelockfile.py b/lockfile/sqlitelockfile.py |
125 |
+index ec75490..d596229 100644 |
126 |
+--- a/lockfile/sqlitelockfile.py |
127 |
++++ b/lockfile/sqlitelockfile.py |
128 |
+@@ -3,6 +3,11 @@ from __future__ import absolute_import, division |
129 |
+ import time |
130 |
+ import os |
131 |
+ |
132 |
++try: |
133 |
++ unicode |
134 |
++except NameError: |
135 |
++ unicode = str |
136 |
++ |
137 |
+ from . import LockBase, NotLocked, NotMyLock, LockTimeout, AlreadyLocked |
138 |
+ |
139 |
+ class SQLiteLockFile(LockBase): |
140 |
+ |
141 |
|
142 |
diff --git a/dev-python/lockfile/lockfile-0.11.0-r1.ebuild b/dev-python/lockfile/lockfile-0.10.2.ebuild |
143 |
similarity index 78% |
144 |
copy from dev-python/lockfile/lockfile-0.11.0-r1.ebuild |
145 |
copy to dev-python/lockfile/lockfile-0.10.2.ebuild |
146 |
index e55dad9..288009b 100644 |
147 |
--- a/dev-python/lockfile/lockfile-0.11.0-r1.ebuild |
148 |
+++ b/dev-python/lockfile/lockfile-0.10.2.ebuild |
149 |
@@ -14,21 +14,16 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
150 |
|
151 |
LICENSE="MIT" |
152 |
SLOT="0" |
153 |
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86" |
154 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
155 |
IUSE="doc test" |
156 |
|
157 |
DEPEND=" |
158 |
- >dev-python/pbr-0.7[${PYTHON_USEDEP}] |
159 |
+ dev-python/pbr[${PYTHON_USEDEP}] |
160 |
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
161 |
test? ( dev-python/nose[${PYTHON_USEDEP}] )" |
162 |
RDEPEND="" |
163 |
|
164 |
-DOCS=( ACKS AUTHORS ChangeLog README.rst RELEASE-NOTES ) |
165 |
- |
166 |
-python_prepare_all() { |
167 |
- rm requirements.txt || die |
168 |
- distutils-r1_python_prepare_all |
169 |
-} |
170 |
+DOCS=( ACKS README RELEASE-NOTES ) |
171 |
|
172 |
python_compile_all() { |
173 |
if use doc; then |
174 |
|
175 |
diff --git a/dev-python/lockfile/lockfile-0.11.0-r1.ebuild b/dev-python/lockfile/lockfile-0.11.0-r1.ebuild |
176 |
index e55dad9..1979687 100644 |
177 |
--- a/dev-python/lockfile/lockfile-0.11.0-r1.ebuild |
178 |
+++ b/dev-python/lockfile/lockfile-0.11.0-r1.ebuild |
179 |
@@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
180 |
|
181 |
LICENSE="MIT" |
182 |
SLOT="0" |
183 |
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86" |
184 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
185 |
IUSE="doc test" |
186 |
|
187 |
DEPEND=" |
188 |
|
189 |
diff --git a/dev-python/lockfile/lockfile-0.9.1-r1.ebuild b/dev-python/lockfile/lockfile-0.9.1-r1.ebuild |
190 |
new file mode 100644 |
191 |
index 0000000..321426e |
192 |
--- /dev/null |
193 |
+++ b/dev-python/lockfile/lockfile-0.9.1-r1.ebuild |
194 |
@@ -0,0 +1,43 @@ |
195 |
+# Copyright 1999-2015 Gentoo Foundation |
196 |
+# Distributed under the terms of the GNU General Public License v2 |
197 |
+# $Id$ |
198 |
+ |
199 |
+EAPI=5 |
200 |
+# py2.5 dropped; Test file reveals py2.5 can't support a core file |
201 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy ) |
202 |
+ |
203 |
+inherit distutils-r1 |
204 |
+ |
205 |
+DESCRIPTION="Platform-independent file locking module" |
206 |
+HOMEPAGE="https://code.google.com/p/pylockfile/ https://pypi.python.org/pypi/lockfile http://smontanaro.dyndns.org/python/" |
207 |
+SRC_URI="https://pylockfile.googlecode.com/files/${P}.tar.gz" |
208 |
+ |
209 |
+LICENSE="MIT" |
210 |
+SLOT="0" |
211 |
+KEYWORDS="amd64 arm ppc ~sparc x86" |
212 |
+IUSE="doc test" |
213 |
+ |
214 |
+DEPEND="doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
215 |
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )" |
216 |
+RDEPEND="" |
217 |
+ |
218 |
+DOCS=( ACKS README RELEASE-NOTES ) |
219 |
+ |
220 |
+PATCHES=( "${FILESDIR}"/py3-support.patch ) |
221 |
+ |
222 |
+python_compile_all() { |
223 |
+ if use doc; then |
224 |
+ einfo "Generation of documentation" |
225 |
+ emake -C doc html || die "Generation of documentation failed" |
226 |
+ fi |
227 |
+} |
228 |
+ |
229 |
+python_test() { |
230 |
+ # "${PYTHON}" test/test_lockfile.py yeilds no informative coverage output |
231 |
+ nosetests || die "test_lockfile failed under ${EPYTHON}" |
232 |
+} |
233 |
+ |
234 |
+python_install_all() { |
235 |
+ use doc && local HTML_DOCS=( doc/.build/html/. ) |
236 |
+ distutils-r1_python_install_all |
237 |
+} |