Repositories/EigenverftModule/PythonRuntime.json

{
  "$schema": "./eigenverft-module-package-definition-1.2.schema.json",
  "schemaVersion": "1.2",
  "id": "PythonRuntime",
  "display": {
    "default": {
      "name": "Python",
      "publisher": "Python Software Foundation",
      "corporation": "Python Software Foundation",
      "summary": "Portable Python runtime from the official NuGet package"
    }
  },
  "packageTargets": [
    {
      "id": "PythonRuntime-win-x64-stable",
      "channel": "stable",
      "platformTarget": "win-x64",
      "constraints": {
        "os": [
          "windows"
        ],
        "cpu": [
          "x64"
        ]
      },
      "versionSelection": {
        "strategy": "latestByVersion",
        "allowPrerelease": false
      },
      "artifactDefaults": {
        "fileNameTemplate": "python.{version}.nupkg",
        "artifactSources": [
          {
            "kind": "packageDepot",
            "searchOrder": 100,
            "verification": {
              "mode": "optional"
            }
          },
          {
            "kind": "download",
            "sourceId": "pythonNuGetPackage",
            "sourcePath": "python/{version}/python.{version}.nupkg",
            "searchOrder": 900,
            "verification": {
              "mode": "required"
            }
          }
        ]
      }
    },
    {
      "id": "PythonRuntime-win-arm64-stable",
      "channel": "stable",
      "platformTarget": "win-arm64",
      "constraints": {
        "os": [
          "windows"
        ],
        "cpu": [
          "arm64"
        ]
      },
      "versionSelection": {
        "strategy": "latestByVersion",
        "allowPrerelease": false
      },
      "artifactDefaults": {
        "fileNameTemplate": "pythonarm64.{version}.nupkg",
        "artifactSources": [
          {
            "kind": "packageDepot",
            "searchOrder": 100,
            "verification": {
              "mode": "optional"
            }
          },
          {
            "kind": "download",
            "sourceId": "pythonNuGetPackage",
            "sourcePath": "pythonarm64/{version}/pythonarm64.{version}.nupkg",
            "searchOrder": 900,
            "verification": {
              "mode": "required"
            }
          }
        ]
      }
    }
  ],
  "versionCatalog": [
    {
      "version": "3.13.13",
      "channels": [
        "stable"
      ],
      "artifactsByTarget": {
        "PythonRuntime-win-x64-stable": {
          "releaseId": "python-runtime-win-x64-stable",
          "contentHash": {
            "algorithm": "sha256",
            "value": "c2347c2975f661b2dafceacc94218dfe87781955a3cd309c633d343b8c8dac31"
          }
        },
        "PythonRuntime-win-arm64-stable": {
          "releaseId": "python-runtime-win-arm64-stable",
          "contentHash": {
            "algorithm": "sha256",
            "value": "2a0406b834d4ff33414f70597b67797466ba2344baa534ab8f62c4eae1c3e599"
          }
        }
      },
      "releaseTag": "3.13.13"
    }
  ],
  "discovery": {
    "files": [
      "python.exe"
    ],
    "directories": [
      "Lib/site-packages/pip"
    ],
    "commands": [
      {
        "name": "python",
        "relativePath": "python.exe",
        "required": true,
        "exposed": true,
        "stateChecks": [
          {
            "arguments": [
              "--version"
            ],
            "outputPattern": "(?m)^Python\\s+(?<value>\\d+\\.\\d+\\.\\d+)\\s*$",
            "expectedValue": "{version}"
          },
          {
            "arguments": [
              "-m",
              "pip",
              "--version"
            ],
            "outputPattern": "(?m)^pip\\s+(?<value>\\d+\\.\\d+(?:\\.\\d+)?(?:[-+][0-9A-Za-z.\\-]+)?)\\s+from\\s+.+$"
          }
        ]
      }
    ],
    "apps": [],
    "metadataFiles": [],
    "signatures": [],
    "fileDetails": [],
    "registry": []
  },
  "stateDiscovery": {
    "installed": {
      "enableDetection": false,
      "searchLocations": [],
      "installRootRules": []
    }
  },
  "upstreamSources": {
    "pythonNuGetPackage": {
      "kind": "download",
      "baseUri": "https://api.nuget.org/v3-flatcontainer/"
    }
  },
  "packageOperations": {
    "shared": {
      "ownershipPolicy": {
        "allowAdoptExternal": false,
        "upgradeAdoptedInstall": false,
        "requirePackageOwnership": true
      },
      "compatibility": {
        "checks": [
          {
            "kind": "osVersion",
            "operator": ">=",
            "value": "10.0"
          }
        ]
      }
    },
    "assigned": {
      "kind": "expandArchive",
      "installDirectory": "python-runtime/{channel}/{version}/{platformTarget}",
      "pathRegistration": {
        "mode": "user",
        "source": {
          "kind": "shim",
          "use": "discovery.commands"
        }
      },
      "expandedRoot": "tools",
      "createDirectories": [],
      "installedStateCheck": {
        "use": "discovery",
        "expectedVersion": "{version}",
        "require": {
          "files": true,
          "directories": true,
          "commands": true,
          "apps": false,
          "metadataFiles": false,
          "signatures": false,
          "fileDetails": false,
          "registry": false
        }
      },
      "versionUpdatePolicy": {
        "whenAssigned": "trackSelectedVersion",
        "onSameSelectedVersion": "reuseOrRepair",
        "onNewSelectedVersion": "replacePackageOwnedInstall"
      }
    },
    "removed": {
      "operation": {
        "kind": "deleteInstallDirectory"
      },
      "verifyAbsent": {
        "use": "discovery",
        "require": {
          "files": true,
          "directories": false,
          "commands": true,
          "apps": false,
          "metadataFiles": false,
          "signatures": false,
          "fileDetails": false,
          "registry": false
        }
      },
      "cleanup": {
        "inventory": true,
        "shims": true,
        "path": true,
        "workDirectories": true
      }
    }
  }
}