We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Let's drop support for Python 2.6
I don't see any meaningful reason to continue support for Python2.6, but let's start a conversation here about this possible change.

I've seen evidence that we're spending time supporting this version of Python without deriving any meaningful utility.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 #  ___________________________________________________________________________
2 #
3 #  Pyomo: Python Optimization Modeling Objects
4 #  Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
5 #  Under the terms of Contract DE-NA0003525 with National Technology and
6 #  Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
7 #  rights in this software.
8 #  This software is distributed under the 3-clause BSD License.
9 #  ___________________________________________________________________________
10 
11 """
12 Script to generate the installer for pyomo.
13 """
14 
15 import sys
16 import os
17 
18 
19 def _find_packages(path):
20     """
21     Generate a list of nested packages
22     """
23     pkg_list = []
24     if not os.path.exists(path):
25         return []
26     if not os.path.exists(path+os.sep+"__init__.py"):
27         return []
28     else:
29         pkg_list.append(path)
30     for root, dirs, files in os.walk(path, topdown=True):
31         if root in pkg_list and "__init__.py" in files:
32             for name in dirs:
33                 if os.path.exists(root+os.sep+name+os.sep+"__init__.py"):
34                     pkg_list.append(root+os.sep+name)
35     return [pkg for pkg in map(lambda x:x.replace(os.sep, "."), pkg_list)]
36 
37 
38 def read(*rnames):
39     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
40 
41 requires = [
42     'PyUtilib>=5.6.3',
43     'appdirs',
44     'ply',
45     'six>=1.4',
46     ]
47 if sys.version_info < (2, 7):
48     requires.append('argparse')
49     requires.append('unittest2')
50     requires.append('ordereddict')
51 
52 from setuptools import setup
53 packages = _find_packages('pyomo')
54 
55 setup(name='Pyomo',
56       #
57       # Note: trunk should have *next* major.minor
58       #     VOTD and Final releases will have major.minor.revnum
59       #
60       # When cutting a release, ALSO update _major/_minor/_revnum in
61       #
62       #     pyomo/pyomo/version/__init__.py
63       #     pyomo/RELEASE.txt
64       #
65       version='5.5.1',
66       maintainer='William E. Hart',
67       maintainer_email='wehart@sandia.gov',
68       url='http://pyomo.org',
69       license='BSD',
70       platforms=["any"],
71       description='Pyomo: Python Optimization Modeling Objects',
72       long_description=read('README.txt'),
73       classifiers=[
74         'Development Status :: 5 - Production/Stable',
75         'Intended Audience :: End Users/Desktop',
76         'Intended Audience :: Science/Research',
77         'License :: OSI Approved :: BSD License',
78         'Natural Language :: English',
79         'Operating System :: MacOS',
80         'Operating System :: Microsoft :: Windows',
81         'Operating System :: Unix',
82         'Programming Language :: Python',
83         'Programming Language :: Python :: 2',
84         'Programming Language :: Python :: 2.6',
85         'Programming Language :: Python :: 2.7',
86         'Programming Language :: Python :: 3',
87         'Programming Language :: Python :: 3.4',
88         'Programming Language :: Python :: 3.5',
89         'Programming Language :: Python :: 3.6',
90         'Programming Language :: Python :: Implementation :: CPython',
91         'Programming Language :: Python :: Implementation :: Jython',
92         'Programming Language :: Python :: Implementation :: PyPy',
93         'Topic :: Scientific/Engineering :: Mathematics',
94         'Topic :: Software Development :: Libraries :: Python Modules' ],
95       packages=packages,
96       keywords=['optimization'],
97       install_requires=requires,
98       entry_points="""
99         [console_scripts]
100         runbenders=pyomo.pysp.benders:Benders_main
101         evaluate_xhat=pyomo.pysp.evaluate_xhat:EvaluateXhat_main
102         runph=pyomo.pysp.phinit:PH_main
103         runef=pyomo.pysp.ef_writer_script:main
104         phsolverserver=pyomo.pysp.phsolverserver:main
105         scenariotreeserver=pyomo.pysp.scenariotree.server_pyro:main
106         computeconf=pyomo.pysp.computeconf:main
107 
108         results_schema=pyomo.scripting.commands:results_schema
109         pyro_mip_server = pyomo.scripting.pyro_mip_server:main
110         test.pyomo = pyomo.scripting.runtests:runPyomoTests
111         pyomo = pyomo.scripting.pyomo_main:main
112         pyomo_ns = pyomo.scripting.commands:pyomo_ns
113         pyomo_nsc = pyomo.scripting.commands:pyomo_nsc
114         kill_pyro_mip_servers = pyomo.scripting.commands:kill_pyro_mip_servers
115         launch_pyro_mip_servers = pyomo.scripting.commands:launch_pyro_mip_servers
116         readsol = pyomo.scripting.commands:readsol
117         OSSolverService = pyomo.scripting.commands:OSSolverService
118         pyomo_python = pyomo.scripting.commands:pyomo_python
119         pyomo_old=pyomo.scripting.pyomo_command:main
120         get_pyomo_extras = scripts.get_pyomo_extras:main
121 
122         [pyomo.command]
123         pyomo.runbenders=pyomo.pysp.benders
124         pyomo.evaluate_xhat=pyomo.pysp.evaluate_xhat
125         pyomo.runph=pyomo.pysp.phinit
126         pyomo.runef=pyomo.pysp.ef_writer_script
127         pyomo.phsolverserver=pyomo.pysp.phsolverserver
128         pyomo.scenariotreeserver=pyomo.pysp.scenariotree.server_pyro
129         pyomo.computeconf=pyomo.pysp.computeconf
130 
131         pyomo.help = pyomo.scripting.driver_help
132         pyomo.test.pyomo = pyomo.scripting.runtests
133         pyomo.pyro_mip_server = pyomo.scripting.pyro_mip_server
134         pyomo.results_schema=pyomo.scripting.commands
135       """
136       )
137
```

Path: `admin/jenkins.py`
Content:
```
1 #  ___________________________________________________________________________
2 #
3 #  Pyomo: Python Optimization Modeling Objects
4 #  Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
5 #  Under the terms of Contract DE-NA0003525 with National Technology and 
6 #  Engineering Solutions of Sandia, LLC, the U.S. Government retains certain 
7 #  rights in this software.
8 #  This software is distributed under the 3-clause BSD License.
9 #  ___________________________________________________________________________
10 
11 import glob
12 import sys
13 import os
14 import subprocess
15 try:
16     from subprocess import check_output as _run_cmd
17 except:
18     # python 2.6
19     from subprocess import check_call as _run_cmd
20 import driver
21 
22 config = sys.argv[1]
23 hname = os.uname()[1]
24 hname = hname.split('.')[0]
25 
26 print("\nStarting jenkins.py")
27 print("Configuration=%s" % config)
28 
29 os.environ['CONFIGFILE'] = os.environ['WORKSPACE']+'/src/pyomo/admin/config.ini'
30 #
31 # Is the following even needed?
32 #
33 if 'PYTHONPATH' in os.environ:
34     os.environ['PYTHONPATH'] += os.environ['WORKSPACE'] + os.pathsep + os.environ['PYTHONPATH']
35 else:
36     os.environ['PYTHONPATH'] = os.environ['WORKSPACE']
37 sys.path.append(os.environ['WORKSPACE'])
38 
39 sys.argv = ['dummy', '--trunk', '--source', 'src', '-a', 'pyyaml']
40 
41 #
42 # Machine-specific configurations
43 #
44 #if hname == "snotra":
45 #    ### snotra configuration is now handled through local module files
46 #
47 
48 
49 if 'LD_LIBRARY_PATH' not in os.environ:
50     os.environ['LD_LIBRARY_PATH'] = ""
51 
52 print("\nPython version: %s" % sys.version)
53 print("\nSystem PATH:\n\t%s" % os.environ['PATH'])
54 print("\nPython path:\n\t%s" % sys.path)
55 
56 coverage_omit=','.join([
57     os.sep.join([os.environ['WORKSPACE'], 'src', 'pyomo', 'pyomo', '*', 'tests']),
58     'pyomo.*.tests',
59     os.sep.join([os.environ['WORKSPACE'], 'src', 'pyutilib.*']),
60     'pyutilib.*',
61 ])
62 
63 pyomo_packages = [
64     'pyomo.%s' % os.path.basename(x) for x in
65     glob.glob(os.path.join(
66             os.environ['WORKSPACE'], 'src', 'pyomo', 'pyomo', '*' ))
67     if os.path.isdir(x) ]
68 
69 if config == "notests":
70     driver.perform_install('pyomo', config='pyomo_all.ini')
71 
72 elif config == "default":
73     driver.perform_build('pyomo', coverage=True, omit=coverage_omit, config='pyomo_all.ini')
74 
75 elif config == "core":
76     # Install
77     print("-" * 60)
78     print("Installing Pyomo")
79     print("-" * 60)
80     driver.perform_install('pyomo', config='pyomo_all.ini')
81     print("-" * 60)
82     print("Running 'pyomo install-extras' ...")
83     print("-" * 60)
84     if _run_cmd is subprocess.check_call:
85         _run_cmd("python/bin/pyomo install-extras", shell=True)
86     elif _run_cmd is subprocess.check_output:
87         output = _run_cmd("python/bin/pyomo install-extras", shell=True)
88         print(output.decode('ascii'))
89     else:
90         assert False
91     # Test
92     os.environ['TEST_PACKAGES'] = ' '.join([
93             'pyomo.checker','pyomo.core','pyomo.environ','pyomo.opt',
94             'pyomo.repn','pyomo.scripting','pyomo.solvers','pyomo.util',
95             'pyomo.version'])
96     print("-" * 60)
97     print("Performing tests")
98     print("-" * 60)
99     driver.perform_tests('pyomo', coverage=True, omit=coverage_omit)
100 
101 elif config == "nonpysp":
102     os.environ['TEST_PACKAGES'] = ' '.join(
103         x for x in pyomo_packages if x != 'pyomo.pysp' )
104     driver.perform_build('pyomo', coverage=True, omit=coverage_omit, config='pyomo_all.ini')
105 
106 elif config == "parallel":
107     os.environ['NOSE_PROCESS_TIMEOUT'] = '1800' # 30 minutes
108     driver.perform_build('pyomo', cat='parallel', coverage=True, omit=coverage_omit, config='pyomo_all.ini')
109 
110 elif config == "expensive":
111     driver.perform_build('pyomo',
112         cat='expensive', coverage=True, omit=coverage_omit,
113         virtualenv_args=sys.argv[1:])
114 
115 elif config == "booktests" or config == "book":
116     # Install
117     driver.perform_install('pyomo', config='pyomo_all.ini')
118     print("Running 'pyomo install-extras' ...")
119     if _run_cmd is subprocess.check_call:
120         output = _run_cmd("python/bin/python src/pyomo/scripts/get_pyomo_extras.py -v", shell=True)
121     elif _run_cmd is subprocess.check_output:
122         output = _run_cmd("python/bin/python src/pyomo/scripts/get_pyomo_extras.py -v", shell=True)
123         print(output.decode('ascii'))
124     else:
125         assert False
126     # Test
127     os.environ['NOSE_PROCESS_TIMEOUT'] = '1800'
128     driver.perform_tests('pyomo', cat='book')
129 
130 elif config == "perf":
131     os.environ['NOSE_PROCESS_TIMEOUT'] = '1800'
132     driver.perform_build('pyomo', cat='performance')
133 
134
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/admin/jenkins.py b/admin/jenkins.py
--- a/admin/jenkins.py
+++ b/admin/jenkins.py
@@ -12,11 +12,7 @@
 import sys
 import os
 import subprocess
-try:
-    from subprocess import check_output as _run_cmd
-except:
-    # python 2.6
-    from subprocess import check_call as _run_cmd
+from subprocess import check_output as _run_cmd
 import driver
 
 config = sys.argv[1]
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -81,7 +81,6 @@
         'Operating System :: Unix',
         'Programming Language :: Python',
         'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
         'Programming Language :: Python :: 3.4',
@@ -95,6 +94,7 @@
       packages=packages,
       keywords=['optimization'],
       install_requires=requires,
+      python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
       entry_points="""
         [console_scripts]
         runbenders=pyomo.pysp.benders:Benders_main

{"golden_diff": "diff --git a/admin/jenkins.py b/admin/jenkins.py\n--- a/admin/jenkins.py\n+++ b/admin/jenkins.py\n@@ -12,11 +12,7 @@\n import sys\n import os\n import subprocess\n-try:\n-    from subprocess import check_output as _run_cmd\n-except:\n-    # python 2.6\n-    from subprocess import check_call as _run_cmd\n+from subprocess import check_output as _run_cmd\n import driver\n \n config = sys.argv[1]\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -81,7 +81,6 @@\n         'Operating System :: Unix',\n         'Programming Language :: Python',\n         'Programming Language :: Python :: 2',\n-        'Programming Language :: Python :: 2.6',\n         'Programming Language :: Python :: 2.7',\n         'Programming Language :: Python :: 3',\n         'Programming Language :: Python :: 3.4',\n@@ -95,6 +94,7 @@\n       packages=packages,\n       keywords=['optimization'],\n       install_requires=requires,\n+      python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n       entry_points=\"\"\"\n         [console_scripts]\n         runbenders=pyomo.pysp.benders:Benders_main\n", "issue": "Let's drop support for Python 2.6\nI don't see any meaningful reason to continue support for Python2.6, but let's start a conversation here about this possible change.\r\n\r\nI've seen evidence that we're spending time supporting this version of Python without deriving any meaningful utility.\n", "before_files": [{"content": "#  ___________________________________________________________________________\n#\n#  Pyomo: Python Optimization Modeling Objects\n#  Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n#  Under the terms of Contract DE-NA0003525 with National Technology and\n#  Engineering Solutions of Sandia, LLC, the U.S. Government retains certain\n#  rights in this software.\n#  This software is distributed under the 3-clause BSD License.\n#  ___________________________________________________________________________\n\n\"\"\"\nScript to generate the installer for pyomo.\n\"\"\"\n\nimport sys\nimport os\n\n\ndef _find_packages(path):\n    \"\"\"\n    Generate a list of nested packages\n    \"\"\"\n    pkg_list = []\n    if not os.path.exists(path):\n        return []\n    if not os.path.exists(path+os.sep+\"__init__.py\"):\n        return []\n    else:\n        pkg_list.append(path)\n    for root, dirs, files in os.walk(path, topdown=True):\n        if root in pkg_list and \"__init__.py\" in files:\n            for name in dirs:\n                if os.path.exists(root+os.sep+name+os.sep+\"__init__.py\"):\n                    pkg_list.append(root+os.sep+name)\n    return [pkg for pkg in map(lambda x:x.replace(os.sep, \".\"), pkg_list)]\n\n\ndef read(*rnames):\n    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()\n\nrequires = [\n    'PyUtilib>=5.6.3',\n    'appdirs',\n    'ply',\n    'six>=1.4',\n    ]\nif sys.version_info < (2, 7):\n    requires.append('argparse')\n    requires.append('unittest2')\n    requires.append('ordereddict')\n\nfrom setuptools import setup\npackages = _find_packages('pyomo')\n\nsetup(name='Pyomo',\n      #\n      # Note: trunk should have *next* major.minor\n      #     VOTD and Final releases will have major.minor.revnum\n      #\n      # When cutting a release, ALSO update _major/_minor/_revnum in\n      #\n      #     pyomo/pyomo/version/__init__.py\n      #     pyomo/RELEASE.txt\n      #\n      version='5.5.1',\n      maintainer='William E. Hart',\n      maintainer_email='wehart@sandia.gov',\n      url='http://pyomo.org',\n      license='BSD',\n      platforms=[\"any\"],\n      description='Pyomo: Python Optimization Modeling Objects',\n      long_description=read('README.txt'),\n      classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: End Users/Desktop',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: BSD License',\n        'Natural Language :: English',\n        'Operating System :: MacOS',\n        'Operating System :: Microsoft :: Windows',\n        'Operating System :: Unix',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.6',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: Implementation :: CPython',\n        'Programming Language :: Python :: Implementation :: Jython',\n        'Programming Language :: Python :: Implementation :: PyPy',\n        'Topic :: Scientific/Engineering :: Mathematics',\n        'Topic :: Software Development :: Libraries :: Python Modules' ],\n      packages=packages,\n      keywords=['optimization'],\n      install_requires=requires,\n      entry_points=\"\"\"\n        [console_scripts]\n        runbenders=pyomo.pysp.benders:Benders_main\n        evaluate_xhat=pyomo.pysp.evaluate_xhat:EvaluateXhat_main\n        runph=pyomo.pysp.phinit:PH_main\n        runef=pyomo.pysp.ef_writer_script:main\n        phsolverserver=pyomo.pysp.phsolverserver:main\n        scenariotreeserver=pyomo.pysp.scenariotree.server_pyro:main\n        computeconf=pyomo.pysp.computeconf:main\n\n        results_schema=pyomo.scripting.commands:results_schema\n        pyro_mip_server = pyomo.scripting.pyro_mip_server:main\n        test.pyomo = pyomo.scripting.runtests:runPyomoTests\n        pyomo = pyomo.scripting.pyomo_main:main\n        pyomo_ns = pyomo.scripting.commands:pyomo_ns\n        pyomo_nsc = pyomo.scripting.commands:pyomo_nsc\n        kill_pyro_mip_servers = pyomo.scripting.commands:kill_pyro_mip_servers\n        launch_pyro_mip_servers = pyomo.scripting.commands:launch_pyro_mip_servers\n        readsol = pyomo.scripting.commands:readsol\n        OSSolverService = pyomo.scripting.commands:OSSolverService\n        pyomo_python = pyomo.scripting.commands:pyomo_python\n        pyomo_old=pyomo.scripting.pyomo_command:main\n        get_pyomo_extras = scripts.get_pyomo_extras:main\n\n        [pyomo.command]\n        pyomo.runbenders=pyomo.pysp.benders\n        pyomo.evaluate_xhat=pyomo.pysp.evaluate_xhat\n        pyomo.runph=pyomo.pysp.phinit\n        pyomo.runef=pyomo.pysp.ef_writer_script\n        pyomo.phsolverserver=pyomo.pysp.phsolverserver\n        pyomo.scenariotreeserver=pyomo.pysp.scenariotree.server_pyro\n        pyomo.computeconf=pyomo.pysp.computeconf\n\n        pyomo.help = pyomo.scripting.driver_help\n        pyomo.test.pyomo = pyomo.scripting.runtests\n        pyomo.pyro_mip_server = pyomo.scripting.pyro_mip_server\n        pyomo.results_schema=pyomo.scripting.commands\n      \"\"\"\n      )\n", "path": "setup.py"}, {"content": "#  ___________________________________________________________________________\n#\n#  Pyomo: Python Optimization Modeling Objects\n#  Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n#  Under the terms of Contract DE-NA0003525 with National Technology and \n#  Engineering Solutions of Sandia, LLC, the U.S. Government retains certain \n#  rights in this software.\n#  This software is distributed under the 3-clause BSD License.\n#  ___________________________________________________________________________\n\nimport glob\nimport sys\nimport os\nimport subprocess\ntry:\n    from subprocess import check_output as _run_cmd\nexcept:\n    # python 2.6\n    from subprocess import check_call as _run_cmd\nimport driver\n\nconfig = sys.argv[1]\nhname = os.uname()[1]\nhname = hname.split('.')[0]\n\nprint(\"\\nStarting jenkins.py\")\nprint(\"Configuration=%s\" % config)\n\nos.environ['CONFIGFILE'] = os.environ['WORKSPACE']+'/src/pyomo/admin/config.ini'\n#\n# Is the following even needed?\n#\nif 'PYTHONPATH' in os.environ:\n    os.environ['PYTHONPATH'] += os.environ['WORKSPACE'] + os.pathsep + os.environ['PYTHONPATH']\nelse:\n    os.environ['PYTHONPATH'] = os.environ['WORKSPACE']\nsys.path.append(os.environ['WORKSPACE'])\n\nsys.argv = ['dummy', '--trunk', '--source', 'src', '-a', 'pyyaml']\n\n#\n# Machine-specific configurations\n#\n#if hname == \"snotra\":\n#    ### snotra configuration is now handled through local module files\n#\n\n\nif 'LD_LIBRARY_PATH' not in os.environ:\n    os.environ['LD_LIBRARY_PATH'] = \"\"\n\nprint(\"\\nPython version: %s\" % sys.version)\nprint(\"\\nSystem PATH:\\n\\t%s\" % os.environ['PATH'])\nprint(\"\\nPython path:\\n\\t%s\" % sys.path)\n\ncoverage_omit=','.join([\n    os.sep.join([os.environ['WORKSPACE'], 'src', 'pyomo', 'pyomo', '*', 'tests']),\n    'pyomo.*.tests',\n    os.sep.join([os.environ['WORKSPACE'], 'src', 'pyutilib.*']),\n    'pyutilib.*',\n])\n\npyomo_packages = [\n    'pyomo.%s' % os.path.basename(x) for x in\n    glob.glob(os.path.join(\n            os.environ['WORKSPACE'], 'src', 'pyomo', 'pyomo', '*' ))\n    if os.path.isdir(x) ]\n\nif config == \"notests\":\n    driver.perform_install('pyomo', config='pyomo_all.ini')\n\nelif config == \"default\":\n    driver.perform_build('pyomo', coverage=True, omit=coverage_omit, config='pyomo_all.ini')\n\nelif config == \"core\":\n    # Install\n    print(\"-\" * 60)\n    print(\"Installing Pyomo\")\n    print(\"-\" * 60)\n    driver.perform_install('pyomo', config='pyomo_all.ini')\n    print(\"-\" * 60)\n    print(\"Running 'pyomo install-extras' ...\")\n    print(\"-\" * 60)\n    if _run_cmd is subprocess.check_call:\n        _run_cmd(\"python/bin/pyomo install-extras\", shell=True)\n    elif _run_cmd is subprocess.check_output:\n        output = _run_cmd(\"python/bin/pyomo install-extras\", shell=True)\n        print(output.decode('ascii'))\n    else:\n        assert False\n    # Test\n    os.environ['TEST_PACKAGES'] = ' '.join([\n            'pyomo.checker','pyomo.core','pyomo.environ','pyomo.opt',\n            'pyomo.repn','pyomo.scripting','pyomo.solvers','pyomo.util',\n            'pyomo.version'])\n    print(\"-\" * 60)\n    print(\"Performing tests\")\n    print(\"-\" * 60)\n    driver.perform_tests('pyomo', coverage=True, omit=coverage_omit)\n\nelif config == \"nonpysp\":\n    os.environ['TEST_PACKAGES'] = ' '.join(\n        x for x in pyomo_packages if x != 'pyomo.pysp' )\n    driver.perform_build('pyomo', coverage=True, omit=coverage_omit, config='pyomo_all.ini')\n\nelif config == \"parallel\":\n    os.environ['NOSE_PROCESS_TIMEOUT'] = '1800' # 30 minutes\n    driver.perform_build('pyomo', cat='parallel', coverage=True, omit=coverage_omit, config='pyomo_all.ini')\n\nelif config == \"expensive\":\n    driver.perform_build('pyomo',\n        cat='expensive', coverage=True, omit=coverage_omit,\n        virtualenv_args=sys.argv[1:])\n\nelif config == \"booktests\" or config == \"book\":\n    # Install\n    driver.perform_install('pyomo', config='pyomo_all.ini')\n    print(\"Running 'pyomo install-extras' ...\")\n    if _run_cmd is subprocess.check_call:\n        output = _run_cmd(\"python/bin/python src/pyomo/scripts/get_pyomo_extras.py -v\", shell=True)\n    elif _run_cmd is subprocess.check_output:\n        output = _run_cmd(\"python/bin/python src/pyomo/scripts/get_pyomo_extras.py -v\", shell=True)\n        print(output.decode('ascii'))\n    else:\n        assert False\n    # Test\n    os.environ['NOSE_PROCESS_TIMEOUT'] = '1800'\n    driver.perform_tests('pyomo', cat='book')\n\nelif config == \"perf\":\n    os.environ['NOSE_PROCESS_TIMEOUT'] = '1800'\n    driver.perform_build('pyomo', cat='performance')\n\n", "path": "admin/jenkins.py"}], "after_files": [{"content": "#  ___________________________________________________________________________\n#\n#  Pyomo: Python Optimization Modeling Objects\n#  Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n#  Under the terms of Contract DE-NA0003525 with National Technology and\n#  Engineering Solutions of Sandia, LLC, the U.S. Government retains certain\n#  rights in this software.\n#  This software is distributed under the 3-clause BSD License.\n#  ___________________________________________________________________________\n\n\"\"\"\nScript to generate the installer for pyomo.\n\"\"\"\n\nimport sys\nimport os\n\n\ndef _find_packages(path):\n    \"\"\"\n    Generate a list of nested packages\n    \"\"\"\n    pkg_list = []\n    if not os.path.exists(path):\n        return []\n    if not os.path.exists(path+os.sep+\"__init__.py\"):\n        return []\n    else:\n        pkg_list.append(path)\n    for root, dirs, files in os.walk(path, topdown=True):\n        if root in pkg_list and \"__init__.py\" in files:\n            for name in dirs:\n                if os.path.exists(root+os.sep+name+os.sep+\"__init__.py\"):\n                    pkg_list.append(root+os.sep+name)\n    return [pkg for pkg in map(lambda x:x.replace(os.sep, \".\"), pkg_list)]\n\n\ndef read(*rnames):\n    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()\n\nrequires = [\n    'PyUtilib>=5.6.3',\n    'appdirs',\n    'ply',\n    'six>=1.4',\n    ]\nif sys.version_info < (2, 7):\n    requires.append('argparse')\n    requires.append('unittest2')\n    requires.append('ordereddict')\n\nfrom setuptools import setup\npackages = _find_packages('pyomo')\n\nsetup(name='Pyomo',\n      #\n      # Note: trunk should have *next* major.minor\n      #     VOTD and Final releases will have major.minor.revnum\n      #\n      # When cutting a release, ALSO update _major/_minor/_revnum in\n      #\n      #     pyomo/pyomo/version/__init__.py\n      #     pyomo/RELEASE.txt\n      #\n      version='5.5.1',\n      maintainer='William E. Hart',\n      maintainer_email='wehart@sandia.gov',\n      url='http://pyomo.org',\n      license='BSD',\n      platforms=[\"any\"],\n      description='Pyomo: Python Optimization Modeling Objects',\n      long_description=read('README.txt'),\n      classifiers=[\n        'Development Status :: 5 - Production/Stable',\n        'Intended Audience :: End Users/Desktop',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: BSD License',\n        'Natural Language :: English',\n        'Operating System :: MacOS',\n        'Operating System :: Microsoft :: Windows',\n        'Operating System :: Unix',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: Implementation :: CPython',\n        'Programming Language :: Python :: Implementation :: Jython',\n        'Programming Language :: Python :: Implementation :: PyPy',\n        'Topic :: Scientific/Engineering :: Mathematics',\n        'Topic :: Software Development :: Libraries :: Python Modules' ],\n      packages=packages,\n      keywords=['optimization'],\n      install_requires=requires,\n      python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',\n      entry_points=\"\"\"\n        [console_scripts]\n        runbenders=pyomo.pysp.benders:Benders_main\n        evaluate_xhat=pyomo.pysp.evaluate_xhat:EvaluateXhat_main\n        runph=pyomo.pysp.phinit:PH_main\n        runef=pyomo.pysp.ef_writer_script:main\n        phsolverserver=pyomo.pysp.phsolverserver:main\n        scenariotreeserver=pyomo.pysp.scenariotree.server_pyro:main\n        computeconf=pyomo.pysp.computeconf:main\n\n        results_schema=pyomo.scripting.commands:results_schema\n        pyro_mip_server = pyomo.scripting.pyro_mip_server:main\n        test.pyomo = pyomo.scripting.runtests:runPyomoTests\n        pyomo = pyomo.scripting.pyomo_main:main\n        pyomo_ns = pyomo.scripting.commands:pyomo_ns\n        pyomo_nsc = pyomo.scripting.commands:pyomo_nsc\n        kill_pyro_mip_servers = pyomo.scripting.commands:kill_pyro_mip_servers\n        launch_pyro_mip_servers = pyomo.scripting.commands:launch_pyro_mip_servers\n        readsol = pyomo.scripting.commands:readsol\n        OSSolverService = pyomo.scripting.commands:OSSolverService\n        pyomo_python = pyomo.scripting.commands:pyomo_python\n        pyomo_old=pyomo.scripting.pyomo_command:main\n        get_pyomo_extras = scripts.get_pyomo_extras:main\n\n        [pyomo.command]\n        pyomo.runbenders=pyomo.pysp.benders\n        pyomo.evaluate_xhat=pyomo.pysp.evaluate_xhat\n        pyomo.runph=pyomo.pysp.phinit\n        pyomo.runef=pyomo.pysp.ef_writer_script\n        pyomo.phsolverserver=pyomo.pysp.phsolverserver\n        pyomo.scenariotreeserver=pyomo.pysp.scenariotree.server_pyro\n        pyomo.computeconf=pyomo.pysp.computeconf\n\n        pyomo.help = pyomo.scripting.driver_help\n        pyomo.test.pyomo = pyomo.scripting.runtests\n        pyomo.pyro_mip_server = pyomo.scripting.pyro_mip_server\n        pyomo.results_schema=pyomo.scripting.commands\n      \"\"\"\n      )\n", "path": "setup.py"}, {"content": "#  ___________________________________________________________________________\n#\n#  Pyomo: Python Optimization Modeling Objects\n#  Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n#  Under the terms of Contract DE-NA0003525 with National Technology and \n#  Engineering Solutions of Sandia, LLC, the U.S. Government retains certain \n#  rights in this software.\n#  This software is distributed under the 3-clause BSD License.\n#  ___________________________________________________________________________\n\nimport glob\nimport sys\nimport os\nimport subprocess\nfrom subprocess import check_output as _run_cmd\nimport driver\n\nconfig = sys.argv[1]\nhname = os.uname()[1]\nhname = hname.split('.')[0]\n\nprint(\"\\nStarting jenkins.py\")\nprint(\"Configuration=%s\" % config)\n\nos.environ['CONFIGFILE'] = os.environ['WORKSPACE']+'/src/pyomo/admin/config.ini'\n#\n# Is the following even needed?\n#\nif 'PYTHONPATH' in os.environ:\n    os.environ['PYTHONPATH'] += os.environ['WORKSPACE'] + os.pathsep + os.environ['PYTHONPATH']\nelse:\n    os.environ['PYTHONPATH'] = os.environ['WORKSPACE']\nsys.path.append(os.environ['WORKSPACE'])\n\nsys.argv = ['dummy', '--trunk', '--source', 'src', '-a', 'pyyaml']\n\n#\n# Machine-specific configurations\n#\n#if hname == \"snotra\":\n#    ### snotra configuration is now handled through local module files\n#\n\n\nif 'LD_LIBRARY_PATH' not in os.environ:\n    os.environ['LD_LIBRARY_PATH'] = \"\"\n\nprint(\"\\nPython version: %s\" % sys.version)\nprint(\"\\nSystem PATH:\\n\\t%s\" % os.environ['PATH'])\nprint(\"\\nPython path:\\n\\t%s\" % sys.path)\n\ncoverage_omit=','.join([\n    os.sep.join([os.environ['WORKSPACE'], 'src', 'pyomo', 'pyomo', '*', 'tests']),\n    'pyomo.*.tests',\n    os.sep.join([os.environ['WORKSPACE'], 'src', 'pyutilib.*']),\n    'pyutilib.*',\n])\n\npyomo_packages = [\n    'pyomo.%s' % os.path.basename(x) for x in\n    glob.glob(os.path.join(\n            os.environ['WORKSPACE'], 'src', 'pyomo', 'pyomo', '*' ))\n    if os.path.isdir(x) ]\n\nif config == \"notests\":\n    driver.perform_install('pyomo', config='pyomo_all.ini')\n\nelif config == \"default\":\n    driver.perform_build('pyomo', coverage=True, omit=coverage_omit, config='pyomo_all.ini')\n\nelif config == \"core\":\n    # Install\n    print(\"-\" * 60)\n    print(\"Installing Pyomo\")\n    print(\"-\" * 60)\n    driver.perform_install('pyomo', config='pyomo_all.ini')\n    print(\"-\" * 60)\n    print(\"Running 'pyomo install-extras' ...\")\n    print(\"-\" * 60)\n    if _run_cmd is subprocess.check_call:\n        _run_cmd(\"python/bin/pyomo install-extras\", shell=True)\n    elif _run_cmd is subprocess.check_output:\n        output = _run_cmd(\"python/bin/pyomo install-extras\", shell=True)\n        print(output.decode('ascii'))\n    else:\n        assert False\n    # Test\n    os.environ['TEST_PACKAGES'] = ' '.join([\n            'pyomo.checker','pyomo.core','pyomo.environ','pyomo.opt',\n            'pyomo.repn','pyomo.scripting','pyomo.solvers','pyomo.util',\n            'pyomo.version'])\n    print(\"-\" * 60)\n    print(\"Performing tests\")\n    print(\"-\" * 60)\n    driver.perform_tests('pyomo', coverage=True, omit=coverage_omit)\n\nelif config == \"nonpysp\":\n    os.environ['TEST_PACKAGES'] = ' '.join(\n        x for x in pyomo_packages if x != 'pyomo.pysp' )\n    driver.perform_build('pyomo', coverage=True, omit=coverage_omit, config='pyomo_all.ini')\n\nelif config == \"parallel\":\n    os.environ['NOSE_PROCESS_TIMEOUT'] = '1800' # 30 minutes\n    driver.perform_build('pyomo', cat='parallel', coverage=True, omit=coverage_omit, config='pyomo_all.ini')\n\nelif config == \"expensive\":\n    driver.perform_build('pyomo',\n        cat='expensive', coverage=True, omit=coverage_omit,\n        virtualenv_args=sys.argv[1:])\n\nelif config == \"booktests\" or config == \"book\":\n    # Install\n    driver.perform_install('pyomo', config='pyomo_all.ini')\n    print(\"Running 'pyomo install-extras' ...\")\n    if _run_cmd is subprocess.check_call:\n        output = _run_cmd(\"python/bin/python src/pyomo/scripts/get_pyomo_extras.py -v\", shell=True)\n    elif _run_cmd is subprocess.check_output:\n        output = _run_cmd(\"python/bin/python src/pyomo/scripts/get_pyomo_extras.py -v\", shell=True)\n        print(output.decode('ascii'))\n    else:\n        assert False\n    # Test\n    os.environ['NOSE_PROCESS_TIMEOUT'] = '1800'\n    driver.perform_tests('pyomo', cat='book')\n\nelif config == \"perf\":\n    os.environ['NOSE_PROCESS_TIMEOUT'] = '1800'\n    driver.perform_build('pyomo', cat='performance')\n\n", "path": "admin/jenkins.py"}]}