pyscript-cli icon indicating copy to clipboard operation
pyscript-cli copied to clipboard

Add support for reading dependencies from pyproject.toml / requirements.txt?

Open imbev opened this issue 3 years ago • 3 comments

imbev avatar May 17 '22 02:05 imbev

Hi @imbev, Could you provide some description about this? Thanks,

rilma avatar Jul 29 '22 06:07 rilma

It would be useful if dependencies of the wrapped script could be specified and added to the html file via pyproject.toml or requirements.txt .

The syntax might be something like pyscript wrap <filename.py> --require pyproject.toml

imbev avatar Jul 29 '22 13:07 imbev

Hi! Thanks for the idea, I was thinking about something similar. Essentially, I also think it would be nice to generate <py-env> section from requirements.txt, pyproject.toml, or environment.yml.

I haven't had time to look into how this mapping would work, as the version constraint syntax is slightly different between pip, poetry, conda, etc. We would need to take these into account when generating the <py-env> section from a file.

mattkram avatar Aug 08 '22 22:08 mattkram