Before running my python program, I have to install many separated requirements.txt. I developed a script that installs this files but it takes too long, and I think that merging all of them in one requirements.txt would speed up the installation. Maybe I could develop a script that does the merge but I don't know if there is another way.
- Do you know any solution that merges multiple requirements.txt in one file?
- Do you think it would improve the performance?
My current code:
#!/bin/bash
for d in /opt/myprogram/mymodules/*/; do
if [ -f "$d/requirements.txt" ]; then
echo "Installing $d requirements"
pip install -r "$d""requirements.txt" --upgrade-strategy only-if-needed
else
echo "WARNING! $d has no requirements"
fi
done