TIBCO Spotfire® Service Python Installation and Administration

SPK Versioning

To share packages among data function authors in your organization, you can create the file <your-filename>.spk containing the packages to distribute to others. You might need to change or update the packages or package versions that you distribute, which requires changing the version of the SPK containing the packages.

You can create or change a Spotfire SPK using the steps described in Creating a Spotfire Package for Python Packages from a Windows Computer. The package spotfire.spk creates a new SPK using the versioning rule details for the following tasks.
Note:
  • Python package versions shared among team members must be kept synchronized.
  • You can install multiple SPKs containing Python packages on the Spotfire Server, as long as each SPK has a unique name and ID.
  • Uploading a new SPK overwrites any older version of that same SPK that was previously deployed.
Table 1. Versioning rules
Task Procedure Version result Version example Comment
Generating a new requirements.txt. Pass the new requirements.txt to the Python script. The version is always set to 1.0.0.0 by default. 1.0.0.0 The script overwrites the old SPK, and the list contains only the packages you provide in requirements.txt.
Recreating a new requirements.txt using the same version. (That is, you do not need to increment or keep the older requirements.txt.) Regenerate the SPK, passing the new requirements.txt to the Python script. The version is always set to 1.0.0.0 by default. 1.0.0.0 Spotfire Server does not register the package as a new one, so it does not distribute the package to the users.
Adding package names to an existing requirements.txt. Edit the requirements.txt, and then pass it to the Python script. The version is incremented to a minor version number. 1.1.0.0 The script overwrites the old SPK, and the list contains only the packages you provide in requirements.txt.

Spotfire Server registers the SPK as changed and distributes it to the users.

Removing package names from an existing requirements.txt. Edit the requirements.txt, and then pass it to the Python script. The version is incremented to a major version number. 2.0.0.0 The script overwrites the old SPK, and the list contains only the packages you provide in requirements.txt.

Spotfire Server registers the SPK as changed and distributes it to the users.

Assigning a specific version number to a requirements.txt. Run the Python script and pass in the requirements.txt in the command, along with the version, setting it to the version you want. The version number is set to the value provided in the argument 1.2.3.4 The version argument must be passed as a string containing four components (for example, "--version = 1.2.3.4" or "-v 1.2.3.4").