![]() |
[Solved] How to use py_compilefiles in rules file?
Hi guys,
I tried to compile my python files in the following way: /usr/bin/py_compilefiles $(CURDIR)/debian/www2sms/opt/www2sms/*.py But the buildsystem complaints about missing py_compilefiles. Now I found the following on the WIKI: http://wiki.maemo.org/Performance_Co...python_Startup Quote:
Code:
#!/usr/bin/make -f Cheers Bjoern |
Re: How to use py_compilefiles in rules file?
It sounds like py_compilefiles is not on the Maemo build system.
One alternative may be to pre-build the pyc files and ship those are part of the source Debian package. I'm not sure if this is recommended practice, but it would get around a missing py_compilefiles and still let you have the pre-compiled binaries. |
Re: How to use py_compilefiles in rules file?
I copied a chunk out of the main python package's post-install script (you'll need to replace the package name & path):
Code:
#!/bin/sh -e |
Re: How to use py_compilefiles in rules file?
I let the .pyc files precompile in the following way:
I've added python-support to build_depends and depends in debian/control and dh_pysupport to debian/rules. In debian/rules it is important to add the path of your installed app to dh_pysupport. e.g. "dh_pysupport /opt/your-package", because your module will not be installed in a standard public path. |
Re: How to use py_compilefiles in rules file?
Quote:
At least it passes the build system now :) Lets see what happens when I install it. Thanks Bjoern |
Re: How to use py_compilefiles in rules file?
py_compilefiles is part of python-central, have a look at noor's source (debian/rules) and see how I use it, don't forget to add a command to delete the pyc files in clean
|
Re: How to use py_compilefiles in rules file?
Quote:
Cheers Bjoern |
All times are GMT. The time now is 08:15. |
vBulletin® Version 3.8.8