* [devel] python and typelib @ 2019-12-02 17:39 Alexey Shabalin 2019-12-02 18:52 ` Stanislav Levin 2019-12-03 12:59 ` Mikhail Efremov 0 siblings, 2 replies; 6+ messages in thread From: Alexey Shabalin @ 2019-12-02 17:39 UTC (permalink / raw) To: ALT Linux Team development discussions День добрый. Разбираясь с пакетом virt-install по поводу отсутствующих нужных зависимостей, Пришел к следующему выводу: Если в пакете есть зависимость вида python3(gi) python3(gi.repository) то так же обязана быть хотя бы одна зависимость на _typelib_. Рассмотрим пример: в virt-manager-common в osdict.py присутствует код: ----------------------------- from gi.repository import Libosinfo ----------------------------- Это означает, что должны появится следующие зависимости: python3(gi.repository) typelib(Libosinfo) typelib(Libosinfo) отсутствовал в зависимостях, и соответственно код не работал. Если в ручную доустановить libosinfo-gir, то все нормальною Последняя зависимость успешно появляется, если в сборочную среду добавить rpm-build-gir: Т.е. нужно BuildRequires(pre): rpm-build-python3 rpm-build-gir Ниже список пакетов(спасибо vseleznv@) в которых присутствует python3(gi.repository), но нет ни одной зависимости на typelib, что означает, что "из коробки" что-то не заработает. Прошу мантейнеров посмотреть и поправить. Возможно достаточно добавить rpm-build-gir в сборочную среду. arandr lav @everybody battray viy @everybody catfish george @qa dogtail lav @qa fleet-commander-admin slev @everybody fleet-commander-client slev @everybody lirc rider lakostis @everybody mate-menu cas @everybody mugshot cas @everybody playitslowly george @everybody python-module-ipykernel @python @everybody python3-module-mass mrdrew @everybody python3-module-mpltools mrdrew @everybody python3-module-xapp cow @everybody rednotebook lav @everybody xfce4-panel-profiles sem @xfce @everybody PS: или развесить баги? -- Alexey Shabalin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] python and typelib 2019-12-02 17:39 [devel] python and typelib Alexey Shabalin @ 2019-12-02 18:52 ` Stanislav Levin 2019-12-02 19:27 ` Alexey Shabalin 2019-12-03 12:59 ` Mikhail Efremov 1 sibling, 1 reply; 6+ messages in thread From: Stanislav Levin @ 2019-12-02 18:52 UTC (permalink / raw) To: ALT Linux Team development discussions, Alexey Shabalin [-- Attachment #1.1: Type: text/plain, Size: 982 bytes --] Добрый вечер! 02.12.2019 20:39, Alexey Shabalin пишет: > День добрый. > Разбираясь с пакетом virt-install по поводу отсутствующих нужных > зависимостей, Пришел к следующему выводу: > Если в пакете есть зависимость вида > python3(gi) > python3(gi.repository) > то так же обязана быть хотя бы одна зависимость на _typelib_. > > Рассмотрим пример: > в virt-manager-common в osdict.py присутствует код: > ----------------------------- > from gi.repository import Libosinfo > ----------------------------- > Это означает, что должны появится следующие зависимости: > python3(gi.repository) > typelib(Libosinfo) Это означает только то, что написано - python-клиент хочет "Libosinfo" из "gi.repository". А вот "Libosinfo" для функционирования требуется "libosinfo-gir". Возможно, что эта зависимость отсутствует (ошибка) или оторвана по какой-то разумной причине в "python3-module-pygobject3". Конечно, в качестве "срочнонужного" костыля можно указать прямую зависимость. Спасибо. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] python and typelib 2019-12-02 18:52 ` Stanislav Levin @ 2019-12-02 19:27 ` Alexey Shabalin 2019-12-02 20:10 ` Stanislav Levin 0 siblings, 1 reply; 6+ messages in thread From: Alexey Shabalin @ 2019-12-02 19:27 UTC (permalink / raw) To: Stanislav Levin; +Cc: ALT Linux Team development discussions пн, 2 дек. 2019 г. в 21:52, Stanislav Levin <slev@basealt.ru>: > > Добрый вечер! > > > 02.12.2019 20:39, Alexey Shabalin пишет: > > День добрый. > > Разбираясь с пакетом virt-install по поводу отсутствующих нужных > > зависимостей, Пришел к следующему выводу: > > Если в пакете есть зависимость вида > > python3(gi) > > python3(gi.repository) > > то так же обязана быть хотя бы одна зависимость на _typelib_. > > > > Рассмотрим пример: > > в virt-manager-common в osdict.py присутствует код: > > ----------------------------- > > from gi.repository import Libosinfo > > ----------------------------- > > Это означает, что должны появится следующие зависимости: > > python3(gi.repository) > > typelib(Libosinfo) > > Это означает только то, что написано - python-клиент хочет "Libosinfo" > из "gi.repository". А вот "Libosinfo" для функционирования требуется > "libosinfo-gir". Не совсем понял, к чему Вы тут придираетесь? "Libosinfo" из "gi.repository" по сути и есть typelib(Libosinfo), потому что только пакет libosinfo-gir провайдит typelib(Libosinfo). Поэтому надо выставить зависимость на typelib(Libosinfo), что специально умеет делать rpm-build-gir. Да, есть более тяжёлые случаи, когда провайдят разные версии разные пакеты(например gtk2 и gtk3). > Возможно, что эта зависимость отсутствует (ошибка) или оторвана по > какой-то разумной причине в "python3-module-pygobject3". Нет, конкретно в python3-module-pygobject3 ничего не оторвано. Я вам пример из пакета virt-manager показывал, у которого должна появится зависимость на libosinfo-gir. При чем тут python3-module-pygobject3? > > > Конечно, в качестве "срочнонужного" костыля можно указать прямую > зависимость. В качестве "срочнонужного" не костыля я предложил использовать rpm-build-gir. -- Alexey Shabalin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] python and typelib 2019-12-02 19:27 ` Alexey Shabalin @ 2019-12-02 20:10 ` Stanislav Levin 2019-12-04 18:22 ` Alexey Shabalin 0 siblings, 1 reply; 6+ messages in thread From: Stanislav Levin @ 2019-12-02 20:10 UTC (permalink / raw) To: shaba; +Cc: ALT Linux Team development discussions [-- Attachment #1.1: Type: text/plain, Size: 1507 bytes --] 02.12.2019 22:27, Alexey Shabalin пишет: > > Не совсем понял, к чему Вы тут придираетесь? > "Libosinfo" из "gi.repository" по сути и есть typelib(Libosinfo), > потому что только пакет > libosinfo-gir провайдит typelib(Libosinfo). Поэтому надо выставить > зависимость на typelib(Libosinfo), что специально умеет делать > rpm-build-gir. > Да, есть более тяжёлые случаи, когда провайдят разные версии разные > пакеты(например gtk2 и gtk3). Да какие придирки? :-) Я вообще не знаю, что такое rpm-build-gir и с чем его едят. Только лишь обратил внимание не логичную (по-моему) вещь, а именно: клиент (например, virt-manager), использующий gi.repository не должен ничего знать про то, как устроен импортируемый объект (Libosinfo) и уж тем более требовать за него что-то для себя. Поэтому, по-моему, именно gi.repository (python3-module-pygobject3) должен зависеть от libosinfo-gir, а не virt-manager и подобные клиенты. В любом случае спасибо за предоставленную информацию! [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] python and typelib 2019-12-02 20:10 ` Stanislav Levin @ 2019-12-04 18:22 ` Alexey Shabalin 0 siblings, 0 replies; 6+ messages in thread From: Alexey Shabalin @ 2019-12-04 18:22 UTC (permalink / raw) To: Stanislav Levin; +Cc: ALT Linux Team development discussions, Alexey Shabalin пн, 2 дек. 2019 г. в 23:10, Stanislav Levin <slev@basealt.ru>: > > > > 02.12.2019 22:27, Alexey Shabalin пишет: > > > > Не совсем понял, к чему Вы тут придираетесь? > > "Libosinfo" из "gi.repository" по сути и есть typelib(Libosinfo), > > потому что только пакет > > libosinfo-gir провайдит typelib(Libosinfo). Поэтому надо выставить > > зависимость на typelib(Libosinfo), что специально умеет делать > > rpm-build-gir. > > Да, есть более тяжёлые случаи, когда провайдят разные версии разные > > пакеты(например gtk2 и gtk3). > > Да какие придирки? :-) Я вообще не знаю, что такое rpm-build-gir и с чем > его едят. > > Только лишь обратил внимание не логичную (по-моему) вещь, а именно: > > клиент (например, virt-manager), использующий gi.repository не должен > ничего знать про то, как устроен импортируемый объект (Libosinfo) и уж > тем более требовать за > него что-то для себя. Поэтому, по-моему, именно gi.repository > (python3-module-pygobject3) должен зависеть от libosinfo-gir, а не > virt-manager и подобные клиенты. > В случае с gi.repository ваша логика абсолютно неверна :) gi.repository - это не простой модуль python, а прокладка между python и бинарными библиотеками специального типа typelib. Это такой спец тип библиотек, которые удобно и просто использовать в разных языках, например python, javascript(можно посмотреть на gnome-shell), кажется vala(могу ошибаться), возможно где-то еще(вроде dmd на их основе делает свои биндинги). Разные проекты, в основном использующие glib2, gtk, предоставляют эти бинарные библиотеки typelib. У нас они отделены в отдельные пакеты *-gir. Каждый такой пакет содержит Provides: typelib(foo). gi.repository ничего не знает о сторонних проектах. Он просто позволяет подгружать эти библиотеки. Поэтому он не может вытягивать все возможные пакеты с typelib. В выше описанном примере, virt-manager сам должен позаботиться о вытягивании пакета libosinfo-gir. > В любом случае спасибо за предоставленную информацию! Пожалуйста. -- Alexey Shabalin ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] python and typelib 2019-12-02 17:39 [devel] python and typelib Alexey Shabalin 2019-12-02 18:52 ` Stanislav Levin @ 2019-12-03 12:59 ` Mikhail Efremov 1 sibling, 0 replies; 6+ messages in thread From: Mikhail Efremov @ 2019-12-03 12:59 UTC (permalink / raw) To: devel On Mon, 2 Dec 2019 20:39:56 +0300 Alexey Shabalin wrote: > День добрый. > Разбираясь с пакетом virt-install по поводу отсутствующих нужных > зависимостей, Пришел к следующему выводу: > Если в пакете есть зависимость вида > python3(gi) > python3(gi.repository) > то так же обязана быть хотя бы одна зависимость на _typelib_. > xfce4-panel-profiles sem @xfce @everybody Исправил, спасибо. -- WBR, Mikhail Efremov ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-12-04 18:22 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-12-02 17:39 [devel] python and typelib Alexey Shabalin 2019-12-02 18:52 ` Stanislav Levin 2019-12-02 19:27 ` Alexey Shabalin 2019-12-02 20:10 ` Stanislav Levin 2019-12-04 18:22 ` Alexey Shabalin 2019-12-03 12:59 ` Mikhail Efremov
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