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

Python package requirements for apps?

asked 2014-05-25 16:39:54 +0300

Camil B gravatar image

I would like to develop an application which would use certain Python packages (e.g. SQLAlchemy). While these packages can be easily installed through pip3 install <package-name>, I cannot ask users to enable developer mode, open the terminal and type that command just to install my application. Is there a way to declare SQLAlchemy (or any other Python Package) as a dependency, just like RPM packages? Or must this be done in an installation script?

I'm not familiar with how applications are packaged, so this question might have naive assumptions.

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
3

answered 2014-05-27 17:57:53 +0300

thp gravatar image

You can add the dependencies if they are available in the Nemo Middleware repositories, and if they are whitelisted in the rpmvalidator for Harbour.

For pure-Python (i.e. no C extensions, so only .py files, no .so files) modules, a good idea is also to just package all Python packages your app uses with your app (this avoids your app breaking when the system-level package is updated).

Do you have a list of libraries you would like to use?

edit flag offensive delete publish link more

Comments

2

At first, only SQLAlchemy, or quick_orm. The quest for the most fitting framework is still ongoing. Other packages are expected, since the application should eventually become quite complex. Currently it looks like bundling the framework in the RPM is the best solution, thank you.

Camil B ( 2014-05-27 18:18:57 +0300 )edit

Hello ! If I package some python 3 libs (like python3-dbus, python3-lxml, ...) is there any chance to see them accepted in the harbour ?

Thanks !

titilambert ( 2014-07-04 10:45:22 +0300 )edit

In my opinion, a Python package repository of some sort would be a must for most applications. The lack of such system will likely just lead to lesser amount of applications, which are larger due to bundling of external modules.

mkouhia ( 2014-07-04 17:09:13 +0300 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2014-05-25 16:39:54 +0300

Seen: 488 times

Last updated: May 27 '14