Changeset 9459


Ignore:
Timestamp:
Nov 30, 2014 9:19:10 PM (4 years ago)
Author:
wehart
Message:

Bug fixes:

. Detecting recursive calls to pyomo_install, and don't

cleanup if the pyomo_install execution is an inner call.

. Adding a flag during pip installation to force the

installation, even if pip has been installed on the system.
This ensures that pip is available in the temporary
directory in a well-known location.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyomo/trunk/scripts/pyomo_install

    r9458 r9459  
    2626
    2727if os.environ.get('PYOMO_INSTALL_TEMPDIR', None) is None:
     28    pyomo_install_recursion = False
    2829    pyomo_install_tempdir = tempfile.mkdtemp()
    2930    os.environ['PYOMO_INSTALL_TEMPDIR'] = pyomo_install_tempdir
    3031else:
     32    pyomo_install_recursion = True
    3133    pyomo_install_tempdir = os.environ['PYOMO_INSTALL_TEMPDIR']
    3234keep_tempdir = False
     
    1798217984        # Execute the included pip and use it to install the latest pip and
    1798317985        # setuptools from PyPI
    17984         cmd = ['install', '--root=%s' % pyomo_install_tempdir]
     17986        cmd = ['install', '--root=%s' % pyomo_install_tempdir, '--force-reinstall']
    1798517987        if quiet:
    1798617988            cmd.append('-q')
     
    1803618038        main()
    1803718039    finally:
    18038         if keep_tempdir:
    18039             print("\nKeeping the temporary directory: "+pyomo_install_tempdir)
    18040             print("")
    18041         else:
    18042             rmtree(pyomo_install_tempdir)
     18040        if not pyomo_install_recursion:
     18041            if keep_tempdir:
     18042                print("\nKeeping the temporary directory: "+pyomo_install_tempdir)
     18043                print("")
     18044            else:
     18045                rmtree(pyomo_install_tempdir)
    1804318046
Note: See TracChangeset for help on using the changeset viewer.