ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] [git update] packages/rpm-build-python: heads/master
@ 2007-03-14 17:37 Alexey M. Tourbin
  2007-03-14 18:43 ` Ivan Fedorov
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey M. Tourbin @ 2007-03-14 17:37 UTC (permalink / raw)
  To: devel


Мужыки!
Специалисты по питону есть или вам дядя Вася всё будет делать?


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 :


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-15  4:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-14 17:37 [devel] [git update] packages/rpm-build-python: heads/master Alexey M. Tourbin
2007-03-14 18:43 ` Ivan Fedorov
2007-03-14 19:21   ` Alexey Tourbin
2007-03-15  4:30     ` Ivan Fedorov
2007-03-15  4:42       ` Alexey Tourbin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git