pinokiod 3.2.229 → 3.2.231

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/kernel/shell.js +25 -25
  2. package/package.json +1 -1
package/kernel/shell.js CHANGED
@@ -715,13 +715,13 @@ class Shell {
715
715
  if (params.venv) {
716
716
  let env_path
717
717
  let python_version = ""
718
- // let use_uv = false
718
+ let use_uv = false
719
719
  if (typeof params.venv === "string") {
720
720
  env_path = path.resolve(params.path, params.venv)
721
721
  if (params.venv_python) {
722
722
  if (isNumber(params.venv_python)) {
723
723
  python_version = ` --python ${params.venv_python}`
724
- // use_uv = true
724
+ use_uv = true
725
725
  }
726
726
  }
727
727
  } else if (typeof params.venv === "object" && params.venv.path) {
@@ -729,7 +729,7 @@ class Shell {
729
729
  if (params.venv.python) {
730
730
  if (isNumber(params.venv.python)) {
731
731
  python_version = ` --python ${params.venv.python}`
732
- // use_uv = true
732
+ use_uv = true
733
733
  }
734
734
  }
735
735
  }
@@ -738,21 +738,21 @@ class Shell {
738
738
  let deactivate_path = (this.platform === 'win32' ? path.resolve(env_path, "Scripts", "deactivate") : "deactivate")
739
739
  let env_exists = await this.exists(env_path)
740
740
  if (env_exists) {
741
- // if (use_uv) {
741
+ if (use_uv) {
742
742
  venv_activation = [
743
- `uv venv ${env_path}${python_version}`,
743
+ `python -m venv --upgrade ${env_path}`,
744
+ (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
745
+ timeout,
746
+ ]
747
+ } else {
748
+ venv_activation = [
749
+ `python -m venv --upgrade ${env_path}`,
744
750
  (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
745
751
  timeout,
746
752
  ]
747
- // } else {
748
- // venv_activation = [
749
- // `python -m venv ${env_path}`,
750
- // (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
751
- // timeout,
752
- // ]
753
- // }
753
+ }
754
754
  } else {
755
- // if (use_uv) {
755
+ if (use_uv) {
756
756
  // when python version is specified as venv.python => use uv
757
757
  venv_activation = [
758
758
  `uv venv ${env_path}${python_version}`,
@@ -763,18 +763,18 @@ class Shell {
763
763
  (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
764
764
  timeout,
765
765
  ]
766
- // } else {
767
- // // when python version is not specified, use the default python -m venv
768
- // venv_activation = [
769
- // `python -m venv ${env_path}`,
770
- // (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
771
- // `python -m pip install --upgrade pip setuptools wheel`,
772
- // deactivate_path,
773
- // timeout,
774
- // (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
775
- // timeout,
776
- // ]
777
- // }
766
+ } else {
767
+ // when python version is not specified, use the default python -m venv
768
+ venv_activation = [
769
+ `python -m venv ${env_path}`,
770
+ (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
771
+ `python -m pip install --upgrade pip setuptools wheel`,
772
+ deactivate_path,
773
+ timeout,
774
+ (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
775
+ timeout,
776
+ ]
777
+ }
778
778
  }
779
779
  } else {
780
780
  venv_activation = []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.229",
3
+ "version": "3.2.231",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {