[devel] [git update] packages/rpm-build-python: heads/master
Alexey M. Tourbin
=?iso-8859-1?q?at_=CE=C1_altlinux=2Eorg?=
Ср Мар 14 20:37:08 MSK 2007
Мужыки!
Специалисты по питону есть или вам дядя Вася всё будет делать?
Update of /people/at/packages/rpm-build-python.git
Changes statistics since `0.29-alt2-11-g2e6c99a' follows:
.exrc | 1 +
rpm-build-python/python.req.files | 2 ++
rpm-build-python/python.req.py | 10 ++++++----
3 files changed, 9 insertions(+), 4 deletions(-)
Changelog since `0.29-alt2-11-g2e6c99a' follows:
commit 928a9034d4f952a51518307e0cdcebc3cf85d0fa
Author: Alexey Tourbin <at на altlinux.ru>
Date: Wed Mar 14 20:33:44 2007 +0300
python.req.py: fixed multiple arguments in import clause
Old behaviour:
$ cat test.py
import os, re, string
$ /usr/lib/rpm/python.req.py test.py
python2.4(os)
$
New behaviour:
$ /usr/lib/rpm/python.req.py test.py
python2.4(os)
python2.4(re)
python2.4(string)
$
Note that python2.3 still works:
$ python2.3 /usr/lib/rpm/python.req.py test.py
python2.3(os)
python2.3(re)
python2.3(string)
$
commit f55dbd1ae9e6cb5a59d1e20e886d8f7f17bffd2a
Author: Alexey Tourbin <at на altlinux.ru>
Date: Wed Mar 14 20:18:46 2007 +0300
added .exrc
commit 0461dd625a557f49cc8252b0519534e754cf7068
Author: Alexey Tourbin <at на altlinux.ru>
Date: Wed Mar 14 18:12:40 2007 +0300
python.req.files: skip symbolic links
Full diff since `0.29-alt2-11-g2e6c99a' follows:
diff --git a/.exrc b/.exrc
new file mode 100644
index 0000000..1cf99a9
--- /dev/null
+++ b/.exrc
@@ -0,0 +1 @@
+set ts=8 sts=4 sw=4 et
diff --git a/rpm-build-python/python.req.files b/rpm-build-python/python.req.files
index 230143d..bbbb4a6 100755
--- a/rpm-build-python/python.req.files
+++ b/rpm-build-python/python.req.files
@@ -4,6 +4,8 @@ while IFS=$'\t' read -r f t; do
*"python script text"*)
echo "$f"
continue ;;
+ *"symbolic link to "*)
+ continue ;;
esac
case "$f" in
*.py)
diff --git a/rpm-build-python/python.req.py b/rpm-build-python/python.req.py
index c83ad0e..8c958e8 100755
--- a/rpm-build-python/python.req.py
+++ b/rpm-build-python/python.req.py
@@ -50,10 +50,14 @@ else :
if sys.version_info[0:2] < (2,4) :
def pro(x) :
return x
+ def namelist(import_node) :
+ return [x for x in import_node[2:] if x[0] != 12 ]
else :
def pro(x) :
return x[1]
-
+ def namelist(import_node) :
+ return [x for x in import_node[2][1:] if x[0] != 12 ]
+
ignore = dict([ (x,1) for x in
list(os.getenv('RPM_PYTHON_REQ_SKIP',"").split())
+ list(sys.builtin_module_names)]).has_key
@@ -69,9 +73,7 @@ else :
if REQ not in ['slight','relaxed'] or deep == 4 :
node = pro(node)
if node[1][1] == 'import' :
- for name in [x for x in node[2:] if x[0] != 12 ] :
- name = pro(name)
-
+ for name in namelist(node) :
if IS_HIER is None :
yield name[1][1][1]
else :
Подробная информация о списке рассылки Devel