https://pantsbuild.org/ logo
#general
Title
# general
c

cool-yacht-37128

10/29/2022, 11:28 PM
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

wide-midnight-78598

10/30/2022, 12:07 AM
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

cool-yacht-37128

10/30/2022, 12:12 AM
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

wide-midnight-78598

10/30/2022, 12:41 AM
hmm, okay - I actually thought I had a flask example in there too - I guess not, which is surprising
c

cool-yacht-37128

10/30/2022, 12:45 AM
tbh I should just make the switch to fastapi, trying to learn only one thing at a time though 🙂
w

wide-midnight-78598

10/30/2022, 12:46 AM
fastapi
is great!!!
8 Views