Changes between Version 12 and Version 13 of WikiStart


Ignore:
Timestamp:
07/27/21 13:37:27 (3 years ago)
Author:
Wouter Pasman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v12 v13  
    119119
    120120=== Preparing the jar file
    121 In order to put your party on the [https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPartiesServer partiesserver] for running, you need a jar file of your party.
     121In order to put your party on the [https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWebPythonPartiesServer pypartiesserver] for running, you need a tar.gz file of your party.
    122122
    123 Normally the party includes all dependencies. The jar files are loaded with an isolated jar class loader that should avoid collisions with possibly identically named but possibly different packages in other jar files.
     123In contrast with java, python tar.gz files do not contain their dependent libraries. References to the dependent libraries are stored in the setup.py program inside the tar.gz file. The pypartiesserver runs a standard {{{pip install <your.tar.gz>}}} to install your party for use.
    124124
     125Your tar.gz file must contain a {{{party.py}}} program in the root of the project, defining a function party() that returns your main class, like this:
    125126
    126 Party jar files must have a Main-Class set in the MANIFEST.MF file. This main-class must implement Party and have a no-arg constructor.
     127{{{
     128from randomparty.RandomParty import RandomParty
     129def party():
     130    return RandomParty
     131}}}
    127132
    128 The example randomparty does this from the maven build script.
    129 
    130 We recommend to do initialization of the party only in the init() and not in the constructor or static code.
    131 This because instances of your class can be made both for extracting general info as getDescription(), or to really run your class.
    132 
     133Of course you should replace RandomParty with your party's main class name but the file name must stay {{{party.py}}}.
    133134
    134135== GeniusWeb sources