##// END OF EJS Templates
ipython_directive: Adjust doc examples for reproducibility....
ipython_directive: Adjust doc examples for reproducibility. Before this change, building the documentation twice in a row in an environment configured for reproducible bulids would result in discrepancies such as: diff -ru /gnu/store/...-python-ipython-documentation-8.2.0/share/doc/python-ipython-documentation-8.2.0/html/sphinxext.html /gnu/store/...-python-ipython-documentation-8.2.0-check/share/doc/python-ipython-documentation-8.2.0/html/sphinxext.html --- /gnu/store/...-python-ipython-documentation-8.2.0/share/doc/python-ipython-documentation-8.2.0/html/sphinxext.html 1969-12-31 19:00:01.000000000 -0500 +++ /gnu/store/...-python-ipython-documentation-8.2.0-check/share/doc/python-ipython-documentation-8.2.0/html/sphinxext.html 1969-12-31 19:00:01.000000000 -0500 @@ -682,7 +682,7 @@ <span class="gp">In [2]: </span><span class="kn">import</span> <span class="nn">datetime</span> <span class="gp"> ...: </span><span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span> <span class="gp"> ...: </span> -<span class="gh">Out[2]: </span><span class="go">datetime.datetime(2022, 4, 17, 3, 21, 14, 978155)</span> +<span class="gh">Out[2]: </span><span class="go">datetime.datetime(2022, 4, 17, 3, 37, 37, 115081)</span> </pre></div> </div> <p>It supports IPython construct that plain @@ -690,7 +690,7 @@ <div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [3]: </span><span class="kn">import</span> <span class="nn">time</span> <span class="gp">In [4]: </span><span class="o">%</span><span class="k">timeit</span> time.sleep(0.05) -<span class="go">50.2 ms +- 104 us per loop (mean +- std. dev. of 7 runs, 10 loops each)</span> +<span class="go">50.1 ms +- 8.86 us per loop (mean +- std. dev. of 7 runs, 10 loops each)</span> </pre></div> </div> <p>This will also support top-level async when using IPython 7.0+</p> * IPython/sphinxext/ipython_directive.py: Use a fixed date string in the datetime example, and replace the %timeit example by %pdoc, whole output is static.
Maxim Cournoyer -
r27687:71d665c4
Show More
Name Size Modified Last Commit Author
/ tools / alldeps
Makefile Loading ...
README.txt Loading ...
pkginstall Loading ...
pkginstall.cfg Loading ...

===========================================================
Self-contained IPython installation with all dependencies
===========================================================

This is a self-contained source distribution of IPython with all its
*non-graphical* dependencies, that installs in a single ``make`` call to your
home directory (by default) or any location of your choice.

This distribution is meant for developer-type usage in Unix environments, it is
*not* an easy way to get IPython working on Windows, since it assumes the
presence of a working compiler and development tools.

Currently, the distribution contains::

ipython-0.9.1.tar.gz
pyOpenSSL-0.6.tar.gz
zope.interface-3.4.1.tar.gz
Twisted-8.1.0.tar.bz2
foolscap-0.3.1.tar.gz
nose-0.10.3.tar.gz


Usage
=====

Download the single tarball where this README file lives and unpack it. If
your system is already configured as described below, these lines will do the
whole job::

wget http://ipython.scipy.org/dist/alldeps/ipython-alldeps-0.9.1.tar
tar xf ipython-alldeps-0.9.1.tar
cd ipython-alldeps-0.9.1
make

If all goes well, then just type::

iptest

to run IPython's test suite.


It is meant to be used in an environment where you have your ``$PATH``,
``$PYTHONPATH``, etc variables properly configured, so that the installation of
packages can be made with (using ``~/usr/local`` as an example)::

pip install . --prefix=~/usr/local

For an explanation of how to do this, see below.

You can configure the default prefix used by editing the file
``pkginstall.cfg``, where you can also override the python version used for the
process. If your system is configured in this manner, you can simply type::

make

and this will build and install all of IPython's non-graphical dependencies on
your system, assuming you have Python, a compiler, the Python headers and the
SSL headers available.


.. _environment_configuration:

Environment configuration
=========================

Below is an example of what to put in your ``~/.bashrc`` file to configure your
environment as described in this document, in a reasonably portable manner that
takes 64-bit operating systems into account::

# For processor dependent config
MACHINE=$(uname -m)

# Python version information
PYVER=$(python -ESV 2>&1)
PYVER_MINOR=${PYVER#Python }
PYVER_MAJOR=${PYVER_MINOR:0:3}

function export_paths {
# Export useful paths based on a common prefix

# Input: a path prefix

local prefix=$1
local pp
local lp
local pypath=python${PYVER_MAJOR}/site-packages

# Compute paths with 64-bit specifics
if [[ $MACHINE == "x86_64" ]]; then
lp=$prefix/lib64:$prefix/lib
pp=$prefix/lib64/$pypath:$prefix/lib/$pypath
else
lp=$prefix/lib
pp=$prefix/lib/$pypath
fi

# Set paths based on given prefix
export PATH=$prefix/bin:$PATH
export CPATH=$prefix/include:$CPATH
export LD_LIBRARY_PATH=$lp:$LD_LIBRARY_PATH
export LIBRARY_PATH=$lp:$LIBRARY_PATH
export PYTHONPATH=$pp:$PYTHONPATH
}

# Actually call the export function to set the paths. If you want more than
# one such prefix, note that the call *prepends* the new prefix to the
# existing paths, so later calls take priority.

export_paths $HOME/usr/local