better-van-82973
05/31/2023, 5:06 PMcmd1 && cmd2
)? Currently I have a binary definition that looks like this:
pex_binary(
name="scrapy",
script="scrapy",
dependencies=[
":config",
":poetry#Scrapy",
"//:poetry#spacy",
"scraper/src/py/scraper/scripts:lib",
"scraper/src/py/scraper/scripts:shell_scripts",
],
environment="linux_docker",
# Optimal settings for Docker builds
layout="packed",
execution_mode="venv",
)
But I want to run another command prior to running scrapy
for setup like so:
python -m spacy download en_core_web_sm && scrapy <args>
My current plan is to create a shell script that downloads the spaCy model and then runs scrapy, and use that as the entry_point
for the PEX - is that the right way to tackle this problem? Or is there a better solution?enough-analyst-54434
05/31/2023, 5:13 PMbetter-van-82973
05/31/2023, 5:14 PMenough-analyst-54434
05/31/2023, 5:15 PMwide-midnight-78598
05/31/2023, 5:15 PMwide-midnight-78598
05/31/2023, 5:15 PMenough-analyst-54434
05/31/2023, 5:16 PMwide-midnight-78598
05/31/2023, 5:16 PMenough-analyst-54434
05/31/2023, 5:17 PMbetter-van-82973
05/31/2023, 5:19 PMenough-analyst-54434
05/31/2023, 5:21 PMenough-analyst-54434
05/31/2023, 5:22 PMx && y
.enough-analyst-54434
05/31/2023, 5:23 PMbetter-van-82973
05/31/2023, 5:33 PM