@@ -1645,6 +1645,16 @@ function setup_develop {
16451645 setup_package_with_req_sync $project_dir -e
16461646}
16471647
1648+ # determine if a project as specified by directory is in
1649+ # projects.txt. This will not be an exact match because we throw away
1650+ # the namespacing when we clone, but it should be good enough in all
1651+ # practical ways.
1652+ function is_in_projects_txt {
1653+ local project_dir=$1
1654+ local project_name=$(basename $project_dir)
1655+ return grep "/$project_name\$" $REQUIREMENTS_DIR/projects.txt >/dev/null
1656+ }
1657+
16481658# ``pip install -e`` the package, which processes the dependencies
16491659# using pip before running `setup.py develop`
16501660#
@@ -1663,8 +1673,19 @@ function setup_package_with_req_sync {
16631673 local update_requirements=$(cd $project_dir && git diff --exit-code >/dev/null || echo "changed")
16641674
16651675 if [[ $update_requirements != "changed" ]]; then
1666- (cd $REQUIREMENTS_DIR; \
1667- python update.py $project_dir)
1676+ if [[ "$REQUIREMENTS_MODE" == "soft" ]]; then
1677+ if is_in_projects_txt $project_dir; then
1678+ (cd $REQUIREMENTS_DIR; \
1679+ python update.py $project_dir)
1680+ else
1681+ # soft update projects not found in requirements project.txt
1682+ (cd $REQUIREMENTS_DIR; \
1683+ python update.py -s $project_dir)
1684+ fi
1685+ else
1686+ (cd $REQUIREMENTS_DIR; \
1687+ python update.py $project_dir)
1688+ fi
16681689 fi
16691690
16701691 setup_package $project_dir $flags
0 commit comments