Panda3D
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Packager Class Reference

Classes

class  ExcludeFilename
 
class  HostEntry
 
class  Package
 
class  PackageEntry
 
class  PackFile
 

Public Member Functions

def __init__ (self, platform=None)
 
def addAltHost (self, keyword, altHost, origHost=None, downloadUrl=None, descriptiveName=None, hostDir=None, mirrors=None)
 
def addHost (self, host, downloadUrl=None, descriptiveName=None, hostDir=None, mirrors=None)
 
def addModule (self, moduleNames, newName=None, filename=None, required=False)
 
def addPosixSearchPath (self, searchPath, varname)
 
def addWindowsSearchPath (self, searchPath, varname)
 
def beginPackage (self, packageName, p3dApplication=False, solo=False)
 
def buildPatches (self, packages)
 
def close (self)
 
def do_config (self, **kw)
 
def do_excludeModule (self, *args)
 
def do_main (self, filename)
 
def do_mainModule (self, moduleName, newName=None, filename=None)
 
def do_module (self, *args, **kw)
 
def do_require (self, *args, **kw)
 
def do_setupPanda3D (self, p3dpythonName=None, p3dpythonwName=None)
 
def do_setVer (self, value)
 
def do_sign (self, certificate, chain=None, pkey=None, password=None)
 
def endPackage (self)
 
def findPackage (self, packageName, platform=None, version=None, host=None, requires=None)
 
def loadLdconfigCache (self)
 
def readPackageDef (self, packageDef, packageNames=None)
 
def requirePackage (self, package)
 
def requirePackagesNamed (self, names, version=None, host=None)
 
def resolveLibrary (self, filename)
 
def setHost (self, host, downloadUrl=None, descriptiveName=None, hostDir=None, mirrors=None)
 
def setPlatform (self, platform=None)
 
def setup (self)
 

Public Attributes

 allowPackages
 
 allowPythonDev
 
 arch
 
 binaryExtensions
 
 caseSensitive
 
 contents
 
 contentsSeq
 
 currentPackage
 
 dcClientSuffixes
 
 encryptionKey
 
 excludeSystemFiles
 
 excludeSystemGlobs
 
 executableExtensions
 
 executablePath
 
 extractExtensions
 
 host
 
 hosts
 
 http
 
 ignoreSetHost
 
 imageExtensions
 
 installDir
 
 installSearch
 
 knownExtensions
 
 libraryCache
 
 loader
 
 loaderOptions
 
 manifestExtensions
 
 maxAge
 
 modelExtensions
 
 musicManager
 
 nonuniqueExtensions
 
 p3dInstallDir
 
 p3dSuffix
 
 packageList
 
 packages
 
 platform
 
 platformSpecificExtensions
 
 prcEncryptionKey
 
 prcSignCommand
 
 remapExtensions
 
 sfxManagerList
 
 signParams
 
 storePythonSource
 
 suppressWarningForExtensions
 
 systemRoot
 
 textExtensions
 
 uncompressibleExtensions
 
 unprocessedExtensions
 
 verbosePrint
 

Static Public Attributes

 notify = directNotify.newCategory("Packager")
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  platform = None 
)

Member Function Documentation

◆ addAltHost()

def addAltHost (   self,
  keyword,
  altHost,
  origHost = None,
  downloadUrl = None,
  descriptiveName = None,
  hostDir = None,
  mirrors = None 
)
Adds an alternate host to any already-known host.  This
defines an alternate server that may be contacted, if
specified on the HTML page, which hosts a different version of
the server's contents.  (This is different from a mirror,
which hosts an identical version of the server's contents.)

◆ addHost()

def addHost (   self,
  host,
  downloadUrl = None,
  descriptiveName = None,
  hostDir = None,
  mirrors = None 
)
Adds a host to the list of known download hosts.  This
information will be written into any p3d files that reference
this host; this can be used to pre-define the possible mirrors
for a given host, for instance.  Returns the newly-created
HostEntry object.

◆ addModule()

def addModule (   self,
  moduleNames,
  newName = None,
  filename = None,
  required = False 
)

◆ addPosixSearchPath()

def addPosixSearchPath (   self,
  searchPath,
  varname 
)
Expands $varname, interpreting as a Posix-style search
path, and adds its contents to the indicated DSearchPath. 

◆ addWindowsSearchPath()

def addWindowsSearchPath (   self,
  searchPath,
  varname 
)
Expands $varname, interpreting as a Windows-style search
path, and adds its contents to the indicated DSearchPath. 

◆ beginPackage()

def beginPackage (   self,
  packageName,
  p3dApplication = False,
  solo = False 
)
Begins a new package specification.  packageName is the
basename of the package.  Follow this with a number of calls
to file() etc., and close the package with endPackage(). 

◆ buildPatches()

def buildPatches (   self,
  packages 
)
Call this after calling close(), to build patches for the
indicated packages. 

◆ close()

def close (   self)
Called after reading all of the package def files, this
performs any final cleanup appropriate. 

◆ do_config()

def do_config (   self,
**  kw 
)
Called with any number of keyword parameters.  For each
keyword parameter, sets the corresponding p3d config variable
to the given value.  This will be written into the
p3d_info.xml file at the top of the application, or to the
package desc file for a package file. 

◆ do_excludeModule()

def do_excludeModule (   self,
args 
)
Marks the indicated Python module as not to be included. 

◆ do_main()

def do_main (   self,
  filename 
)
Includes the indicated file as __main__ module of the application.
Also updates mainModule to point to this module. 

◆ do_mainModule()

def do_mainModule (   self,
  moduleName,
  newName = None,
  filename = None 
)
Names the indicated module as the "main" module of the
application or exe.  In most cases, you will want to use main()
instead. 

◆ do_module()

def do_module (   self,
args,
**  kw 
)
Adds the indicated Python module(s) to the current package. 

◆ do_require()

def do_require (   self,
args,
**  kw 
)
Indicates a dependency on the named package(s), supplied
as a name.

Attempts to install this package will implicitly install the
named package also.  Files already included in the named
package will be omitted from this one when building it. 

◆ do_setupPanda3D()

def do_setupPanda3D (   self,
  p3dpythonName = None,
  p3dpythonwName = None 
)
A special convenience command that adds the minimum
startup modules for a panda3d package, intended for developers
producing their own custom panda3d for download.  Should be
called before any other Python modules are named. 

◆ do_setVer()

def do_setVer (   self,
  value 
)
Sets an explicit set_ver number for the package, as a tuple
of integers, or as a string of dot-separated integers. 

◆ do_sign()

def do_sign (   self,
  certificate,
  chain = None,
  pkey = None,
  password = None 
)
Signs the resulting p3d file (or package multifile) with
the indicated certificate.  If needed, the chain file should
contain the list of additional certificate authorities needed
to validate the signing certificate.  The pkey file should
contain the private key.

It is also legal for the certificate file to contain the chain
and private key embedded within it.

If the private key is encrypted, the password should be
supplied. 

◆ endPackage()

def endPackage (   self)
Closes the current package specification.  This actually
generates the package file.  Returns the finished package,
or None if the package failed to close (e.g. missing files). 

◆ findPackage()

def findPackage (   self,
  packageName,
  platform = None,
  version = None,
  host = None,
  requires = None 
)
Searches for the named package from a previous publish
operation along the install search path.

If requires is not None, it is a list of Package objects that
are already required.  The new Package object must be
compatible with the existing Packages, or an error is
returned.  This is also useful for determining the appropriate
package version to choose when a version is not specified.

Returns the Package object, or None if the package cannot be
located. 

◆ loadLdconfigCache()

def loadLdconfigCache (   self)
On GNU/Linux, runs ldconfig -p to find out where all the
libraries on the system are located.  Assumes that the platform
has already been set. 

◆ readPackageDef()

def readPackageDef (   self,
  packageDef,
  packageNames = None 
)
Reads the named .pdef file and constructs the named
packages, or all packages if packageNames is None.  Raises an
exception if the pdef file is invalid.  Returns the list of
packages constructed. 

◆ requirePackage()

def requirePackage (   self,
  package 
)
Indicates a dependency on the indicated package, supplied
as a Package object.

Attempts to install this package will implicitly install the
named package also.  Files already included in the named
package will be omitted from this one. 

◆ requirePackagesNamed()

def requirePackagesNamed (   self,
  names,
  version = None,
  host = None 
)
Indicates a dependency on the named package(s), supplied
as a name.

Attempts to install this package will implicitly install the
named package also.  Files already included in the named
package will be omitted from this one when building it. 

◆ resolveLibrary()

def resolveLibrary (   self,
  filename 
)
Resolves the given shared library filename along the executable path,
or by cross-referencing it with the library cache. 

◆ setHost()

def setHost (   self,
  host,
  downloadUrl = None,
  descriptiveName = None,
  hostDir = None,
  mirrors = None 
)
Specifies the URL that will ultimately host these
contents. 

◆ setPlatform()

def setPlatform (   self,
  platform = None 
)
Sets the platform that this Packager will compute for.  On
OSX, this can be used to specify the particular architecture
we are building; on other platforms, it is probably a mistake
to set this.

You should call this before doing anything else with the
Packager.  It's even better to pass the platform string to the
constructor.  

◆ setup()

def setup (   self)
Call this method to initialize the class after filling in
some of the values in the constructor. 

Member Data Documentation

◆ allowPackages

allowPackages

◆ allowPythonDev

allowPythonDev

◆ arch

arch

◆ binaryExtensions

binaryExtensions

◆ caseSensitive

caseSensitive

◆ contents

contents

◆ contentsSeq

contentsSeq

◆ currentPackage

currentPackage

◆ dcClientSuffixes

dcClientSuffixes

◆ encryptionKey

encryptionKey

◆ excludeSystemFiles

excludeSystemFiles

◆ excludeSystemGlobs

excludeSystemGlobs

◆ executableExtensions

executableExtensions

◆ executablePath

executablePath

◆ extractExtensions

extractExtensions

◆ host

host

◆ hosts

hosts

◆ http

http

◆ ignoreSetHost

ignoreSetHost

◆ imageExtensions

imageExtensions

◆ installDir

installDir

◆ installSearch

installSearch

◆ knownExtensions

knownExtensions

◆ libraryCache

libraryCache

◆ loader

loader

◆ loaderOptions

loaderOptions

◆ manifestExtensions

manifestExtensions

◆ maxAge

maxAge

◆ modelExtensions

modelExtensions

◆ musicManager

musicManager

◆ nonuniqueExtensions

nonuniqueExtensions

◆ notify

notify = directNotify.newCategory("Packager")
static

◆ p3dInstallDir

p3dInstallDir

◆ p3dSuffix

p3dSuffix

◆ packageList

packageList

◆ packages

packages

◆ platform

platform

◆ platformSpecificExtensions

platformSpecificExtensions

◆ prcEncryptionKey

prcEncryptionKey

◆ prcSignCommand

prcSignCommand

◆ remapExtensions

remapExtensions

◆ sfxManagerList

sfxManagerList

◆ signParams

signParams

◆ storePythonSource

storePythonSource

◆ suppressWarningForExtensions

suppressWarningForExtensions

◆ systemRoot

systemRoot

◆ textExtensions

textExtensions

◆ uncompressibleExtensions

uncompressibleExtensions

◆ unprocessedExtensions

unprocessedExtensions

◆ verbosePrint

verbosePrint