diff options
author | Simon Glass <sjg@chromium.org> | 2017-04-07 15:51:32 -0600 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-04-08 11:54:07 +1000 |
commit | 90db6d9989ca09ed3c32fbdc646d284ebf9fe1cf (patch) | |
tree | 2cc5adc4e3d607d2561ca46991ec9f8ca6b471ae /README | |
parent | e20d9658cd8f1cf2c03e843678cc9e89107e87ad (diff) | |
download | dtc-90db6d9989ca09ed3c32fbdc646d284ebf9fe1cf.zip dtc-90db6d9989ca09ed3c32fbdc646d284ebf9fe1cf.tar.gz dtc-90db6d9989ca09ed3c32fbdc646d284ebf9fe1cf.tar.bz2 |
pylibfdt: Allow setup.py to operate stand-alone
At present we require that setup.py is executed from the Makefile, which
sets up various important things like the list of files to build and the
version number.
However many installation systems expect to be able to change to the
directory containing setup.py and run it. This allows them to support (for
example) building/installing for multiple Python versions, varying
installation paths, particular C flags, etc.
The problem in implementing this is that we don't want to duplicate the
information in the Makefile. A common solution (so I am told) is to parse
the Makefile to obtain the required information.
Update the setup.py script to read a few Makefiles when it does not see
the required information in its environment. This allows installation
using:
./pylibfdt/setup.py install
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'README')
-rw-r--r-- | README | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -50,12 +50,18 @@ If you add new features, please check code coverage: # Open 'htmlcov/index.html' in your browser -To install the library use: +To install the library via the normal setup.py method, use: - make install_pylibfdt SETUP_PREFIX=/path/to/install_dir + ./pylibfdt/setup.py [--prefix=/path/to/install_dir] -If SETUP_PREFIX is not provided, the default prefix is used, typically '/usr' -or '/usr/local'. See Python's distutils documentation for details. +If --prefix is not provided, the default prefix is used, typically '/usr' +or '/usr/local'. See Python's distutils documentation for details. You can +also install via the Makefile if you like, but the above is more common. + +To install both libfdt and pylibfdt you can use: + + make install [SETUP_PREFIX=/path/to/install_dir] \ + [PREFIX=/path/to/install_dir] To disable building the python library, even if swig and Python are available, use: |