Active Topics

 


Reply
Thread Tools
caco3's Avatar
Posts: 560 | Thanked: 423 times | Joined on May 2010 @ Switzerland
#1
Hi all

I am writing a python application (SleepAnalyser). As it needs some CPU intensive operations, I started to use Shedskin to generate a C module for python. It works well on my phone, so I just tried to include the .so file into my tar.gz package and uploaded it. How ever the autobuilder does not accept it ,I guess he thinks it is non-free.

How do I get this file into my package?
Is there a way autobuilder could use shedskin himself to generate it?
Or do I have to make a new package like sleepanalyser-lib and upload it as a non-free package? I found some infos about that under http://wiki.maemo.org/Uploading_to_E...ee.22_packages

Or is there a better way?
If somebody could show me how I can create a package with a C module for python, that would be the best I guess.

Thank you for your help.
__________________
On N9 check out this:
CacheMe 4 the N9, a geocaching client / MiniBible, a bible viewer / TheWord brings daily bible verses onto your phone / BatteryGraph to monitor the battery drainage / doublepress2unlock to unlock your phone with a double press onto the power button / GPRS Data Usage to monitor your GPRS data usage /
and more...

On N900 check out this: SleepAnalyser to analyse your sleep movements / PasswordMaker a for a password generator
 
Posts: 324 | Thanked: 371 times | Joined on Dec 2009 @ Vancouver, BC
#2
I think the basic idea is to either:
- ship the .so in the non-free repository (this has the disadvantage of not being available to x86 target, for scratchbox)
- ship the C source and have the autobuilder compile the C code into the .so library and install it (or make a separate package that compiles the C code)
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#3
The autobuilder itself has no problem with binary files included in source files and copied to the created binary packages.

If the package builds correctly in scratchbox but not in the autobuilder, you have another problem. Try to read the logs and find the real issue.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#4
quote from the shedskin tutorial:
To compile the following simple test program, called test.py:
Code:
print 'hello, world!'
Type:
Code:
shedskin test
This will create two C++ files, called test.cpp and test.hpp, as well as a Makefile.
To create an executable file, called test, type:
Code:
make
why not just submit the resulting source files? the last step, "make" is basically what the autobuilder is doing.
you don't have to submit the python code, if you just submit the resulting c++ code it should build just as well. you could submit the additional python sources as extra files for reference...

i guess you could probably also create a -dev package for shedksin, pre-depend upon it and somehow trigger a pre-processing of your .py source. that would be much more tricky than just submitting .cpp though...
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
caco3's Avatar
Posts: 560 | Thanked: 423 times | Joined on May 2010 @ Switzerland
#5
Thank you for your suggestions.
With the great help of MohammadAG I could build a package for shedskin (see extras-devel).
With that on the server, I can compile the module for my python application on the server.
I also started to create a wiki page, for those who are interested: http://wiki.maemo.org/ShedSkin
__________________
On N9 check out this:
CacheMe 4 the N9, a geocaching client / MiniBible, a bible viewer / TheWord brings daily bible verses onto your phone / BatteryGraph to monitor the battery drainage / doublepress2unlock to unlock your phone with a double press onto the power button / GPRS Data Usage to monitor your GPRS data usage /
and more...

On N900 check out this: SleepAnalyser to analyse your sleep movements / PasswordMaker a for a password generator
 

The Following 6 Users Say Thank You to caco3 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:43.