<@U04S45AHA> Does Science currently have full supp...
# development
w
@enough-analyst-54434 Does Science currently have full support for
bindings
? Want to make sure I'm not jumping the gun before I start debugging this
ERROR: No file named :hellofastapi.pex is stored in this scie.
Copy code
...
[[lift.files]]
name = ":hellofastapi-pex"

[[lift.commands]]
exe = "{scie.bindings.venv}/venv/bin/uvicorn"
args = [ "hellofastapi.main:app",]
description = "The FastAPI executable."

[[lift.bindings]]
exe = "#{cpython:python}"
args = [ "{:hellofastapi.pex}", "venv", "--bin-path", "prepend", "--compile", "--rm", "all", "{scie.bindings}/venv",]
name = "venv"
description = "Installs HelloFastAPI into a venv and pre-compiles .pyc"

[lift.bindings.env]
default = { "=PATH" = "{cpython}/python/bin:{scie.env.PATH}", "PEX_TOOLS" = "1", "PEX_ROOT" = "{scie.bindings}/pex_root" }
Running that same pex as a regular command in this form, works great:
Copy code
[[lift.files]]
name = ":hellofastapi-pex"

[[lift.commands]]
exe = "#{cpython:python}"
args = [
    "{:hellofastapi-pex}",
]
e
Where do you define #cpython?
You don't define an interpreter.
Every aspect of scie-jump works fwiw.
e
PATH looks suspect next then: https://github.com/sureshjoshi/pants-plugins/blob/15cd74b1ad70b03752b3fdf8736966e78e0d5660/examples/python/hellofastapi/hellofastapi.toml#L49 Since files defined by science are #{} addressed and {} just pass through to scie-jump. 1st just try axing that env.
I'll have time to look at this proper instead of guessing from my phone later today.
w
The env was new, I was assuming that missing the env was the problem. However, I'll try with some hashes and see if that solves this for me
Sigh... Goddamn it. One of the references was a
.
instead of a
-
e
Aha. Yeah - the error messages are not awesome.
I think your env is a noop: https://github.com/a-scie/lift/blob/4568bd3068c6e0a7aad6a36022261961ef71268c/science/config.py#L159-L168 Its subkeys of default, replace, remove, remove_re.
I'll be finishing off the doc my next stint 26th+.
w
Yep, I had
default
in there on my previous iteration, but was trying this out to see if that was solving any problems. Going to revert