[SOLVED]need some help making package

I’m trying to package my python-panda program but i have some troubles , i’ve read the manual but i still need to know somethings
i’m trying to use packp3d but i need to include some packages such as MySQLdb , after making the p3d file with this command the error message regarding missing mysqldb appears
i use this code

packp3d -o myapp.p3d -d c:/myapp

can i use pdeploy to make a package without making p3d file first ?

is there any other way to distribute the application with all python modules i use ?

thanks in advance

MySQLdb also implies the presences of a MySQL database, which has to be installed separately; and it won’t necessarily be installed on the user’s machine when you run your p3d file. Are you sure you need MySQLdb? Maybe you can solve your database needs with some other db system that is built into Python, maybe even something as generic as anydb?

If you really do need MySQL, then packp3d may not be the best way to distribute your application. It’s certainly possible to package up MySQLdb into your p3d file, but the rest of the supporting MySQL installation might be problematic.


my application get the models data from local network server running MySQL , so it’s not my option to use mysqldb , i use MySQL-python module to get the data from the server so i can use it on my app
i need any way to make the app work on the client PC but i don’t want him to install panda sdk and python modules, i want it to be only one installation

So you’re planning to have each client contact your MySQL server over the internet and obtain the models? OK, but there are other ways to solve this problem that don’t require mysqldb. For instance, you could host the models on an HTTP server instead of a MySQL server, which has the additional advantage of being a more standard way of delivering content, and thus less likely to be blocked by firewall policies.

Still, if you really do require mysqldb, it means you have to build a Panda3D package that provides it. For this, you will need to construct a pdef file, which is somewhat similar to the file direct/src/p3d/panda3d.pdef in the Panda3D source code, which is what we use to construct all of the standard Panda3D packages. Your pdef file won’t have all of those package definitions, but it will have the one definition for mysqldb, and it will name all of the files that mysqldb requires.

Then you have to host that package on your own webserver, and reference it with the -r parameter to packp3d, so that your p3d file references the package. Then when the client runs your p3d file, it will download and install your mysqldb package, and it will be available to your client at runtime.