Skip to content

Commit

Permalink
better installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mreineck committed Sep 7, 2017
1 parent b3e8be0 commit 071b1e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# The C++ compiler. Adjust if needed
CXX:=g++

# python-config tool.
PYTHON_CONFIG:=python-config



PYETS_DEP:=src/ets.cc src/pyETS.cc src/*.h src/external/*
PYETS_SRC:=src/ets.cc src/pyETS.cc src/external/*.cc
PYCCONV_DEP:=src/cconv.cc src/pycconv.cc src/*.h src/external/*
PYCCONV_SRC:=src/cconv.cc src/pycconv.cc src/external/*.cc

PYBIND_INC:=src
PYFLAGS:=$(filter-out -Wstrict-prototypes,$(shell python-config --cflags --ldflags))
PYFLAGS:=$(filter-out -Wstrict-prototypes,$(shell $(PYTHON_CONFIG) --cflags --ldflags))

COMMON_FLAGS:=-O3 -g -fmax-errors=1 -std=c++14 -I src/external -W -Wall

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Pybind11 headers for C++/Python integration
Simply type "make". This requires a fairly recent version of GNU g++ (tested
with version 5.3 and above, but any 5.x will probably work).

If you can compile the code but you get error messages when trying to import
the Python modules, chances are that the "python" executable and the Python
configuration tool "python-config" in your search path don't match; this
can happen when installing a new Python interpreter from a software repository
in addition to the one distributed with the system. In this case you can edit
the Makefile and set the PYTHON_CONFIG variable to the appropriate
"python-config" with full path.

## Demo code:

The file demo.py contains a very brief overview over the typical workflow, i.e.
Expand Down

0 comments on commit 071b1e8

Please sign in to comment.