Merged in matt_broadway/gtsam/feature/clearer_setup_py_instructions (pull request #394)
small setup.py improvementsrelease/4.3a0
commit
32b38d775f
|
@ -24,6 +24,8 @@ export PYTHONPATH=$PYTHONPATH:<GTSAM_CYTHON_INSTALL_PATH>
|
||||||
- To install system-wide: run `make install` then navigate to `GTSAM_CYTHON_INSTALL_PATH` and run `python setup.py install`
|
- To install system-wide: run `make install` then navigate to `GTSAM_CYTHON_INSTALL_PATH` and run `python setup.py install`
|
||||||
- (the same command can be used to install into a virtual environment if it is active)
|
- (the same command can be used to install into a virtual environment if it is active)
|
||||||
- note: if you don't want gtsam to install to a system directory such as `/usr/local`, pass `-DCMAKE_INSTALL_PREFIX="./install"` to cmake to install gtsam to a subdirectory of the build directory.
|
- note: if you don't want gtsam to install to a system directory such as `/usr/local`, pass `-DCMAKE_INSTALL_PREFIX="./install"` to cmake to install gtsam to a subdirectory of the build directory.
|
||||||
|
- if you run `setup.py` from the build directory rather than the installation directory, the script will warn you with the message: `setup.py is being run from an unexpected location`.
|
||||||
|
Before `make install` is run, not all the components of the package have been copied across, so running `setup.py` from the build directory would result in an incomplete package.
|
||||||
|
|
||||||
UNIT TESTS
|
UNIT TESTS
|
||||||
==========
|
==========
|
||||||
|
|
|
@ -5,10 +5,10 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from distutils.core import setup, find_packages
|
from distutils.core import setup, find_packages
|
||||||
|
|
||||||
|
if 'SETUP_PY_NO_CHECK' not in os.environ:
|
||||||
script_path = os.path.abspath(os.path.realpath(__file__))
|
script_path = os.path.abspath(os.path.realpath(__file__))
|
||||||
install_path = os.path.abspath(os.path.realpath(os.path.join('${GTSAM_CYTHON_INSTALL_PATH}', 'setup.py')))
|
install_path = os.path.abspath(os.path.realpath(os.path.join('${GTSAM_CYTHON_INSTALL_PATH}', 'setup.py')))
|
||||||
if script_path != install_path:
|
if script_path != install_path:
|
||||||
print('setup.py is being run from an unexpected location: "{}"'.format(script_path))
|
print('setup.py is being run from an unexpected location: "{}"'.format(script_path))
|
||||||
print('please run `make install` and run the script from there')
|
print('please run `make install` and run the script from there')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in New Issue