diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-04-30 15:48:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 15:48:42 +0200 |
commit | 58e991a0eb36f0a5a23170e6818338efa7445a44 (patch) | |
tree | 3d9d51c126c21a232bb62a037bef3941d2e4c2fc | |
parent | 84f3a796e1232b19674a412b5d011d208d923f5c (diff) | |
parent | dc06e3a28bdb902d9b95d5d4ff2f163ee010aff4 (diff) | |
download | yosys-58e991a0eb36f0a5a23170e6818338efa7445a44.tar.gz yosys-58e991a0eb36f0a5a23170e6818338efa7445a44.tar.bz2 yosys-58e991a0eb36f0a5a23170e6818338efa7445a44.zip |
Merge pull request #973 from christian-krieg/feature/python_bindings
Feature/python bindings cleanup
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | misc/__init__.py (renamed from __init__.py) | 0 | ||||
-rw-r--r-- | misc/py_wrap_generator.py (renamed from py_wrap_generator.py) | 0 |
3 files changed, 4 insertions, 4 deletions
@@ -294,7 +294,7 @@ endif PY_WRAPPER_FILE = kernel/python_wrappers OBJS += $(PY_WRAPPER_FILE).o PY_GEN_SCRIPT= py_wrap_generator -PY_WRAP_INCLUDES := $(shell python$(PYTHON_VERSION) -c "import $(PY_GEN_SCRIPT); $(PY_GEN_SCRIPT).print_includes()") +PY_WRAP_INCLUDES := $(shell python$(PYTHON_VERSION) -c "from misc import $(PY_GEN_SCRIPT); $(PY_GEN_SCRIPT).print_includes()") endif ifeq ($(ENABLE_READLINE),1) @@ -550,9 +550,9 @@ libyosys.so: $(filter-out kernel/driver.o,$(OBJS)) $(Q) mkdir -p $(dir $@) $(P) cat $< | grep -E -v "#[ ]*(include|error)" | $(LD) -x c++ -o $@ -E -P - -$(PY_WRAPPER_FILE).cc: $(PY_GEN_SCRIPT).py $(PY_WRAP_INCLUDES) +$(PY_WRAPPER_FILE).cc: misc/$(PY_GEN_SCRIPT).py $(PY_WRAP_INCLUDES) $(Q) mkdir -p $(dir $@) - $(P) python$(PYTHON_VERSION) -c "import $(PY_GEN_SCRIPT); $(PY_GEN_SCRIPT).gen_wrappers(\"$(PY_WRAPPER_FILE).cc\")" + $(P) python$(PYTHON_VERSION) -c "from misc import $(PY_GEN_SCRIPT); $(PY_GEN_SCRIPT).gen_wrappers(\"$(PY_WRAPPER_FILE).cc\")" %.o: %.cpp $(Q) mkdir -p $(dir $@) @@ -685,7 +685,7 @@ ifeq ($(ENABLE_LIBYOSYS),1) ifeq ($(ENABLE_PYOSYS),1) $(INSTALL_SUDO) mkdir -p $(PYTHON_DESTDIR)/pyosys $(INSTALL_SUDO) cp libyosys.so $(PYTHON_DESTDIR)/pyosys - $(INSTALL_SUDO) cp __init__.py $(PYTHON_DESTDIR)/pyosys + $(INSTALL_SUDO) cp misc/__init__.py $(PYTHON_DESTDIR)/pyosys endif endif diff --git a/__init__.py b/misc/__init__.py index 330fd6d86..330fd6d86 100644 --- a/__init__.py +++ b/misc/__init__.py diff --git a/py_wrap_generator.py b/misc/py_wrap_generator.py index 09f934040..09f934040 100644 --- a/py_wrap_generator.py +++ b/misc/py_wrap_generator.py |