pinokiod 3.2.227 → 3.2.229

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 +28 -19
  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,34 +738,43 @@ 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
- venv_activation = [
742
- (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
743
- timeout,
744
- ]
745
- } else {
746
- if (use_uv) {
747
- // when python version is specified as venv.python => use uv
741
+ // if (use_uv) {
748
742
  venv_activation = [
749
743
  `uv venv ${env_path}${python_version}`,
750
744
  (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
751
- `uv pip install --upgrade pip setuptools wheel`,
752
- deactivate_path,
753
- timeout,
754
- (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
755
745
  timeout,
756
746
  ]
757
- } else {
758
- // when python version is not specified, use the default python -m venv
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
+ // }
754
+ } else {
755
+ // if (use_uv) {
756
+ // when python version is specified as venv.python => use uv
759
757
  venv_activation = [
760
- `python -m venv ${env_path}`,
758
+ `uv venv ${env_path}${python_version}`,
761
759
  (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
762
- `python -m pip install --upgrade pip setuptools wheel`,
760
+ `uv pip install --upgrade pip setuptools wheel`,
763
761
  deactivate_path,
764
762
  timeout,
765
763
  (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
766
764
  timeout,
767
765
  ]
768
- }
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
+ // }
769
778
  }
770
779
  } else {
771
780
  venv_activation = []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.227",
3
+ "version": "3.2.229",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {