First time using pyoxidizer functionality so excus...
# general
c
First time using pyoxidizer functionality so excuse the possibly dumb question. I'm trying to setup a very simple example with flask. Repo here: https://github.com/SergeBakharev/pants-example/ It packages okay, but I get a traceback (attached) when running which leads me to believe that flask requires the flaskapp to be on the filesystem and not in memory. I see the
filesystem_resources
option on the
pyoxidizer_binary
target but I can't get it to store a first-party module on the file system. How should I be referencing it?
Untitled.txt
I've tried referencing it by the
python_artifact
name without success
Untitled.txt
^^^ thats the pants error I get when setting
filesystem_resources=["flask_api_server"],
w
I'll try to look at this shortly. Does this help at all? It's
fastapi
, but I think packaging might be similar. There are some other plugins there which might be useful in that repo. https://github.com/sureshjoshi/pants-plugins/tree/main/hellofastapi When I get back to my computer, I'll try to take a closer look (hopefully tonight, if possible)
You mayyy have to use a custom pyox config file
c
I did actually see your repo, but fastapi doesn't have the same file origin issue as flask. Appreciate you having a look, no urgency at all on this one. Just thought there might something simple I missed
w
hmm, okay - I actually thought I had a flask example in there too - I guess not, which is surprising
c
tbh I should just make the switch to fastapi, trying to learn only one thing at a time though 🙂
w
fastapi
is great!!!