mirror of https://github.com/YosysHQ/yosys.git
Changed filesystem dependency to boost instead of experimental std library
This commit is contained in:
parent
c3486c4270
commit
e64b3f1074
|
@ -35,6 +35,7 @@ matrix:
|
||||||
- python3
|
- python3
|
||||||
- libboost-system-dev
|
- libboost-system-dev
|
||||||
- libboost-python-dev
|
- libboost-python-dev
|
||||||
|
- libboost-filesystem-dev
|
||||||
env:
|
env:
|
||||||
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-4.8 && CXX=g++-4.8"
|
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-4.8 && CXX=g++-4.8"
|
||||||
|
|
||||||
|
@ -62,6 +63,7 @@ matrix:
|
||||||
- python3
|
- python3
|
||||||
- libboost-system-dev
|
- libboost-system-dev
|
||||||
- libboost-python-dev
|
- libboost-python-dev
|
||||||
|
- libboost-filesystem-dev
|
||||||
env:
|
env:
|
||||||
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-6 && CXX=g++-6"
|
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-6 && CXX=g++-6"
|
||||||
|
|
||||||
|
@ -89,6 +91,7 @@ matrix:
|
||||||
- python3
|
- python3
|
||||||
- libboost-system-dev
|
- libboost-system-dev
|
||||||
- libboost-python-dev
|
- libboost-python-dev
|
||||||
|
- libboost-filesystem-dev
|
||||||
env:
|
env:
|
||||||
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-7 && CXX=g++-7"
|
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-7 && CXX=g++-7"
|
||||||
|
|
||||||
|
@ -117,6 +120,7 @@ matrix:
|
||||||
- python3
|
- python3
|
||||||
- libboost-system-dev
|
- libboost-system-dev
|
||||||
- libboost-python-dev
|
- libboost-python-dev
|
||||||
|
- libboost-filesystem-dev
|
||||||
env:
|
env:
|
||||||
- MATRIX_EVAL="CONFIG=clang && CC=clang-3.8 && CXX=clang++-3.8"
|
- MATRIX_EVAL="CONFIG=clang && CC=clang-3.8 && CXX=clang++-3.8"
|
||||||
|
|
||||||
|
@ -144,6 +148,7 @@ matrix:
|
||||||
- python3
|
- python3
|
||||||
- libboost-system-dev
|
- libboost-system-dev
|
||||||
- libboost-python-dev
|
- libboost-python-dev
|
||||||
|
- libboost-filesystem-dev
|
||||||
env:
|
env:
|
||||||
- MATRIX_EVAL="CONFIG=clang && CC=clang-5.0 && CXX=clang++-5.0"
|
- MATRIX_EVAL="CONFIG=clang && CC=clang-5.0 && CXX=clang++-5.0"
|
||||||
|
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -270,9 +270,9 @@ endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_PYOSYS),1)
|
ifeq ($(ENABLE_PYOSYS),1)
|
||||||
ifeq ($(PYTHON_MAJOR_VERSION),3)
|
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
|
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
|
endif
|
||||||
CXXFLAGS += -I/usr/include/python$(PYTHON_VERSION) -D WITH_PYTHON
|
CXXFLAGS += -I/usr/include/python$(PYTHON_VERSION) -D WITH_PYTHON
|
||||||
PY_WRAPPER_FILE = kernel/python_wrappers
|
PY_WRAPPER_FILE = kernel/python_wrappers
|
||||||
|
|
|
@ -67,7 +67,7 @@ prerequisites for building yosys:
|
||||||
$ sudo apt-get install build-essential clang bison flex \
|
$ sudo apt-get install build-essential clang bison flex \
|
||||||
libreadline-dev gawk tcl-dev libffi-dev git \
|
libreadline-dev gawk tcl-dev libffi-dev git \
|
||||||
graphviz xdot pkg-config python3 libboost-system-dev \
|
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:
|
Similarily, on Mac OS X MacPorts or Homebrew can be used to install dependencies:
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#ifdef WITH_PYTHON
|
#ifdef WITH_PYTHON
|
||||||
# include <boost/algorithm/string/predicate.hpp>
|
# include <boost/algorithm/string/predicate.hpp>
|
||||||
# include <Python.h>
|
# include <Python.h>
|
||||||
# include <experimental/filesystem>
|
# include <boost/filesystem.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
YOSYS_NAMESPACE_BEGIN
|
YOSYS_NAMESPACE_BEGIN
|
||||||
|
@ -53,7 +53,7 @@ void load_plugin(std::string filename, std::vector<std::string> aliases)
|
||||||
|
|
||||||
#ifdef WITH_PYTHON
|
#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)
|
if(strcmp(full_path.extension().c_str(), ".py") == 0)
|
||||||
{
|
{
|
||||||
|
@ -63,6 +63,7 @@ void load_plugin(std::string filename, std::vector<std::string> aliases)
|
||||||
PyRun_SimpleString(("sys.path.insert(0,\""+path+"\")").c_str());
|
PyRun_SimpleString(("sys.path.insert(0,\""+path+"\")").c_str());
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
PyObject *filename_p = PyUnicode_FromString(filename.c_str());
|
PyObject *filename_p = PyUnicode_FromString(filename.c_str());
|
||||||
|
|
||||||
if(filename_p == NULL)
|
if(filename_p == NULL)
|
||||||
{
|
{
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
|
|
Loading…
Reference in New Issue