Skip to content

Commit

Permalink
docs: remove metions of legacy python in docs and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Jul 22, 2020
1 parent 8e1bc0f commit 1643a58
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 58 deletions.
2 changes: 1 addition & 1 deletion benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

// The Pythons you'd like to test against. If not provided, defaults
// to the current version of Python used to run `asv`.
// "pythons": ["2.7", "3.3"],
// "pythons": ["3.7", "3.8"],

// The matrix of dependencies to test. Each key is the name of a
// package (in PyPI) and the values are version numbers. An empty
Expand Down
2 changes: 0 additions & 2 deletions doc/activate
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ YT_DEST="$VIRTUAL_ENV"
export YT_DEST

_OLD_VIRTUAL_PYTHONPATH="$PYTHONPATH"
PYTHONPATH="$VIRTUAL_ENV/lib/python2.7/site-packages"
export PYTHONPATH

_OLD_VIRTUAL_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
LD_LIBRARY_PATH="$VIRTUAL_ENV/lib:$LD_LIBRARY_PATH"
Expand Down
37 changes: 4 additions & 33 deletions doc/install_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ YT_DIR=""

# These options can be set to customize the installation.

INST_PY3=1 # Install Python 3 instead of Python 2. If this is turned on,
# all Python packages (including yt) will be installed
# in Python 3.
INST_GIT=1 # Install git or not? If git is not already installed, yt
# cannot be installed from source.
INST_EMBREE=0 # Install dependencies needed for Embree-accelerated ray tracing
Expand All @@ -39,7 +36,6 @@ INST_CARTOPY=0 # Install cartopy?
INST_NOSE=1 # Install nose?
INST_NETCDF4=1 # Install netcdf4 and its python bindings?
INST_POOCH=1 # Install pooch?
INST_HG=0 # Install Mercurial or not?

# This is the branch we will install from for INST_YT_SOURCE=1
BRANCH="master"
Expand Down Expand Up @@ -383,12 +379,8 @@ function do_exit
exit 1
}

if [ $INST_PY3 -eq 1 ]
then
PYTHON_EXEC='python3'
else
PYTHON_EXEC='python2.7'
fi
PYTHON_EXEC='python3'


if type -P curl &>/dev/null
then
Expand Down Expand Up @@ -440,12 +432,7 @@ else
exit 1
fi

if [ $INST_PY3 -eq 1 ]
then
PY_VERSION='3'
else
PY_VERSION='2'
fi
PY_VERSION='3'

MINICONDA_PKG="Miniconda${PY_VERSION}-${MINICONDA_VERSION}-${MINICONDA_OS}-${MINICONDA_ARCH}.sh"

Expand Down Expand Up @@ -516,10 +503,6 @@ then
YT_DEPS+=('pooch')
fi
YT_DEPS+=('conda-build')
if [ $INST_PY3 -eq 0 ] && [ $INST_HG -eq 1 ]
then
YT_DEPS+=('mercurial')
fi
YT_DEPS+=('sympy')

if [ $INST_NETCDF4 -eq 1 ]
Expand Down Expand Up @@ -551,13 +534,6 @@ for YT_DEP in "${YT_DEPS[@]}"; do
log_cmd ${DEST_DIR}/bin/conda install -c conda-forge --yes ${YT_DEP}
done

if [ $INST_PY3 -eq 1 ] && [ $INST_HG -eq 1 ]
then
echo "Installing mercurial"
log_cmd ${DEST_DIR}/bin/conda create -y -n py27 python=2.7 mercurial
log_cmd ln -s ${DEST_DIR}/envs/py27/bin/hg ${DEST_DIR}/bin
fi

if [ $INST_YT_SOURCE -eq 1 ]
then
log_cmd ${GIT_EXE} clone https://github.com/yt-project/yt_conda ${DEST_DIR}/src/yt_conda
Expand Down Expand Up @@ -594,12 +570,7 @@ fi
# conda doesn't package pyx, so we install manually with pip
if [ $INST_PYX -eq 1 ]
then
if [ $INST_PY3 -eq 1 ]
then
log_cmd ${DEST_DIR}/bin/pip install pyx
else
log_cmd ${DEST_DIR}/bin/pip install pyx==0.12.1
fi
log_cmd ${DEST_DIR}/bin/pip install pyx
fi

if [ $INST_YT_SOURCE -eq 0 ]
Expand Down
2 changes: 1 addition & 1 deletion doc/source/analyzing/parallel_computation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ processes using the following Bash command:

.. code-block:: bash
$ mpirun -np 16 python2.7 my_script.py
$ mpirun -np 16 python my_script.py
.. note::

Expand Down
2 changes: 1 addition & 1 deletion doc/source/developing/debugdrive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ provided through the yt command. So if you run the command:

.. code-block:: bash
$ mpirun -np 4 python2.7 some_script.py --parallel --rpdb
$ mpirun -np 4 python some_script.py --parallel --rpdb
and it reaches an error or an exception, it will launch the debugger.
Additionally, instructions will be printed for connecting to the debugger.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/developing/external_analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ To build our extension, we would run:

.. code-block:: bash
$ python2.7 axes_calculator_setup.py build_ext -i
$ python axes_calculator_setup.py build_ext -i
Note that since we don't yet have an ``axes_calculator.pyx``, this will fail.
But once we have it, it ought to run.
Expand Down
16 changes: 0 additions & 16 deletions doc/source/developing/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -496,19 +496,3 @@ In order to add a new set of answer tests, it is sufficient to extend the
+
other_tests:
unittests:
Restricting Python Versions for Answer Tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If for some reason a test can be run only for a specific version of python it is
possible to indicate this by adding a ``[py2]`` or ``[py3]`` tag. For example:

.. code-block:: yaml
answer_tests:
local_test_000:
- yt/test_A.py # [py2]
- yt/test_B.py # [py3]
would result in ``test_A.py`` being run only for *python2* and ``test_B.py``
being run only for *python3*.
4 changes: 2 additions & 2 deletions doc/source/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ development version of yt instead of the latest stable release, you will need
if you are curious why ``--install-option="--prefix="`` is necessary on some systems.

This will install yt into a folder in your home directory
(``$HOME/.local/lib64/python2.7/site-packages`` on Linux,
``$HOME/Library/Python/2.7/lib/python/site-packages/`` on OSX) Please refer to
(e.g. ``$HOME/.local/lib64/python<py_version>/site-packages`` on Linux,
``$HOME/Library/Python/<py_version>/lib/python/site-packages/`` on OSX) Please refer to
the ``setuptools`` documentation for the additional options.

If you are unable to locate the ``yt`` executable (i.e. executing ``yt version``
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,5 @@
zip_safe=False,
scripts=["scripts/iyt"],
ext_modules=[], # !!! We override this inside build_ext above
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*",
python_requires=">=3.6",
)

0 comments on commit 1643a58

Please sign in to comment.