@bjia56/portable-python
Advanced tools
Comparing version 0.1.104 to 0.1.105
@@ -35,2 +35,4 @@ "use strict"; | ||
return "loongarch64"; | ||
case "ppc64": | ||
return "powerpc64le"; | ||
} | ||
@@ -56,6 +58,6 @@ return (0, os_1.arch)(); | ||
if (this.parent.distribution === "cosmo") { | ||
return `python-${this.parent.version}-cosmo-unknown`; | ||
return `python-${this.parent.version}${this.parent.abiflags}-cosmo-unknown`; | ||
} | ||
const distribution = this.parent.distribution === "auto" ? "headless" : this.parent.distribution; | ||
return `python-${distribution}-${this.parent.version}-${DL_PLATFORM}-${DL_ARCH}`; | ||
return `python-${distribution}-${this.parent.version}${this.parent.abiflags}-${DL_PLATFORM}-${DL_ARCH}`; | ||
} | ||
@@ -69,2 +71,8 @@ validateOptions() { | ||
} | ||
if (this.parent.abiflags && this.parent.abiflags != "t") { | ||
throw Error("invalid abiflags"); | ||
} | ||
if (this.parent.abiflags == "t" && this.parent.minor != "13") { | ||
throw Error("abiflags 't' is only supported for Python 3.13"); | ||
} | ||
} | ||
@@ -71,0 +79,0 @@ async postInstall() { |
@@ -8,2 +8,3 @@ import { IPortablePython, IPortablePythonOptions } from "./types"; | ||
distribution: string; | ||
abiflags: string; | ||
installDir: string; | ||
@@ -10,0 +11,0 @@ constructor(version: string, installDir?: string | null, options?: IPortablePythonOptions); |
@@ -33,2 +33,3 @@ "use strict"; | ||
distribution = "auto"; | ||
abiflags = ""; | ||
installDir = (0, path_1.dirname)(__dirname); | ||
@@ -45,8 +46,8 @@ constructor(version, installDir = null, options = {}) { | ||
} | ||
if (options.abiflags) { | ||
this.abiflags = options.abiflags; | ||
} | ||
if (!INSTALLERS.has(this.implementation)) { | ||
throw Error("invalid implementation"); | ||
} | ||
const ctor = INSTALLERS.get(this.implementation); | ||
this._installer = new ctor(this); | ||
this._installer.validateOptions(); | ||
if (installDir) { | ||
@@ -70,2 +71,5 @@ this.installDir = installDir; | ||
} | ||
const ctor = INSTALLERS.get(this.implementation); | ||
this._installer = new ctor(this); | ||
this._installer.validateOptions(); | ||
} | ||
@@ -72,0 +76,0 @@ /** |
@@ -22,2 +22,3 @@ export interface IInstallerProps { | ||
pipPath: string; | ||
abiflags: string; | ||
isInstalled(): boolean; | ||
@@ -30,2 +31,3 @@ install(zipFile: string | null): Promise<void>; | ||
distribution?: string; | ||
abiflags?: string; | ||
/** | ||
@@ -32,0 +34,0 @@ * Override the version of Python to install. For development use only. |
{ | ||
"name": "@bjia56/portable-python", | ||
"version": "0.1.104", | ||
"version": "0.1.105", | ||
"description": "Portable Python", | ||
@@ -81,3 +81,3 @@ "main": "./dist/index.js", | ||
"3.12.7": "cpython-v3.12.7-build.1", | ||
"3.13.0": "cpython-v3.13.0-beta.0" | ||
"3.13.0": "cpython-v3.13.0-build.0" | ||
} | ||
@@ -84,0 +84,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45223
608