silly-byte-14207
11/05/2021, 10:29 PMscrapy runspider myproj/spider/myspider.py
but now I've got:
python_library()
pex_binary(
name="bin",
entry_point="scrapy.cmdline:execute"
)
which will execute scrapy but I can't figure how to pass the runspider myproj/spider/myspider.py
Question 2: Is there a python plugin (or command I missed) that will generate a virtualenv for local development? In the example above I can use pants to generate a pex, but can I use pants to build a virtualenv so I can hack on the project as well? I know I can take a pex and turn that into a virtualenv but was wondering if this is built inhundreds-father-404
11/05/2021, 10:41 PMscript="scrapy"
on the pex_binary
, and it will be like you're running scrapy
normally on the CLI
To start with trying things out, you could do this:
pex_binary(
name="scrapy",
dependencies=["//:scrapy"], # or `3rdparty/python:scrapy` etc
script="scrapy",
)
Then ./pants package
, and run the resulting PEX directly on your codehundreds-father-404
11/05/2021, 10:43 PMsilly-byte-14207
11/05/2021, 10:44 PMsilly-byte-14207
11/05/2021, 10:45 PM