Making a python package and cross-platform compatible


 
Thread Tools Search this Thread
Operating Systems Linux Debian Making a python package and cross-platform compatible
# 1  
Old 10-14-2013
Making a python package and cross-platform compatible

Hi Ive been trying for days now and i just cannot work this out.

Can someone please tell me if im doing this right.

I've written some python3.3 code and now i want to transfer it to an embedded computer to execute.

My OS is a : Debian GNU/Linux 6.0.7 (squeezez) 32-bit kernel
Compiler gcc 4.4.4 and gcc 4.4.5


The target computer is : Linux 2.6.9 32bit cpu.
Compiler gcc 3.3.2

So i have the .py files. I install cx_freeze with python3.3.

I then use cxfreese file.py, which create a folder called dist with a bunch of files and a executable.

Now from my understanding everything it needs to run is inside that folder?
So how come when i transfer over to the target computer it says " cannot execute binary file"

is this todo with them haveing diffrent compilers? how do i update the target computers compiler when there is no apt-get or dpkg facility?

Please someone save Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Making a python package and cross-platform compatible

Hi Ive been trying for days now and i just cannot work this out. Can someone please tell me if im doing this right. I've written some python3.3 code and now i want to transfer it to an embedded computer to execute. My OS is a : Debian GNU/Linux 6.0.7 (squeezez) 32-bit kernel The... (1 Reply)
Discussion started by: RedEyedDog
1 Replies

2. UNIX for Dummies Questions & Answers

Really simple cross-platform database?

I'm looking for a really simple to use lightweight database. Ideally something open-source that stores data in a (semi-) human-readable format, in case the software isn't working. Something cross-platform enough that I can use it on my Linux machine, my Mac, or stick it on a USB stick and... (2 Replies)
Discussion started by: emdan
2 Replies

3. Shell Programming and Scripting

making code compatible to previous bash versions

First let me explain the scenario I have tywo files as usual file1.txt (it has n rows and 8 columns) $1 $2 $3 $4 $5 $6 $7 $8 Code: 1234567|iufgt|iuoy|iout|white |black |red |90879 1234567|iufgt|iuoy|iout|green |pink |blue |90879... (3 Replies)
Discussion started by: s.deepak
3 Replies

4. Shell Programming and Scripting

configuring packages for cross-platform build

Hi all, I wish to build a few packages for my embedded target running linux over ARM9. It would be tough for me to compile my packages on target so I need to build on a host machine and then transfer the generated binaries. So I got the source-tarball for the packages I need. Now here are my two... (0 Replies)
Discussion started by: Rakesh Ranjan
0 Replies

5. UNIX for Advanced & Expert Users

Cross platform Authentication

I am looking to have UNIX authenticate against Active Directory in a Windows Server 2003 environment, any suggestion? I am very new to UNIX, 2 weeks worth knowledge, if that. Thanks! (3 Replies)
Discussion started by: Optik
3 Replies
Login or Register to Ask a Question
DH_PYCENTRAL(1) 						     Debhelper							   DH_PYCENTRAL(1)

NAME
dh_pycentral - use the python-central framework to handle Python modules and extensions SYNOPSIS
dh_pycentral [debhelper options] [-n] [-Xitem] [-V version] [module dirs ...] DESCRIPTION
dh_pycentral is a debhelper program that will scan your package, detect public Python modules and move them in /usr/share/pycentral so that python-central can byte-compile those for all supported Python versions. Extensions are kept into the original installation location. Moving the files to the pycentral location and adding symbolic links to /usr/lib/pythonX.Y/*-packages can be done by setting the environment varibale DH_PYCENTRAL to a string containing the string include-links. Moving the files to the pycentral location can be disabled by setting the environment varibale DH_PYCENTRAL to a string containing the string nomove. The functionality to shorten the time of unavailabilty of files during unpack and configure has been removed (symlinking files in the preinst and not removing the symlinked files on upgrade) in version 0.6.9. You must have filled the XS-Python-Version header to indicate the set of python versions that are going to be supported. dh_pycentral expects the XB-Python-Version for each binary package it is supposed to work on. dh_pycentral will also generate substitution variables: the ${python:Provides} variable will contain versioned provides of the package (if the package's name starts with "python-"). A python-foo package could provide "python2.3-foo" and "python2.4-foo" at the same time. Python extensions have to provide those whereas it's only option for pure python modules. The ${python:Versions} variable should be used to provide the required XB-Python-Version field listing the python versions supported by the package. OPTIONS
module dirs If your package installs python modules in non-standard directories, you can make dh_pycentral check those directories by passing their names on the command line. By default, it will check /usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE, /usr/share/games/$PACKAGE, /usr/lib/python?.?/site-packages and /usr/lib/python?.?/dist-packages. Note: only /usr/lib/python?.?/site-packages and the extra names on the command line are searched for binary (.so) modules. -V version If the .py files your package ships are meant to be used by a specific pythonX.Y version, you can use this option to specify the desired version, such as 2.3. Do not use if you ship modules in /usr/lib/site-python. With the new policy, this option is mostly deprecated. Use the XS-Python-Field to indicate that you're using a specific python version. -n, --noscripts Do not modify postinst/postrm scripts. -Xitem, --exclude=item Exclude files that contain "item" anywhere in their filename from being taken into account to generate the python dependency. You may use this option multiple times to build up a list of things to exclude. CONFORMS TO
Python policy, version 0.4.1 (2006-06-20) SEE ALSO
debhelper(7) This program is a part of python-central but is made to work with debhelper. AUTHORS
Raphael Hertzog <hertzog@debian.org> Also includes bits of the old dh_python written by Josselin Mouette <joss@debian.org> who used many ideas from Brendan O'Dea <bod@debian.org>. 2011-04-14 DH_PYCENTRAL(1)