![]() |
Prev | Next |
python setup.py build_ext --inplace [--debug] [--undef NDEBUG]
where
python
is the Python executable you will be using with
cppad_py.
git clone https://github.com/bradbell/cppad_py.git top_srcdir
top_srcdir
is
referred to as your top source directory.
setup.py
or get_cppad.sh
,
you should check and possibly change the following settings
(which are near the top of
top_srcdir/setup.py
):
verbose_makefile = "false" build_type = "debug" cppad_prefix = "build/prefix" test_cppad = "fasle" extra_cxx_flags = "-Wall -pedantic-errors -Wno-unused-result -std=c++11"Each of these settings is described below:
"true"
or "false"
.
If it is true, many of the compiler and Swig options used to
build the system are output during the make
commands.
If it is false, the output during the make commands just describes
whats is being done without so much detail.
"debug"
, "release"
.
"true"
or "false"
.
If it is "true"
, get_cppad.sh
will build and run
a separate check of Cppad for this system.
This takes a significant amount of time, but may be useful
if you have any problems.
python setup.py build_ext --inplace --debug --undef NDEBUG
where
python
is the Python executable you will be
using with cppad_py.
If you want a faster version, with less error reporting, use
python setup.py build_ext --inplace
top_srcdir
:
cd lib/example/python
python check_all.py
where
python
is the same version of python as above.
top_srcdir
:
cd build
make check_lib_cplusplus
top_srcdir
you should be able to execute the
following commands:
python
import cppad_py
quit()
We need to install cppad_py so you can import it from any directory.
python setup.py build_ext --debug --undef NDEBUG install --prefix=prefix
or the following to install the release version:
python setup.py build_ext install --prefix=prefix
This will install cppad_py
in the directory
prefix/lib/pythonmajor.minor/site_packages/cppad_py
where
major
and
minor
are the major and minor
versions for
python
.
python
import sys
print(sys.path)
quit()
The directory
prefix/lib/pythonmajor.minor/site_packages
must be in your python path.