unstructured/scripts/pip-compile.sh
Yao You 69265685ea
build(deps): add makefile to requirements (#1295)
This PR resolves #1294 by adding a Makefile to compile requirements.
This makefile respects the dependencies between file and will compile
them in order. E.g., extra-*.txt will be compiled __after__ base.txt is
updated.

Test locally by simply running `make pip-compile` or `cd requirements &&
make clean && make all`

---------

Co-authored-by: qued <64741807+qued@users.noreply.github.com>
2023-11-02 10:17:35 -05:00

17 lines
405 B
Bash
Executable File

#!/usr/bin/env bash
# python version must match lowest supported (3.8)
major=3
minor=8
if ! python -c "import sys; assert sys.version_info.major == $major and sys.version_info.minor == $minor"; then
echo "python version not equal to expected $major.$minor: $(python --version)"
exit 1
fi
pushd ./requirements || exit
make clean
make all
popd || exit
cp requirements/build.txt docs/requirements.txt