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

* Re: [devel] [git update] packages/rpm-build-python: heads/master
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Fedorov @ 2007-03-14 18:43 UTC (permalink / raw)
  To: ALT Devel discussion list

Alexey M. Tourbin пишет:
> Мужыки!
> Специалисты по питону есть или вам дядя Вася всё будет делать?

Есть... а где бага?



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

* Re: [devel] [git update] packages/rpm-build-python: heads/master
  2007-03-14 18:43 ` Ivan Fedorov
@ 2007-03-14 19:21   ` Alexey Tourbin
  2007-03-15  4:30     ` Ivan Fedorov
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Tourbin @ 2007-03-14 19:21 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

On Thu, Mar 15, 2007 at 02:43:55AM +0800, Ivan Fedorov wrote:
> Alexey M. Tourbin пишет:
> > Мужыки!
> > Специалисты по питону есть или вам дядя Вася всё будет делать?
> 
> Есть... а где бага?

А где бага вам объяснено, что "import os, string" ищет только первое,
но не второе.  А как я эту багу заметил а почему вы не заметили и этой
баге уже семь лет в обед это я даже не знаю как и сказать.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [devel] [git update] packages/rpm-build-python: heads/master
  2007-03-14 19:21   ` Alexey Tourbin
@ 2007-03-15  4:30     ` Ivan Fedorov
  2007-03-15  4:42       ` Alexey Tourbin
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Fedorov @ 2007-03-15  4:30 UTC (permalink / raw)
  To: ALT Devel discussion list

Alexey Tourbin пишет:
> On Thu, Mar 15, 2007 at 02:43:55AM +0800, Ivan Fedorov wrote:
>> Alexey M. Tourbin пишет:
>>> Мужыки!
>>> Специалисты по питону есть или вам дядя Вася всё будет делать?
>> Есть... а где бага?
> 
> А где бага вам объяснено, что "import os, string" ищет только первое,
> но не второе.  А как я эту багу заметил а почему вы не заметили и этой
> баге уже семь лет в обед это я даже не знаю как и сказать.

Алексей, а ты ВСЕ баги в своем софте замечаешь? Если да, то я могу на 
тебя помолиться!



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

* Re: [devel] [git update] packages/rpm-build-python: heads/master
  2007-03-15  4:30     ` Ivan Fedorov
@ 2007-03-15  4:42       ` Alexey Tourbin
  0 siblings, 0 replies; 5+ messages in thread
From: Alexey Tourbin @ 2007-03-15  4:42 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

On Thu, Mar 15, 2007 at 12:30:20PM +0800, Ivan Fedorov wrote:
> Alexey Tourbin пишет:
> > On Thu, Mar 15, 2007 at 02:43:55AM +0800, Ivan Fedorov wrote:
> >> Alexey M. Tourbin пишет:
> >>> Мужыки!
> >>> Специалисты по питону есть или вам дядя Вася всё будет делать?
> >> Есть... а где бага?
> > 
> > А где бага вам объяснено, что "import os, string" ищет только первое,
> > но не второе.  А как я эту багу заметил а почему вы не заметили и этой
> > баге уже семь лет в обед это я даже не знаю как и сказать.
> 
> Алексей, а ты ВСЕ баги в своем софте замечаешь? Если да, то я могу на 
> тебя помолиться!

Конечно не все, но напр. для rpm-build-perl я специально написал тесты.

$ make test
LD_BIND_NOW=1 PERL_DL_NONLAZY=1 /usr/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-B-PerlReq....ok                                                         
t/02-perlreq......ok                                                         
t/03-perlprov.....ok                                                         
All tests successful.
Files=3, Tests=134,  8 wallclock secs ( 6.54 cusr +  0.45 csys =  6.99 CPU)
$

Так что теперь я хотя бы знаю, что в 134 частных случаях поиск
зависимостей идет верно.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ 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