From efadf5751d5e11bdbe4cae4d9ba46a59e6e48428 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Thu, 20 Mar 2025 17:58:54 -0700 Subject: [PATCH] Fix pyosys install issues --- Makefile | 7 ++++--- setup.py | 9 +++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 009690a00..d3a7cf09f 100644 --- a/Makefile +++ b/Makefile @@ -171,8 +171,8 @@ endif YOSYS_VER := 0.51+46 YOSYS_MAJOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f1) -YOSYS_MINOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f2 | cut -d'+' -f1) -YOSYS_COMMIT := $(shell echo $(YOSYS_VER) | cut -d'+' -f2) +YOSYS_MINOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f2) +YOSYS_COMMIT := $(shell echo $(YOSYS_VER) | cut -d'.' -f3) CXXFLAGS += -DYOSYS_VER=\\"$(YOSYS_VER)\\" \ -DYOSYS_MAJOR=$(YOSYS_MAJOR) \ -DYOSYS_MINOR=$(YOSYS_MINOR) \ @@ -740,6 +740,7 @@ OBJS += passes/techmap/bmuxmap.o OBJS += passes/techmap/demuxmap.o OBJS += passes/techmap/muxcover.o OBJS += passes/techmap/aigmap.o +OBJS += passes/techmap/attrmap.o include $(YOSYS_SRC)/passes/hierarchy/Makefile.inc include $(YOSYS_SRC)/passes/memory/Makefile.inc @@ -1019,7 +1020,7 @@ wheel: $(TARGETS) $(EXTRA_TARGETS) python3 -m pip wheel . install_wheel: wheel - python3 -m pip install pyosys*.whl --force-reinstall + python3 -m pip install pyosys-$(YOSYS_VER)-*.whl --force-reinstall install: $(TARGETS) $(EXTRA_TARGETS) $(INSTALL_SUDO) mkdir -p $(DESTDIR)$(BINDIR) diff --git a/setup.py b/setup.py index 3d70db68d..7bac77953 100644 --- a/setup.py +++ b/setup.py @@ -21,14 +21,11 @@ from setuptools.command.build_ext import build_ext __dir__ = os.path.dirname(os.path.abspath(__file__)) -yosys_version_rx = re.compile(r"YOSYS_VER\s*:=\s*([\w\-\+\.]+)") +yosys_version_rx = re.compile(r"PREQORSOR_VERSION\s*:=\s*([\w\-\+\.]+)") version = yosys_version_rx.search( - open(os.path.join(__dir__, "Makefile"), encoding="utf8").read() -)[1].replace( - "+", "." -) # Convert to patch version - + open(os.path.join(__dir__, "../../Makefile"), encoding="utf8").read() +)[1] class libyosys_so_ext(Extension): def __init__(