Skip to content

Commit

Permalink
fix: update pinned requirements
Browse files Browse the repository at this point in the history
after pinning requirements, to avoid incompatible 2nd level
dependencies of packages, pass the -U flag
  • Loading branch information
gavindsouza committed Nov 16, 2019
1 parent 9c854c1 commit 025665a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bench/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def install_app(app, bench_path='.', verbose=False, no_cache=False):
logger.info('installing {}'.format(app))
# find_links = '--find-links={}'.format(conf.get('wheel_cache_dir')) if conf.get('wheel_cache_dir') else ''
find_links = ''
exec_cmd("{pip} install {quiet} {find_links} -e {app} {no_cache}".format(
exec_cmd("{pip} install {quiet} {find_links} -U -e {app} {no_cache}".format(
pip=os.path.join(bench_path, 'env', 'bin', 'pip'),
quiet="-q" if not verbose else "",
no_cache='--no-cache-dir' if no_cache else '',
Expand Down
4 changes: 1 addition & 3 deletions bench/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,6 @@ def update_requirements(bench_path='.'):

exec_cmd("{pip} install --upgrade pip".format(pip=pip))

apps_dir = os.path.join(bench_path, 'apps')

# Update bench requirements
bench_req_file = os.path.join(os.path.dirname(bench.__path__[0]), 'requirements.txt')
install_requirements(pip, bench_req_file)
Expand Down Expand Up @@ -504,7 +502,7 @@ def update_npm_packages(bench_path='.'):

def install_requirements(pip, req_file):
if os.path.exists(req_file):
exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
exec_cmd("{pip} install -q -U -r {req_file}".format(pip=pip, req_file=req_file))

def backup_site(site, bench_path='.'):
bench.set_frappe_version(bench_path=bench_path)
Expand Down

0 comments on commit 025665a

Please sign in to comment.