porting python packages (OMEMO)

asked 2019-10-28 10:52:45 +0300

yajo gravatar image

updated 2020-01-12 18:29:45 +0300

Hey, I'm trying to develop an App for using XMPP including OMEMO using Python. I want to deploy this one in the Openrepos and share it with other ones. But sadly it needs some dependencies like aiohttp, aiodns, slixmpp and slixmpp_omemo. This are depending on a lot of other repos.

Installing via pip3 works quite very well, but some of the dependencies have to be compiled. So the installation will require a lot of packages and take a lot of time. I have tried it with the following part in the .spec for the rpm

# >> build pre
# << build pre
pip3 install slixmpp-omemo --root %{buildroot}/%{_datadir}/%{name}
# >> build post
# << build post

But this always fails with some error code. fatal error: file not found: sodium.h

And porting them all manually seems to be a lot of work. Does anybody want's to help me? Thanks in advance yajo

edit retag flag offensive close delete

Comments

2

I would recommend fetching the dependencies in source form (tarball + spec file) from a ROM based distro (Fedora, OpenSUSE), building then in MER OBS and then putting the resulting binary ROMs to your OpenRepos repo. That way they will be installed automatically when users install your OMEMO app/plugin.

MartinK ( 2020-01-12 20:48:20 +0300 )edit

Yes, the proper way is to package every dependency (that's not yet on OpenRepos) independently and upload it to OpenRepos. Python's setuptools offers a nice bdist_rpm feature to directly build RPMs from the source code.

NobodyInPerson ( 2020-01-15 08:56:38 +0300 )edit

Thanks for your replies! I'll try it out. Can I handle the bdist_rpm directly from the build machine? Or should I run it on my Jolla? And do you think it would be easy to automate the building part?

yajo ( 2020-01-18 17:22:04 +0300 )edit

Sorry, didn't get an email notification. If the python package needs compilation, then it's easiest to run it on the device. If not, it is enough to run it in a similar Python environment like SailfishOS.

NobodyInPerson ( 2020-04-29 22:05:03 +0300 )edit