Commit bd969589 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-restore: fix dry-run output, use >= instead of =

parent 339a1f3f
...@@ -63,12 +63,12 @@ __epm_restore_pip() ...@@ -63,12 +63,12 @@ __epm_restore_pip()
if echo "$l" | grep -q "#egg=" ; then if echo "$l" | grep -q "#egg=" ; then
t="$(echo "$l" | sed -e "s|.*#egg=||" -e "s|\[.*||" | __epm_filter_pip_to_rpm)" t="$(echo "$l" | sed -e "s|.*#egg=||" -e "s|\[.*||" | __epm_filter_pip_to_rpm)"
else else
echo " skipping URL $l ..." warning " skipping URL $l ..."
continue continue
fi fi
fi fi
if echo "$l" | grep -q "; *python_version *< *'3.0'" ; then if echo "$l" | grep -q "; *python_version *< *'3.0'" ; then
echo " $t is python2 only requirement, skipped" warning " $t is python2 only requirement, skipped"
continue continue
fi fi
if [ -n "$dryrun" ] ; then if [ -n "$dryrun" ] ; then
...@@ -77,10 +77,11 @@ __epm_restore_pip() ...@@ -77,10 +77,11 @@ __epm_restore_pip()
for sign in "<=" "<" ">=" ">" "==" "!="; do for sign in "<=" "<" ">=" ">" "==" "!="; do
ll=$(fill_sign "$sign" "$l") ll=$(fill_sign "$sign" "$l")
[ -n "$ll" ] || continue [ -n "$ll" ] || continue
[ "$sign" = "==" ] && sign="=" [ "$sign" = "==" ] && sign=">="
[ "$sign" = "!=" ] && sign=">=" [ "$sign" = "!=" ] && sign=">="
pi="$pi [ -n "$pi" ] && pi="$pi
%py3_use $t $sign $ll" "
pi="$pi%py3_use $t $sign $ll"
done done
[ -n "$pi" ] || pi="%py3_use $t" [ -n "$pi" ] || pi="%py3_use $t"
echo "$pi" echo "$pi"
...@@ -147,6 +148,8 @@ epm_restore() ...@@ -147,6 +148,8 @@ epm_restore()
return return
fi fi
# TODO: nowhere works: python3 setup.py --requires
# if run with empty args # if run with empty args
for i in requirements.txt Gemfile requires.txt; do for i in requirements.txt Gemfile requires.txt; do
__epm_restore_by $i __epm_restore_by $i
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment