Phillip B Oldham
Phillip B Oldham

Reputation: 19385

Can a python webapp be bundled into a single file for deployment?

Is it possible for a python webapp to be bundled (gzipped?) into a single file, along with any required resources (js/css files) & modules (including modules like lxml which are mostly C-based), for easy deployment onto a linux webserver?

Upvotes: 3

Views: 243

Answers (3)

Alex Martelli
Alex Martelli

Reputation: 882361

PyInstaller is perhaps the best cross-platform packager (in the SVN trunk version: 1.3, the latest packaged release, is very old and crufty -- no idea why my friends who took over maintenance over a year ago and did so many enhancements keep resisting my entreaties to make another release, already!-) -- you can package for Windows, Linux or Mac, and it directly supports many popular third-party packages too.

Upvotes: 0

jcdyer
jcdyer

Reputation: 19165

Yes. You can create a windows executable using py2exe. A better way to manage deployment is to package your app with a setup.py file, listing all needed dependencies, and listing non-python support files in the MANIFEST.in file. Then you can package it into a bundle using setup.py sdist, and install it with pip. See Tarek Ziade's Hitchhiker's Guide to Packaging for more details.

Upvotes: 1

cit
cit

Reputation: 2615

For standalones ,you could try :

OS X : py2app

For Windows py2exe.

Not sure if this would apply to your 'webapp' though.

Upvotes: 0

Related Questions