- python3
- libboost-system-dev
- libboost-python-dev
+ - libboost-filesystem-dev
env:
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-4.8 && CXX=g++-4.8"
- python3
- libboost-system-dev
- libboost-python-dev
+ - libboost-filesystem-dev
env:
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-6 && CXX=g++-6"
- python3
- libboost-system-dev
- libboost-python-dev
+ - libboost-filesystem-dev
env:
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-7 && CXX=g++-7"
- python3
- libboost-system-dev
- libboost-python-dev
+ - libboost-filesystem-dev
env:
- MATRIX_EVAL="CONFIG=clang && CC=clang-3.8 && CXX=clang++-3.8"
- python3
- libboost-system-dev
- libboost-python-dev
+ - libboost-filesystem-dev
env:
- MATRIX_EVAL="CONFIG=clang && CC=clang-5.0 && CXX=clang++-5.0"
ifeq ($(ENABLE_PYOSYS),1)
ifeq ($(PYTHON_MAJOR_VERSION),3)
- LDLIBS += -lpython$(PYTHON_VERSION)m -lboost_python-py$(subst .,,$(PYTHON_VERSION)) -lboost_system -lstdc++fs
+ LDLIBS += -lpython$(PYTHON_VERSION)m -lboost_python-py$(subst .,,$(PYTHON_VERSION)) -lboost_system -lboost_filesystem -lstdc++fs
else
- LDLIBS += -lpython$(PYTHON_VERSION) -lboost_python-py$(subst .,,$(PYTHON_VERSION)) -lboost_system -lstdc++fs
+ LDLIBS += -lpython$(PYTHON_VERSION) -lboost_python-py$(subst .,,$(PYTHON_VERSION)) -lboost_system -lboost_filesystem -lstdc++fs
endif
CXXFLAGS += -I/usr/include/python$(PYTHON_VERSION) -D WITH_PYTHON
PY_WRAPPER_FILE = kernel/python_wrappers
$ sudo apt-get install build-essential clang bison flex \
libreadline-dev gawk tcl-dev libffi-dev git \
graphviz xdot pkg-config python3 libboost-system-dev \
- libboost-python-dev
+ libboost-python-dev libboost-filesystem-dev
Similarily, on Mac OS X MacPorts or Homebrew can be used to install dependencies:
#ifdef WITH_PYTHON
# include <boost/algorithm/string/predicate.hpp>
# include <Python.h>
-# include <experimental/filesystem>
+# include <boost/filesystem.hpp>
#endif
YOSYS_NAMESPACE_BEGIN
#ifdef WITH_PYTHON
- std::experimental::filesystem::path full_path(filename);
+ boost::filesystem::path full_path(filename);
if(strcmp(full_path.extension().c_str(), ".py") == 0)
{
PyRun_SimpleString(("sys.path.insert(0,\""+path+"\")").c_str());
PyErr_Print();
PyObject *filename_p = PyUnicode_FromString(filename.c_str());
+
if(filename_p == NULL)
{
PyErr_Print();