enough-analyst-54434
11/08/2022, 12:40 AMenough-analyst-54434
11/08/2022, 12:41 AMenough-analyst-54434
11/08/2022, 12:41 AMenough-analyst-54434
11/08/2022, 12:43 AM$ PY=python3.9 ./pants package src/python/pants/bin:pants
10:56:23.81 [INFO] Completed: Building local_dists.pex
10:56:33.39 [INFO] Completed: Building 18 requirements for src.python.pants.bin/pants.pex from the 3rdparty/python/user_reqs.lock resolve: PyYAML<7.0,>=6.0, ansicolors==1.1.8, chevron==0.14.0, fasteners==0.16.3, humbug==0.2.7, ijs... (264 characters truncated)
10:56:33.42 [INFO] Wrote dist/src.python.pants.bin/pants.pex
$ mkdir scie-pants
$ cp dist/src.python.pants.bin/pants.pex scie-pants/
$ curl -fL -O <https://github.com/indygreg/python-build-standalone/releases/download/20221002/cpython-3.9.14+20221002-x86_64-unknown-linux-gnu-install_only.tar.gz>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 25.5M 100 25.5M 0 0 3897k 0 0:00:06 0:00:06 --:--:-- 5062k
$ mv cpython-3.9.14+20221002-x86_64-unknown-linux-gnu-install_only.tar.gz scie-pants/
$ curl -fL -O <https://github.com/a-scie/jump/releases/download/v0.1.10/scie-jump-linux-x86_64>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1521k 100 1521k 0 0 1300k 0 0:00:01 0:00:01 --:--:-- 2449k
$ chmod +x scie-jump-linux-x86_64
$ mv scie-jump-linux-x86_64 scie-pants/scie-jump
$ cd scie-pants/
scie-pants $ vi lift.json
$ cat lift.json
{
"scie": {
"lift": {
"name": "pants",
"boot": {
"commands": {
"": {
"env": {
"=PATH": "{cpython}/python/bin:{scie.env.PATH}"
},
"exe": "{cpython}/python/bin/python3.9",
"args": [
"{pants.pex}"
]
}
}
},
"files": [
{
"name": "cpython-3.9.14+20221002-x86_64-unknown-linux-gnu-install_only.tar.gz",
"key": "cpython"
},
{
"name": "pants.pex"
}
]
}
}
}
scie-pants $ ./scie-jump
/home/jsirois/dev/pantsbuild/pants/scie-pants/lift.json: /home/jsirois/dev/pantsbuild/pants/scie-pants/pants
Inspect what we just built:
scie-pants $ file pants
pants: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=dfa49ce2c9a49fd3e63fe07a43098dfef38bfc8b, for GNU/Linux 3.2.0, stripped
scie-pants $ zipinfo pants | tail
warning [pants]: 28319597 extra bytes at beginning or within zipfile
(attempting to process anyway)
-rw-r--r-- 2.0 unx 3668 b- defN 80-Jan-01 00:00 pants/util/osutil.py
-rw-r--r-- 2.0 unx 947 b- defN 80-Jan-01 00:00 pants/util/resources.py
-rw-r--r-- 2.0 unx 10759 b- defN 80-Jan-01 00:00 pants/util/strutil.py
-rw-r--r-- 2.0 unx 4557 b- defN 80-Jan-01 00:00 pants/util/value_interpolation.py
drwxr-xr-x 2.0 unx 0 b- defN 80-Jan-01 00:00 pants/vcs/
-rw-r--r-- 2.0 unx 0 b- defN 80-Jan-01 00:00 pants/vcs/__init__.py
-rw-r--r-- 2.0 unx 6229 b- defN 80-Jan-01 00:00 pants/vcs/changed.py
-rw-r--r-- 2.0 unx 6260 b- defN 80-Jan-01 00:00 pants/vcs/git.py
-rw-r--r-- 2.0 unx 794 b- defN 80-Jan-01 00:00 pants/version.py
3316 files, 356390776 bytes uncompressed, 68422706 bytes compressed: 80.8%
scie-pants $ tail -1 pants | jq .
{
"scie": {
"lift": {
"name": "pants",
"base": "~/.nce",
"files": [
{
"name": "cpython-3.9.14+20221002-x86_64-unknown-linux-gnu-install_only.tar.gz",
"key": "cpython",
"size": 26761725,
"hash": "e63d0c00a499e0202ba7a0f53ce69fca6d30237af39af9bc3c76bce6c7bf14d7",
"type": "tar.gz"
},
{
"name": "pants.pex",
"size": 69142851,
"hash": "c8f1bd4a7cf6a2b4f80c366ac3c77d68bb73a72310ae9ed14f829b0fe16c9c2c",
"type": "blob"
}
],
"boot": {
"commands": {
"": {
"exe": "{cpython}/python/bin/python3.9",
"args": [
"{pants.pex}"
],
"env": {
"=PATH": "{cpython}/python/bin:{scie.env.PATH}"
}
}
}
}
},
"jump": {
"size": 1557872,
"version": "0.1.10"
}
}
}
Put on scie-pants:
scie-pants $ cd ..
$ scie-pants/pants auth-acquire
11:41:30.91 [INFO] Starting: Resolving plugins: hdrhistogram, toolchain.pants.plugin==0.24.0
11:41:33.21 [INFO] Completed: Resolving plugins: hdrhistogram, toolchain.pants.plugin==0.24.0
11:41:34.35 [WARN] DEPRECATED: `pants.engine.environment.Environment` is scheduled to be removed in version 2.17.0.dev0.
Use `pants.engine.env_vars.EnvironmentVars`.
11:41:34.35 [WARN] DEPRECATED: `pants.engine.environment.EnvironmentRequest` is scheduled to be removed in version 2.17.0.dev0.
Use `pants.engine.env_vars.EnvironmentVarsRequest`.
11:41:34.36 [WARN] DEPRECATED: `pants.engine.environment.CompleteEnvironment` is scheduled to be removed in version 2.17.0.dev0.
Use `pants.engine.env_vars.CompleteEnvironmentVars`.
11:41:34.40 [INFO] Initializing scheduler...
11:41:34.46 [WARN] DEPRECATED: Setting `Goal.environment_behavior=EnvironmentBehavior.UNMIGRATED` for `Goal` `auth-acquire` is scheduled to be removed in version 2.17.0.dev0.
See <https://www.pantsbuild.org/v2.15/docs/plugin-upgrade-guide>
11:41:34.46 [WARN] DEPRECATED: Setting `Goal.environment_behavior=EnvironmentBehavior.UNMIGRATED` for `Goal` `auth-token-info` is scheduled to be removed in version 2.17.0.dev0.
See <https://www.pantsbuild.org/v2.15/docs/plugin-upgrade-guide>
11:41:34.46 [WARN] DEPRECATED: Setting `Goal.environment_behavior=EnvironmentBehavior.UNMIGRATED` for `Goal` `auth-token-check` is scheduled to be removed in version 2.17.0.dev0.
See <https://www.pantsbuild.org/v2.15/docs/plugin-upgrade-guide>
11:41:35.35 [INFO] Scheduler initialized.
Using a web browser navigate to: <https://app.toolchain.com/api/v1/token/auth/?headless=1&repo=pantsbuild%2Fpants>
Type or paste in the token exchange code: XXX
Enter token description [Gill-Windows]: Putting on my scie-pants
Access token acquired and stored.
The only asterisk is this diff was required on main just now to do this:
$ git diff
diff --git a/pants-plugins/internal_plugins/test_lockfile_fixtures/lockfile_fixture.py b/pants-plugins/internal_plugins/test_lockfile_fixtures/lockfile_fixture.py
index 08ddce60f..e3a089339 100644
--- a/pants-plugins/internal_plugins/test_lockfile_fixtures/lockfile_fixture.py
+++ b/pants-plugins/internal_plugins/test_lockfile_fixtures/lockfile_fixture.py
@@ -7,7 +7,7 @@ from dataclasses import dataclass
from pathlib import Path
from typing import Iterable
-from _pytest.fixtures import FixtureRequest
+#from _pytest.fixtures import FixtureRequest
from pants.jvm.resolve.common import ArtifactRequirement, ArtifactRequirements, Coordinate
from pants.jvm.resolve.coursier_fetch import CoursierResolvedLockfile
diff --git a/src/python/pants/bin/BUILD b/src/python/pants/bin/BUILD
index f7a96c06a..8d82db797 100644
--- a/src/python/pants/bin/BUILD
+++ b/src/python/pants/bin/BUILD
@@ -56,6 +56,7 @@ target(
"src/python/pants/backend/experimental/scala/debug_goals",
"src/python/pants/backend/experimental/scala/lint/scalafmt",
"src/python/pants/backend/experimental/terraform",
+ "src/python/pants/backend/explorer",
"src/python/pants/backend/google_cloud_function/python",
"src/python/pants/backend/plugin_development",
"src/python/pants/backend/project_info",
I think that has nothing to do with the scie-pants approach, its just PEX exposing non-hermiticity in the dev deps.enough-analyst-54434
11/08/2022, 12:45 AMenough-analyst-54434
11/08/2022, 12:45 AMwide-midnight-78598
11/08/2022, 1:24 AMwide-midnight-78598
11/08/2022, 1:25 AMhappy-kitchen-89482
11/08/2022, 1:27 AMenough-analyst-54434
11/08/2022, 1:35 AMenough-analyst-54434
11/08/2022, 1:38 AMwide-midnight-78598
11/08/2022, 1:39 AMwide-midnight-78598
11/08/2022, 1:40 AMenough-analyst-54434
11/08/2022, 1:41 AMenough-analyst-54434
11/08/2022, 1:42 AMwide-midnight-78598
11/08/2022, 1:42 AMenough-analyst-54434
11/08/2022, 1:43 AMbitter-ability-32190
11/08/2022, 2:06 AMhappy-kitchen-89482
11/08/2022, 2:45 AMenough-analyst-54434
11/08/2022, 3:07 AMenough-analyst-54434
11/08/2022, 3:12 AMwide-midnight-78598
11/08/2022, 3:22 AMFor comparison, presumably that pyox app also can't be PEXed then. This scheme will work with every PEX by definition.Not to derail a very important conversation, but to finally get this point in (spent a bunch of time fighting with xcode's schrodinger's toolchain, which was somehow both installed and not installed). In https://github.com/sureshjoshi/pants-plugins/tree/23-nested-examples, running this command illustrates what I mean about a true single-file executable (from a user's perspective).
./pants package examples/python/helloworld:helloworld-bin examples/python/hellonumpy:hellonumpy-bin
Once PyOxidized, the simple helloworld is a standalone executable, while the numpy example requires numpy's lib to be installed alongside the executable. This example is a couple versions old, so maybe the state-of-the-art is different. I guess what I'm referring to is what IndyGreg terms as "Packaging files instead of in-memory resources" (https://pyoxidizer.readthedocs.io/en/stable/pyoxidizer_packaging_additional_files.html?highlight=classified#packaging-files-in[…]in-memory-resources). Are these types of problems still a thing here?enough-analyst-54434
11/08/2022, 3:23 AMenough-analyst-54434
11/08/2022, 3:41 AM$ git diff
diff --git a/examples/python/hellonumpy/BUILD.pants b/examples/python/hellonumpy/BUILD.pants
index 4577320..aec0703 100644
--- a/examples/python/hellonumpy/BUILD.pants
+++ b/examples/python/hellonumpy/BUILD.pants
@@ -10,9 +10,8 @@ python_distribution(
),
)
-pyoxidizer_binary(
+pex_binary(
name="hellonumpy-bin",
entry_point="hellonumpy.main",
dependencies=[":hellonumpy-dist"],
- filesystem_resources=["numpy"],
)
$ ./pants package examples/python/hellonumpy:hellonumpy-bin
19:32:06.91 [INFO] Completed: List contents of artifacts produced by examples/python/hellonumpy:hellonumpy-dist
19:32:09.74 [INFO] Completed: Building local_dists.pex with 1 requirement: hellonumpy_dist-0.0.1-py3-none-any.whl
19:32:28.58 [INFO] Completed: Building 1 requirement for examples.python.hellonumpy/hellonumpy-bin.pex from the build-support/python/default_lock.txt resolve: numpy
19:32:28.60 [INFO] Wrote dist/examples.python.hellonumpy/hellonumpy-bin.pex
$ mkdir -p scie/no-snow-job
$ cp dist/examples.python.hellonumpy/hellonumpy-bin.pex scie/no-snow-job/
$ cp ~/dev/a-scie/jump/examples/python/cpython-3.9.14+20221002-x86_64-unknown-linux-gnu-install_only.tar.gz scie/no-snow-job/
$ vi scie/no-snow-job/lift.json
$ curl -sSL ^C
$ curl -sSL <https://github.com/a-scie/jump/releases/download/v0.1.11/scie-jump-linux-x86_64> > scie/no-snow-job/scie-jump
$ cd scie/no-snow-job/
scie/no-snow-job $ chmod +x scie-jump
scie/no-snow-job $ ./scie-jump
/home/jsirois/dev/a-scie/pants-plugins/scie/no-snow-job/lift.json: /home/jsirois/dev/a-scie/pants-plugins/scie/no-snow-job/pants
scie/no-snow-job $ vi lift.json
scie/no-snow-job $ rm pants
scie/no-snow-job $ cd ../..
$ cat scie/no-snow-job/lift.json
{
"scie": {
"lift": {
"name": "hellonumpy",
"boot": {
"commands": {
"": {
"env": {
"=PATH": "{cpython}/python/bin:{scie.env.PATH}"
},
"exe": "{cpython}/python/bin/python3.9",
"args": [
"{hellonumpy-bin.pex}"
]
}
}
},
"files": [
{
"name": "cpython-3.9.14+20221002-x86_64-unknown-linux-gnu-install_only.tar.gz",
"key": "cpython"
},
{
"name": "hellonumpy-bin.pex"
}
]
}
}
}
$ cd scie/no-snow-job/
scie/no-snow-job $ ./scie-jump
/home/jsirois/dev/a-scie/pants-plugins/scie/no-snow-job/lift.json: /home/jsirois/dev/a-scie/pants-plugins/scie/no-snow-job/hellonumpy
scie/no-snow-job $ file hellonumpy
hellonumpy: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=3150baa5e6c07628bc4307dd87974895dd7a3e62, for GNU/Linux 3.2.0, stripped
scie/no-snow-job $ ./hellonumpy
Launching HelloNumpy from __main__
Hello, data! [[1 2]
[3 4]]
enough-analyst-54434
11/08/2022, 3:42 AMenough-analyst-54434
11/08/2022, 3:47 AMwide-midnight-78598
11/08/2022, 1:19 PMwide-midnight-78598
11/08/2022, 1:21 PMjump
, and just threw in a use case that PyOx couldn't handle off the bat (noting that I haven't deep dived into the PyOx bug). Pex'd a kivy
app, then ran jump
on it, and it Just Works™️
Took maybe... 30 seconds of effort?enough-analyst-54434
11/08/2022, 3:38 PMwide-midnight-78598
11/08/2022, 3:39 PMwide-midnight-78598
11/08/2022, 3:48 PMPyOxidizer allows you to distribute your code as a single binary file, similar to Pex files. Unlike Pex, these binaries include a Python interpreter, often greatly simplifying distribution.
enough-analyst-54434
11/08/2022, 3:49 PMscie.lift.base
. You can see the default of ~/.nce
get filled in in the lower reified form created by the boot-pack here: https://github.com/a-scie/jump/tree/main/jump#readmeenough-analyst-54434
11/08/2022, 3:50 PMenough-analyst-54434
11/08/2022, 3:52 PMwide-midnight-78598
11/08/2022, 3:52 PMenough-analyst-54434
11/08/2022, 3:52 PMwide-midnight-78598
11/08/2022, 3:55 PMenough-analyst-54434
11/08/2022, 3:57 PMwide-midnight-78598
11/08/2022, 3:58 PMenough-analyst-54434
11/08/2022, 3:59 PMenough-analyst-54434
11/08/2022, 4:00 PMenough-analyst-54434
11/08/2022, 4:01 PMinspect
command defined here: https://github.com/a-scie/jump/blob/0e359df388da7297f4d072605e8ad1f90d132cb9/examples/python/lift.macos-x86_64.json#L18-L28wide-midnight-78598
11/08/2022, 4:05 PMFROM nginx/unit:1.25.0-python3.9
COPY ./config.json /docker-entrypoint.d/config.json
COPY apigateway.pex /apigateway.pex
RUN PEX_TOOLS=1 /apigateway.pex venv /app
# ... run some one-off database init/migration type stuff here ...
WORKDIR /app
enough-analyst-54434
11/08/2022, 4:06 PMwide-midnight-78598
11/08/2022, 4:06 PMenough-analyst-54434
11/08/2022, 4:07 PMenough-analyst-54434
11/08/2022, 4:08 PMwide-midnight-78598
11/08/2022, 4:09 PMenough-analyst-54434
11/08/2022, 4:09 PMancient-vegetable-10556
11/08/2022, 4:14 PMwide-midnight-78598
11/08/2022, 4:15 PMancient-vegetable-10556
11/08/2022, 4:15 PMancient-vegetable-10556
11/08/2022, 4:16 PM__file__
all over the place, and oxidized-importer famously does not set that variable, because it’s non-sensicalenough-analyst-54434
11/08/2022, 4:16 PMenough-analyst-54434
11/08/2022, 4:17 PMenough-analyst-54434
11/08/2022, 4:17 PMancient-vegetable-10556
11/08/2022, 4:17 PMenough-analyst-54434
11/08/2022, 4:17 PMancient-vegetable-10556
11/08/2022, 4:18 PM__file__
set, then why should anything else?ancient-vegetable-10556
11/08/2022, 4:18 PMenough-analyst-54434
11/08/2022, 4:18 PMenough-analyst-54434
11/08/2022, 4:18 PMenough-analyst-54434
11/08/2022, 4:19 PMwide-midnight-78598
11/08/2022, 4:21 PMancient-vegetable-10556
11/08/2022, 4:22 PMenough-analyst-54434
11/08/2022, 4:22 PMenough-analyst-54434
11/08/2022, 4:23 PMancient-vegetable-10556
11/08/2022, 4:24 PMenough-analyst-54434
11/08/2022, 4:24 PMenough-analyst-54434
11/08/2022, 4:25 PMancient-vegetable-10556
11/08/2022, 4:25 PMenough-analyst-54434
11/08/2022, 4:26 PMenough-analyst-54434
11/08/2022, 4:26 PMenough-analyst-54434
11/08/2022, 4:27 PMancient-vegetable-10556
11/08/2022, 4:27 PMenough-analyst-54434
11/08/2022, 4:27 PMenough-analyst-54434
11/08/2022, 4:29 PMancient-vegetable-10556
11/08/2022, 4:30 PMancient-vegetable-10556
11/08/2022, 4:31 PMwide-midnight-78598
11/09/2022, 5:45 AMwebview.start()
was called, but "nothing" happens. No webview launched, no windows launched - just kinda sits there. It was another example of something PyOx fails to build, because of __ file__
The webview debugger appears to suggest we have started/launched a webview ([pywebview] Using Cocoa
), and my activity manager shows that the desired URL is part of the networking stack, so something is definitely happening, but nothing is popping up on screen.
The pex
file works on its own, no problemenough-analyst-54434
11/09/2022, 5:57 AMSCIE=inspect ./your_scie
enough-analyst-54434
11/09/2022, 5:57 AMenough-analyst-54434
11/09/2022, 5:57 AMenough-analyst-54434
11/09/2022, 5:58 AMenough-analyst-54434
11/09/2022, 5:58 AMenough-analyst-54434
11/09/2022, 5:59 AMenough-analyst-54434
11/09/2022, 6:01 AMwide-midnight-78598
11/09/2022, 6:03 AMwide-midnight-78598
11/09/2022, 6:03 AMenough-analyst-54434
11/09/2022, 6:04 AMenough-analyst-54434
11/09/2022, 6:05 AMwide-midnight-78598
11/09/2022, 6:05 AMenough-analyst-54434
11/09/2022, 6:05 AMenough-analyst-54434
11/09/2022, 6:05 AMwide-midnight-78598
11/09/2022, 6:06 AMwide-midnight-78598
11/09/2022, 6:08 AMenough-analyst-54434
11/09/2022, 6:09 AMwide-midnight-78598
11/09/2022, 6:09 AMcpython-3.9.14+20221002-x86_64-apple-darwin-install_only.tar.gz
- unpacked that and ran it against the pex using the command line args, just as a sanity. Works fine, which I didn't expect.enough-analyst-54434
11/09/2022, 6:10 AMwide-midnight-78598
11/09/2022, 6:10 AM{
"scie": {
"lift": {
"name": "hellowebview",
"base": "~/.nce",
"files": [
{
"name": "cpython-3.9.14+20221002-x86_64-apple-darwin-install_only.tar.gz",
"key": "cpython",
"size": 17138819,
"hash": "b7d3a1f4b57e9350571ccee49c82f503133de0d113a2dbaebc8ccf108fb3fe1b",
"type": "tar.gz"
},
{
"name": "hellowebview-bin.pex",
"size": 3262176,
"hash": "a598744b565968520973431c93c32a34827e5dabf7e460053ecdb1c4d2316460",
"type": "blob"
}
],
"boot": {
"commands": {
"": {
"exe": "{cpython}/python/bin/python3.9",
"args": [
"{hellowebview-bin.pex}"
],
"env": {
"=PATH": "{cpython}/python/bin:{scie.env.PATH}"
}
}
}
}
},
"jump": {
"size": 1433008,
"version": "0.1.10"
}
}
}
enough-analyst-54434
11/09/2022, 6:11 AMenough-analyst-54434
11/09/2022, 6:11 AMenough-analyst-54434
11/09/2022, 6:11 AMwide-midnight-78598
11/09/2022, 6:12 AMenough-analyst-54434
11/09/2022, 6:12 AMenough-analyst-54434
11/09/2022, 6:12 AMwide-midnight-78598
11/09/2022, 6:13 AMenough-analyst-54434
11/09/2022, 6:13 AMenough-analyst-54434
11/09/2022, 6:24 AMenough-analyst-54434
11/09/2022, 6:26 AMenough-analyst-54434
11/09/2022, 6:27 AMwide-midnight-78598
11/09/2022, 6:36 AMenough-analyst-54434
11/09/2022, 7:41 AM$ hyperfine -w2 './pants -V' './scie-pants -V'
Benchmark 1: ./pants -V
Time (mean ± σ): 688.2 ms ± 26.6 ms [User: 562.5 ms, System: 25.7 ms]
Range (min … max): 661.2 ms … 751.4 ms 10 runs
Benchmark 2: ./scie-pants -V
Time (mean ± σ): 480.4 ms ± 19.2 ms [User: 423.0 ms, System: 15.9 ms]
Range (min … max): 466.6 ms … 532.3 ms 10 runs
Summary
'./scie-pants -V' ran
1.43 ± 0.08 times faster than './pants -V'
So, apparently, the ./pants
bash script has ~150ms of overhead. I confirmed this adding in a timing using date
inside the script in the 1st line and just before the exec at the bottom:
$ ./pants -V
.145963213
2.14.0
So that's a surprising - to me - early win. I basically write off bash as very fast in my head, but 150ms is alot.enough-analyst-54434
11/09/2022, 7:55 AM$ hyperfine -w2 '~/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py39/bin/pants -V' './scie-pants -V'
Benchmark 1: ~/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py39/bin/pants -V
Time (mean ± σ): 500.3 ms ± 30.2 ms [User: 439.2 ms, System: 12.2 ms]
Range (min … max): 483.2 ms … 584.7 ms 10 runs
Benchmark 2: ./scie-pants -V
Time (mean ± σ): 455.3 ms ± 4.6 ms [User: 398.3 ms, System: 17.2 ms]
Range (min … max): 448.5 ms … 463.7 ms 10 runs
Summary
'./scie-pants -V' ran
1.10 ± 0.07 times faster than '~/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py39/bin/pants -V'
wide-midnight-78598
11/09/2022, 12:55 PMYour Python installation has never been so simple. And fast:https://gregoryszorc.com/blog/2022/05/10/announcing-the-pyoxy-python-runner/ 🤷should be a few milliseconds faster to initialize a Python interpreter mostly because ofpyoxy
and it avoiding filesystem overhead to look for and loadoxidized_importer
files..py[c]
wide-midnight-78598
11/09/2022, 12:56 PMwide-midnight-78598
11/09/2022, 1:00 PMenough-analyst-54434
11/09/2022, 3:19 PMhappy-kitchen-89482
11/09/2022, 3:33 PMpants
is surprising to mewide-midnight-78598
11/09/2022, 3:57 PM150ms inKinda tracks with what I saw when messing around with shell completions (trying to see if dynamic completions made sense). It's like 60ms just to run thisis surprising to mepants
python="$(determine_python_exe "${pants_version}")"
to return my homebrew python3.9 instance, 20ms to determine_pants_version
, and then 40 on bootstrap_pants
(trying to remember numbers off the top of my head)
Mac mini, 6-core i5wide-midnight-78598
11/09/2022, 4:03 PMpython_major_minor_version="$(get_python_major_minor_version "${python}")"
- which I thought could be cached from the determine_python_exe
step.happy-kitchen-89482
11/09/2022, 5:44 PMwitty-crayon-22786
11/09/2022, 6:21 PMscie
in the pantsbuild
org (although obviously John reserves the right to put it somewhere else), and in favor of trying to use it for Pants.
as he pointed out: it’s not a ton of code, and what it does is massively simpler than what PEX needs to do. so i suspect that we could all come up to speed on it fairly quickly.ancient-vegetable-10556
11/09/2022, 6:22 PMenough-analyst-54434
11/09/2022, 6:32 PMenough-analyst-54434
11/09/2022, 6:33 PMbitter-ability-32190
11/09/2022, 6:35 PMenough-analyst-54434
11/09/2022, 6:36 PMhappy-kitchen-89482
11/09/2022, 7:53 PMancient-vegetable-10556
11/09/2022, 7:53 PMhappy-kitchen-89482
11/09/2022, 7:54 PMancient-vegetable-10556
11/09/2022, 7:54 PMwide-midnight-78598
11/09/2022, 7:54 PMhappy-kitchen-89482
11/09/2022, 7:54 PMenough-analyst-54434
11/09/2022, 9:39 PMancient-vegetable-10556
11/09/2022, 9:39 PMenough-analyst-54434
11/09/2022, 9:40 PMenough-analyst-54434
11/09/2022, 9:42 PMenough-analyst-54434
11/09/2022, 9:44 PMhttps://perk.uno/go/gogo.jpg▾
enough-analyst-54434
12/12/2022, 10:33 PM