We have moved to a new Sailfish OS Forum. Please start new discussions there.
12

[BUG] dbus-python(3 too) can't be used as package requirements in harbour.jolla.com

asked 2017-05-31 09:32:51 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2017-06-30 12:29:24 +0300

JoHe gravatar image

Hello!

I'm a "Flicker change theme" developer and I'm using the python 2/3 as a dev language. Why I can't use dbus-python(3 too) library as a requirements if jolla have this library in the official repositories?

Could you please fix that?

If those libraries isn't good for a Jolla, than what proper way to use dbus from a python?

And second question is, why my 0.2 version was approved by QA Xiaobi Xu if this version don't works without manually installed dbus-python3 library?

p.s. I can't use a library means habroubr.jolla.com don't allow upload a binary with those requirements.

Thank you for any help!

p.s.s sent email on developer-care@jolla.com without any answer image description

edit retag flag offensive close delete

Comments

3 Answers

Sort by » oldest newest most voted
7

answered 2017-06-19 11:31:43 +0300

xiaobixu gravatar image

updated 2017-06-19 11:32:36 +0300

Hello,

Thank you for your feedback! The approve of your app in harbour means that it passes the minimail requirement of the Store QA, for example it does not crash at startup, it is compatible with the system, and it does not interfere with other application in SailfishOS, etc :) The fact that it then doesn't do much is up to the developer.

About allowing dbus-python 2/3, we heard your feedback and we are discussing with developers about this and will come back to you asap!

Best regards!

edit flag offensive delete publish link more

Comments

That would be awesome!

Dylan Van Assche ( 2017-06-20 09:55:47 +0300 )edit

Checking this: https://www.freedesktop.org/wiki/Software/DBusBindings/

dbus-python looks like an obsolete library so allowing that doesn't necessarily make sense. If needed, could maybe include own copy with the application?

Pekka Vuorela ( 2017-06-20 15:59:40 +0300 )edit

Please, Pekka Vuorela, you a free to try to include any python dbus library in a package and tell us about your wonderful experience after, I am pretty sure, you will ask about dbus-python as I am ;)

I have a simple point, as a developer I don't care about OS level, platform API and tools. I care about my application only. Without dbus bindings for the python I need to make a lot of work for a simple API call and I really don't understand why.
Sailfish OS using dbus for API calls - nice Sailfish OS accepts python applicatons - nice Sailfish OS official repositories includes dbus-python library - nice Can I use the library as a requirements on harbour.jolla.com - no I don't understand why.

Zhiz0id ( 2017-06-20 21:27:03 +0300 )edit
1

Point wasn't how nice python-dbus is or isn't. If it's obsolete and some other dbus module is recommended to be used, it doesn't make much sense to accept it Harbour. The set of provided modules/libraries should be small but sufficient and properly maintained. Don't want to end up having all the python dbus modules included.

Repeating the question: how hard would it be to include python-dbus inside the application?

Pekka Vuorela ( 2017-06-21 12:31:02 +0300 )edit
1

Including is not always a great idea since packages using Cython (C + Python) need te be compiled for both architectures, which is the case for python-dbus. If you include several modules your application can become quickly several MB's. Python package manager PIP would be the key to install packages (user level using virtualenv) but it isn't allowed in harbour either.

Dylan Van Assche ( 2017-06-22 09:06:45 +0300 )edit
2

answered 2017-06-22 02:42:32 +0300

MartinK gravatar image

updated 2017-06-22 02:45:01 +0300

What about pydbus ? It's a new modern pythonic DBUS library, is under active development and is already entering major distributions:

It's even recommendedin the Freedesktop.org list of Python DBUS bindings.

So maybe it would make sense to package for Sailfish OS & make it the Harbour sanctioned way of using DBUS from Python ?

These are the requirements of pydbus - any idea if Sailfish OS can satisfy those ? Citing from the GitHub page:

  • Python 2.7+ - but works best on 3.4+ (help system is nicer there)
  • PyGI (not packaged on pypi, you need to install it from your distribution's repository - it's usually called python-gi, python-gobject or pygobject)
  • GLib 2.46+ and girepository 1.46+ (Ubuntu 16.04+) - for object publication support

Python version should be fine (we have Python 3.4 in Sailfish OS), but I'm kinda afraid if GLib & PyGI + girepository on Sailfish OS is new enough (if available at all).

edit flag offensive delete publish link more

Comments

I would be happy! Jolla team, please, hear that comment! :)

Zhiz0id ( 2017-06-22 10:43:52 +0300 )edit
2

I agree with @MartinK that this is the right way to go. SailfishOS has already all the required dependencies. I've built a RPM package that you may try. This is Python3 only.

Thank you @MartinK, I've used your spec file Fedora as base for Mer. If successful, I will propose to @andy-branson to create a new project under mer-core-contrib for later inclusion. For the moment, you can look at the packaging in my repo.

Damien Caliste ( 2017-06-22 22:14:15 +0300 )edit

@damien-caliste thank you! I've tested! It works like a charm!

Zhiz0id ( 2017-06-22 22:37:03 +0300 )edit

@damien-caliste Cool! I kinda automatically expected some of the dependencies would be too old on Sailfish OS, so it's really nice it works out of the box! :)

MartinK ( 2017-06-22 22:49:38 +0300 )edit
2

Talked on irc this week that we could make Pygi allowed. Pydbus is small plain python module so it should be easy to just include a copy inside applications.

(Disclaimer: don't do Python myself that much, so making assumptions).

Pekka Vuorela ( 2017-06-28 14:48:29 +0300 )edit
2

answered 2017-10-31 19:12:54 +0300

MartinK gravatar image

Citing @Damien Caliste:

With 2.1.3, python-gobject will be allowed. So no pydbus, but then one can use introspection with something like from gi.repository use DBus.

As Pydbus is a Python only module (no compiled code) this should make it possible to:

  • declare Requires python3-gobject in spec file
  • include Pydbus source code as part of the application package

This should work fine & should be Jolla Store compatible. Also one less package needs to be maintained as part of the stable platform API. :)

edit flag offensive delete publish link more

Comments

1

still don't working "No OS version and packages satisfy package requirements: Requirement python3-gobject not available"

Zhiz0id ( 2017-11-04 18:57:21 +0300 )edit

Works now. Thanks @pekka-vuorela @MartinK @damien-caliste

Zhiz0id ( 2018-07-19 11:48:22 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2017-05-31 09:32:51 +0300

Seen: 1,068 times

Last updated: Oct 31 '17