-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add utility script for resyncing pipenv
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# This script is a hack to keep a pipenv lock synced with our pip-compile files | ||
# It injects dynamic optional dependencies into our pyproject.toml (currently incompatible | ||
# with any non-dynamic dependencies in setuptools 74) and generates the lock file | ||
# | ||
|
||
TOP_DIR=$(git rev-parse --show-toplevel) | ||
# Strip comments | ||
sed -i '/^\s&*#/d' $TOP_DIR/pydatalab/requirements/*.txt | ||
cd $TOP_DIR/pydatalab && pipenv install -r requirements/requirements-all.txt && pipenv install -r requirements/requirements-all-dev.txt --dev | ||
# Reset Pipfile, which will now have all deps inlined | ||
cd $TOP_DIR/pydatalab && git checkout requirements |