mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-27 20:36:31 +00:00
Update top-level Python project for CMake compatibility.
This commit reimplements the (no longer recommended) setuptools based build system using a standards-based in-tree PEP517 build backend. The implementation is partially based on https://codeberg.org/ziglang/zig-pypi/src/branch/main/make_wheels.py which is licensed under BSD-0-clause.
This commit is contained in:
parent
0b55fad93a
commit
63fae93998
6 changed files with 168 additions and 141 deletions
14
cmake/GetPyosysVersion.cmake
Normal file
14
cmake/GetPyosysVersion.cmake
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
cmake_minimum_required(VERSION 3.27)
|
||||
set(CMAKE_MESSAGE_LOG_LEVEL ERROR)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
include(YosysVersion)
|
||||
|
||||
yosys_extract_version()
|
||||
if (YOSYS_VERSION_COMMIT EQUAL "0")
|
||||
set(yosys_version "${YOSYS_VERSION_MAJOR}.${YOSYS_VERSION_MINOR}")
|
||||
elseif (YOSYS_VERSION_COMMIT STREQUAL "")
|
||||
set(yosys_version "${YOSYS_VERSION_MAJOR}.${YOSYS_VERSION_MINOR}.post9999")
|
||||
else()
|
||||
set(yosys_version "${YOSYS_VERSION_MAJOR}.${YOSYS_VERSION_MINOR}.post${YOSYS_VERSION_COMMIT}")
|
||||
endif()
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${yosys_version}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue