Skip to content

Commit

Permalink
Fix python build dependencies
Browse files Browse the repository at this point in the history
Also pass down BOOST_ROOT and PYTHON_VERSION variables.
  • Loading branch information
anjohnson committed Jan 9, 2018
1 parent 7226baa commit 24fca64
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ PVAPY_CONFIG += EPICS4_DIR=$(abspath .)
ifneq ($(wildcard $(BOOST_NUMPY)),)
PVAPY_CONFIG += BOOST_NUM_PY_DIR=$(BOOST_NUMPY)
endif
ifneq ($(wildcard $(BOOST_ROOT)),)
PVAPY_CONFIG += BOOST_ROOT=$(BOOST_ROOT)
endif
ifneq ($(PYTHON_VERSION),)
PVAPY_CONFIG += PYTHON_VERSION=$(PYTHON_VERSION)
endif

ifeq ($(filter sphinx,$(MAKECMDGOALS)),sphinx)
PYTHON_VER = $(shell python -c 'import sys; print sys.version[:3]')
Expand All @@ -137,7 +143,7 @@ endif
pvaPy: config.pvaPy host.pvaPy
config.pvaPy: pvaPy/configure/RELEASE.local \
host.pvaClientCPP host.pvDatabaseCPP
pvaPy/configure/RELEASE.local:
pvaPy/configure/RELEASE.local: | host.pvaClientCPP host.pvDatabaseCPP
$(MAKE) -C pvaPy configure $(PVAPY_CONFIG)
host.pvaPy: pvaPy/configure/RELEASE.local
$(MAKE) -C pvaPy $(EPICS_HOST_ARCH)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ This bundle includes a copy of the pvaPy python module, but the build commands a

make python

or for Python 3:

make python PYTHON_VERSION=3

If you only want to build EPICS V4 for the python API, you can avoid compiling some of the modules in the first step above by just running

make EPICS_BASE=/path/to/epics/base python
Expand All @@ -75,6 +79,8 @@ or

make EPICS_BASE=/path/to/epics/base BOOST_NUMPY=/path/to/boost/numpy python

The top-level build system understands the variable BOOST_ROOT if you need to configure pyaPy to build against a custom Boost installation; see the pvaPy/README.md file for more information about using this.

After building pvaPy you can also generate the related reference documentation if you have the Sphinx Python documentation generator installed:

make sphinx
Expand Down

0 comments on commit 24fca64

Please sign in to comment.