ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] python utf-8 (I: Sisyphus-20071101 i586 beehive_status)
  @ 2007-11-01 21:20 ` Alexey Tourbin
  2007-11-01 23:01   ` [devel] call for python hackers (python utf-8) Alexey Tourbin
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Tourbin @ 2007-11-01 21:20 UTC (permalink / raw)
  To: devel

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

On Thu, Nov 01, 2007 at 11:46:45PM +0300, QA Team Robot wrote:
> file-roller-2.20.1-alt1
> 	tmp = tmp + content.encode('utf-8')
> 	LookupError: no codec search functions registered: can't find encoding
> 	make[2]: Leaving directory `/usr/src/RPM/BUILD/file-roller-2.20.1/help'

> gcalctool-5.20.2-alt1
> 	tmp = tmp + content.encode('utf-8')
> 	LookupError: no codec search functions registered: can't find encoding
> 	make[2]: *** [de/gcalctool.xml] Error 1
> 
> gnome-applets-extra-netstatus-2.12.1-alt3
> 	tmp = tmp + content.encode('utf-8')
> 	LookupError: no codec search functions registered: can't find encoding
> 	make[2]: *** [bg/gnome-netstatus.xml] Error 1

> gnome-desktop-2.18.3-alt1
> 	tmp = tmp + content.encode('utf-8')
> 	LookupError: no codec search functions registered: can't find encoding
> 	make[3]: *** [ar/fdl.xml] Error 1

> totem-gstreamer-2.18.1-alt1
> 	tmp = tmp + content.encode('utf-8')
> 	LookupError: no codec search functions registered: can't find encoding
> 	make[2]: *** [de/totem.xml] Error 1

> zenity-2.16.3-alt1
> 	tmp = tmp + content.encode('utf-8')
> 	LookupError: no codec search functions registered: can't find encoding
> 	make[2]: *** [bg/zenity.xml] Error 1

Похоже, я слишком сильно ослабил питоновские зависимости
у python-module-libxml2.  В связи с этим ничего пока делать не нужно.
Я, наверное, верну зависимость на python-modules-encodings назад,
и, наверное, малость перетряхну сам питон.

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

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

* [devel] call for python hackers (python utf-8)
  2007-11-01 21:20 ` [devel] python utf-8 (I: Sisyphus-20071101 i586 beehive_status) Alexey Tourbin
@ 2007-11-01 23:01   ` Alexey Tourbin
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Tourbin @ 2007-11-01 23:01 UTC (permalink / raw)
  To: devel

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

On Fri, Nov 02, 2007 at 12:20:10AM +0300, Alexey Tourbin wrote:
> Похоже, я слишком сильно ослабил питоновские зависимости
> у python-module-libxml2.  В связи с этим ничего пока делать не нужно.
> Я, наверное, верну зависимость на python-modules-encodings назад,
> и, наверное, малость перетряхну сам питон.

Нет, не буду добавлять зависимость на python-modules-encodings
в python-module-libxml2.  Она там не нужна.  Реальная семантическая
зависимость на encodings находится в /usr/bin/xml2po. Питон тоже
перетряхивать не буду, он просто очень плохо распилен, взаимные
зависимости между базовыми подпакетами довольно сильные и никакой логики
в них нет.  Мне лишь кое-как удалось "выцепить" python-base, всё
остальное там практически каша какая-то с зависимостями.  Надо просто
заново обдумывать как распилить питон.

$ hsh-install python-modules-encodings
Preparing packages for installation...
ca-certificates-2007.02.06-alt1
libssl6-0.9.8d-alt4
libgdbm-1.8.3-alt4
python-modules-email-2.4.4-alt13
python-modules-compiler-2.4.4-alt13
python-modules-logging-2.4.4-alt13
python-modules-2.4.4-alt13
python-modules-encodings-2.4.4-alt13
$

Какая логика в таком распиле питона?
Никакой логики тут нет.

Думаю что попробую захачить rpm-build-python, чтобы при вызове метода
.encode() автоматически выставлялась зависимость на python2.4(encodings).
Правда, для меня это очень сложно, как там по этому AST ходить
взад-вперёд я слабовато представляю.  Однако инициатива наказуема.
Если кто-то шарит в питоне и может помочь написать мне соответствующий
код это будет здорово.  Остальным по-прежнему предлагаю ничего не делать.

/usr/lib/rpm/python.req.py:
    71	        for node in tree :
    72	            if type(node) in [types.ListType, types.TupleType] :
    73	                if node[0] == symbol.import_stmt :
    74	                    line = 0
    75	                    deps = []
    76	                    node = pro(node)
    77	                    if node[1][1] == 'import' :
    78	                        line = node[1][2]
    79	                        for name in namelist(node) :
    80	                            if IS_HIER is None :
    81	                                deps.append(name[1][1][1])
    82	                            else :
    83	                                deps.append(".".join( [ i for t,i in  name[1][1:] if t==1 ]))
    84	                    elif node[1][1] == 'from' :
    85	                        line = node[1][2]
    86	                        if IS_HIER is None :
    87	                            deps.append(node[2][1][1])
    88	                        else :
    89	                            deps.append(".".join( [ i for t,i in  node[2][1:] if t==1 ]))
    90	
    91	                    if REQ not in ['slight','relaxed'] or deep == 4 :
    92	                        for dep in deps :
    93	                            yield dep
    94	                    else :
    95	                        for dep in deps:
    96	                            print >> sys.stderr, "%s: %s: line=%d IGNORE module=%s" % (sys.argv[0], src, line, dep)
    !!
    !!			elif node[0] == symbol.power : # power -- это вроде вызов метода
    !!			    if ... # имеется что-то типа .encode(...)
    !!				yield "encodings"
    97	
    98	                for item in match(node,deep) :
    99	                    yield item

Также интересны другие случаи, кроме string.encode(), которые должны
давать зависимость на encodings.

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

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

end of thread, other threads:[~2007-11-01 23:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-01 21:20 ` [devel] python utf-8 (I: Sisyphus-20071101 i586 beehive_status) Alexey Tourbin
2007-11-01 23:01   ` [devel] call for python hackers (python utf-8) 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