Skip to content
Permalink
Browse files
Add yowasp-sby binary.
  • Loading branch information
whitequark committed Jul 11, 2020
1 parent a7f0a2f commit 047e0b0a70c494de1275aebb8f68142fa29559fe
Showing with 18 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +1 −0 SymbiYosys-src
  3. +3 −0 package-pypi.sh
  4. +1 −0 pypi/.gitignore
  5. +1 −0 pypi/setup.py
  6. +9 −0 pypi/yowasp_yosys/__init__.py
@@ -2,3 +2,6 @@
path = yosys-src
url = https://github.com/YosysHQ/yosys
branch = master
[submodule "SymbiYosys-src"]
path = SymbiYosys-src
url = https://github.com/YosysHQ/SymbiYosys
Submodule SymbiYosys-src added at 9ed384
@@ -7,7 +7,10 @@ cp -r \
yosys-build/yosys.wasm \
yosys-build/share \
yosys-src/backends/smt2/smtbmc.py \
SymbiYosys-src/sbysrc/sby.py \
pypi/yowasp_yosys/
cp SymbiYosys-src/sbysrc/sby_*.py \
pypi/yowasp_yosys/share/python3

cd pypi
${PYTHON} setup.py bdist_wheel
@@ -5,3 +5,4 @@ __pycache__/
/dist
/yowasp_yosys/share
/yowasp_yosys/smtbmc.py
/yowasp_yosys/sby.py
@@ -44,6 +44,7 @@ def long_description():
"console_scripts": [
"yowasp-yosys = yowasp_yosys:_run_yosys_argv",
"yowasp-yosys-smtbmc = yowasp_yosys:_run_yosys_smtbmc_argv",
"yowasp-sby = yowasp_yosys:_run_sby_argv",
],
},
project_urls={
@@ -58,3 +58,12 @@ def _run_yosys_smtbmc_argv():
with open(smtbmc_py) as f:
globals = {}
exec(compile(f.read(), smtbmc_py, "exec"), globals, globals)


def _run_sby_argv():
prefix = importlib_resources.files(__package__)
sys.path.append(str(prefix / "share" / "python3"))
sby_py = prefix / "sby.py"
with open(sby_py) as f:
globals = {}
exec(compile(f.read(), sby_py, "exec"), globals, globals)

0 comments on commit 047e0b0

Please sign in to comment.