mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-09 17:31:59 +00:00
misc: WITH_PYTHON
-> YOSYS_ENABLE_PYTHON
For consistency. Also trying a new thing: only rebuilding objects that use the pybind11 library. The idea is these are the only objects that include the Python/pybind headers and thus the only ones that depend on the Python ABI in any capacity, so other objects can be reused across wheel builds. This has the potential to cut down build times.
This commit is contained in:
parent
dc88906c91
commit
447a6cb3f0
12 changed files with 82 additions and 60 deletions
|
@ -41,9 +41,10 @@
|
|||
//
|
||||
#include <optional> // optional maps cleanest to methods that accept None in Python
|
||||
|
||||
#include <pybind11/pybind11.h> // base
|
||||
#include <pybind11/stl.h> // std::optional
|
||||
#include <pybind11/pybind11.h> // base
|
||||
#include <pybind11/operators.h> // easier operator binding
|
||||
#include <pybind11/stl_bind.h> // vector
|
||||
|
||||
#include "kernel/hashlib.h"
|
||||
|
||||
|
@ -269,7 +270,7 @@ void bind_set(module &m, const char *name_cstr) {
|
|||
.def("__iter__", [](const C &s){
|
||||
return make_iterator(s.begin(), s.end());
|
||||
}, keep_alive<0,1>())
|
||||
.def("__repr__", [name_cstr](const py::iterable &s){
|
||||
.def("__repr__", [name_cstr](const iterable &s){
|
||||
// repr(set(s)) where s is iterable would be more terse/robust
|
||||
// but are there concerns with copying?
|
||||
str representation = str(name_cstr) + str("({");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue