diff --git a/.appveyor.yml b/.appveyor.yml index b1b66437dc3..f6fb2b6f36d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,8 +4,7 @@ environment: # For Python versions available on Appveyor, see # http://www.appveyor.com/docs/installed-software#python - # The list here is complete (excluding Python 2.6, which - # isn't covered by this document) at the time of writing. + # The list here is complete at the time of writing. - PYTHON_VERSION: 2.7 #PYTHON: "C:\\Python27" @@ -78,7 +77,6 @@ install: - conda config --set auto_update_conda false # - "%CONDAFORGE% setuptools pip" - - "IF %PYTHON_VERSION%==2.6 (python -m pip install ordereddict)" - python -m pip install coverage - python -m pip install codecov - IF DEFINED YAML (python -m pip install pyyaml) @@ -87,7 +85,7 @@ install: - python -m pip install openpyxl - python -m pip install sphinx_rtd_theme - "%ANACONDA% pandas networkx" - - "IF NOT %PYTHON_VERSION%==2.6 (%ANACONDA% scipy)" + - "%ANACONDA% scipy" # # Install GAMS # diff --git a/.travis.yml b/.travis.yml index a369372567b..438f10ac1e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,6 @@ language: python matrix: include: - # NOTE: EXTRAS is not yet supported on Python 2.6. - - python: '2.6' - env: CATEGORY="nightly" - python: '2.7' env: CATEGORY="nightly" - python: '3.6' @@ -72,11 +69,6 @@ install: - which pip - pip --version # - - if [ "${TRAVIS_PYTHON_VERSION}" == "2.6" ]; then pip install 'cryptography<2.1.1'; fi - - if [ "${TRAVIS_PYTHON_VERSION}" == "2.6" ]; then pip install 'pyOpenSSL<17.5'; fi - - if [ "${TRAVIS_PYTHON_VERSION}" == "2.6" ]; then pip install urllib3; fi - - if [ "${TRAVIS_PYTHON_VERSION}" == "2.6" ]; then pip install ordereddict; fi - # - pip install coverage - pip install codecov - if [ -n "${YAML}" ]; then @@ -91,7 +83,7 @@ install: - pip install dill - conda install -q -y -c anaconda pandas networkx - - if [ "${TRAVIS_PYTHON_VERSION}" != "2.6" -a -n "${EXTRAS}" ]; then + - if [ -n "${EXTRAS}" ]; then conda install -q -y -c anaconda scipy; fi @@ -101,9 +93,9 @@ install: - wget https://d37drm4t2jghv5.cloudfront.net/distributions/24.8.5/linux/linux_x64_64_sfx.exe - chmod u+x linux_x64_64_sfx.exe - ./linux_x64_64_sfx.exe > /dev/null - # Only install GAMS API if EXTRAS is not being installed and Python is - # not 2.6, since those tests segfault on travis for an unknown reason. - - if [ "${TRAVIS_PYTHON_VERSION}" != "2.6" -a -z "${EXTRAS}" ]; then + # Only install GAMS API if EXTRAS is not being installed, + # since those tests segfault on travis for an unknown reason. + - if [ -a -z "${EXTRAS}" ]; then bash ./.travis_install_gams_api.sh; fi - export PATH="$PATH:$PWD/gams24.8_linux_x64_64_sfx" diff --git a/.travis_install_gams_api.sh b/.travis_install_gams_api.sh index 463243d0feb..c2a752eadde 100644 --- a/.travis_install_gams_api.sh +++ b/.travis_install_gams_api.sh @@ -2,11 +2,6 @@ # Install GAMS-Python API bindings # No explicit API version for python 3.5, use 3.4 # -if [ "${TRAVIS_PYTHON_VERSION}" = "2.6" ]; then - pushd $PWD/gams24.8_linux_x64_64_sfx/apifiles/Python/api_26; - python setup.py install; - popd; -fi if [ "${TRAVIS_PYTHON_VERSION}" = "2.7" ]; then pushd $PWD/gams24.8_linux_x64_64_sfx/apifiles/Python/api; python setup.py install; diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3c69ea0cc18..9549f2c095e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,9 +6,10 @@ Pyomo CHANGELOG Current Development ------------------------------------------------------------------------------- -- Resolved Python 3.4 build errors on Appveyor. +- Resolved Python 3.4 build errors on Appveyor. (#438) - Wrap Vars in value() for assignment to numpy vectors (#436) - Adding TerminationCondition and SolverStatus to pyomo.environ (#429) +- Removing testing for Python 2.6 (#322) ------------------------------------------------------------------------------- Pyomo 5.5 diff --git a/admin/jenkins.py b/admin/jenkins.py index 045d1c736fe..ee9d6821889 100644 --- 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/doc/OnlineDocs/getting_started/index.rst b/doc/OnlineDocs/getting_started/index.rst index 4d9b26e1845..36ed3b5b340 100644 --- a/doc/OnlineDocs/getting_started/index.rst +++ b/doc/OnlineDocs/getting_started/index.rst @@ -1,9 +1,54 @@ Getting Started =============== -Installation, pyomo command, a simple example, etc +Installation +------------ -.. doctest:: +Pyomo currently supports the following versions of Python: + +* CPython: 2.7, 3.4, 3.5, 3.6 + + +Using CONDA +~~~~~~~~~~~ + +We recommend installation with *conda*, which is included with the Anaconda +distribution of Python. If you have a different Python distribution, then +you can install *miniconda* using *pip*: + +.. bash:: + pip install miniconda + +You can install Pyomo in your system Python installation +by executing the following in a shell: + +.. bash:: + conda install -c conda-forge pyomo + +Pyomo also has conditional dependencies on a variety of third-party Python packages. These can also be installed with conda: + +.. bash:: + conda install -c conda-forge pyomo.extras + +Optimization solvers are not installed with Pyomo, but some open source optimization solvers can be installed with conda as well: + +.. bash:: + conda install -c conda-forge ipopt coin-cbc glpk + + +Using PIP +~~~~~~~~~ + +The standard utility for installing Python packages is *pip*. You +can install Pyomo in your system Python installation by executing +the following in a shell: + +.. bash:: + pip install pyomo + + +A Simple Example +---------------- + +TODO pyomo command, importing pyomo, using NEOS, etc - >>> print('Hello World') - Hello World diff --git a/scripts/pyomo_install b/scripts/pyomo_install index 0e6f8ac38b4..2b6a590c146 100755 --- a/scripts/pyomo_install +++ b/scripts/pyomo_install @@ -22,9 +22,9 @@ except ImportError: from urllib import pathname2url as pathname2url -if sys.version_info < (2, 6): +if sys.version_info < (2, 7): print('ERROR: %s' % sys.exc_info()[1]) - print('ERROR: This script requires Python 2.6 or greater.') + print('ERROR: This script requires Python 2.7 or greater.') sys.exit(1) # diff --git a/setup.py b/setup.py index 79256a7bf06..4eaf47d8f8a 100644 --- a/setup.py +++ b/setup.py @@ -81,7 +81,6 @@ def read(*rnames): '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 @@ def read(*rnames): 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