from direct.p3d.PackageInfo import PackageInfo
Deprecated since version 1.10.0: The p3d packaging system has been replaced with the new setuptools-based system. See the Distributing Panda3D Applications manual section.
- class PackageInfo(host, packageName, packageVersion, platform=None, solo=False, asMirror=False, perPlatform=False)¶
This class represents a downloadable Panda3D package file that can be (or has been) installed into the current runtime. It is the Python equivalent of the P3DPackage class in the core API.
- class InstallStep(func, bytes, factor, stepType)¶
This class is one step of the installPlan list; it represents a single atomic piece of the installation step, and the relative effort of that piece. When the plan is executed, it will call the saved function pointer here.
- __init__(self, func, bytes, factor, stepType)¶
self.__funcPtr(self) will return a generator of tokens. This function defines a new generator that yields each of those tokens, but wraps each call into the nested generator within a pair of start/stop collector calls.
Returns the relative amount of effort of this step.
Returns the progress of this step, in the range 0..1.
- UsageBasename = 'usage.xml'¶
- __init__(self, host, packageName, packageVersion, platform=None, solo=False, asMirror=False, perPlatform=False)¶
Checks the current status of the desc file and the package contents on disk.
- downloadDescFile(self, http)¶
Downloads the desc file for this particular package, synchronously, and then reads it. Returns true on success, false on failure.
- downloadDescFileGenerator(self, http)¶
A generator function that implements downloadDescFile() one piece at a time. It yields one of stepComplete, stepFailed, or stepContinue.
- downloadFactor = 1¶
- downloadPackage(self, http)¶
Downloads the package file, synchronously, then uncompresses and unpacks it. Returns true on success, false on failure.
This assumes that self.installPlans has already been filled in, which will have been done by self.__readDescFile().
- downloadPackageGenerator(self, http)¶
A generator function that implements downloadPackage() one piece at a time. It yields one of stepComplete, stepFailed, or stepContinue.
Returns the relative amount of effort it will take to download this package. The units are meaningless, except relative to other packges.
Returns the name of this package, for output to the user. This will be the “public” name of the package, as formatted for user consumption; it will include capital letters and spaces where appropriate.
Returns the directory in which this package is installed. This may not be known until the host’s contents.xml file has been downloaded, which informs us of the host’s own install directory.
Returns a rough estimate of this package’s total download effort, even if it is already downloaded.
Returns the xusage element that is read from the usage.xml file, or None if there is no usage.xml file.
Returns true if a desc file file has been successfully read for this package and is still current, false otherwise.
- installPackage(self, appRunner)¶
Mounts the package and sets up system paths so it becomes available for use. Returns true on success, false on failure.
Marks the package as having been used. This is normally called automatically by installPackage().
- notify = <direct.directnotify.Notifier.Notifier object>¶
- patchFactor = 0.01¶
- restartDownload = 3¶
This is called by the HostInfo when the package is read from contents.xml, to set up the internal filenames and such that rely on some of the information from contents.xml.
- stepComplete = 1¶
- stepContinue = 4¶
- stepFailed = 2¶
- uncompressFactor = 0.01¶
- unpackFactor = 0.01¶