Skip to main content

Assembles WAR files from Python (Jython) WSGI applications

Project description

snakefight

snakefight generates WAR files from Python (Jython) WSGI applications, suitable for deployment to Java Servlet containers.

Installation

snakefight requires at least Jython 2.5b2. To install:

$ easy_install snakefight

Creating WAR files

snakefight provides a new distutils command: bdist_war.

To create a WAR file, create a web.xml deployment descriptor (which would typically utilize the modjy library for the actual Servlet) and run:

$ jython setup.py bdist_war --web-xml web.xml

snakefight can automatically generate a web.xml (utilizing modjy) for Paste style projects (those that support the paste.app_factory entry point), by specifying the --paste-config option. To specify a named app in the config file, use the --paste-app-name option (which defaults to main):

$ jython setup.py bdist_war --paste-config production.ini --paste-app-name cascade

To include separate .jar files in the WAR’s WEB-INF/lib directory, specify a comma separated list of jars to the --include-jars option:

$ jython setup.py bdist_war --include-jars jasper-runtime-5.5.9.jar,lucene-core-2.4.jar --web-xml web.xml

As with any distutils command the options may also be specified in the project’s setup.cfg:

[bdist_war]
paste-config = production.ini
include-jars = jasper-runtime-5.5.9.jar
               lucene-core-2.4.jar

snakefight can also be ran from CPython (at least version 2.5) as long as a JYTHON_HOME is specified:

$ jython setup.py bdist_war --web-xml web.xml --jython-home=~/jython2.5b2

Other options:

  • --war-prefix Prefix of the war file to build

  • --no-jython Don’t include the Jython distribution

TODO

Add options for:

  • exclude-requires: exclude certain eggs from inclusion

  • static_files: list of directories to serve public files (through the faster org.jruby.webapp.FileServlet)

  • specifying modjy options

Support:

  • non setuptools apps? (like Django apps) django-jython already handles Django but ideally we’d share code

Changelog

0.3 (2009-03-13)

  • Added the --include-jars option

0.2 (2009-03-10)

  • easy_install’ing the app is now the first step

0.1 (2009-03-08)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snakefight-0.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

snakefight-0.3-py2.5.egg (12.1 kB view details)

Uploaded Source

File details

Details for the file snakefight-0.3.tar.gz.

File metadata

  • Download URL: snakefight-0.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for snakefight-0.3.tar.gz
Algorithm Hash digest
SHA256 94fa24e8dc7416bd2496fc4e4114f2fa44109abcb2d19115bc40fef58d98e157
MD5 958799df0a2d6e781a03e48d1d3a3c77
BLAKE2b-256 99ae0c4b83dfcd8611f4627de8bbc2d4f67bb9e979b80b8931d4f83534d504ea

See more details on using hashes here.

File details

Details for the file snakefight-0.3-py2.5.egg.

File metadata

  • Download URL: snakefight-0.3-py2.5.egg
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for snakefight-0.3-py2.5.egg
Algorithm Hash digest
SHA256 15f22076276b91f4f9715495151f419d3e592013d7fab72e4367c4a33a6179d0
MD5 f3a37c3efbd57b203b52a329b20e30ff
BLAKE2b-256 aec374ce5cdc0a4fd0ed4353c8a802caee496ebee2276226ca7641a7a17a0d5f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page