-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.py
56 lines (46 loc) · 1.8 KB
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# pyplexo
# Copyright © 2018-2023 Alecks Gates
#
# pyplexo is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyplexo is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with pyplexo. If not, see <https://www.gnu.org/licenses/>.
from capnpy.compiler.distutils import capnpy_schemas
class SetupKwargsProxy:
def __init__(self, d):
self._d = d
@property
def capnpy_options(self):
return {
"include_reflection_data": True,
# TODO: Remove the below options once we stabilize the capnpy version
"version_check": False,
}
@property
def ext_modules(self):
try:
return self._d["ext_modules"]
except KeyError:
return None
@ext_modules.setter
def ext_modules(self, v):
self._d["ext_modules"] = v
schema_files = [
"src/plexo/schema/plexo_message.capnp",
"src/plexo/schema/plexo_multicast/plexo_approval.capnp",
"src/plexo/schema/plexo_multicast/plexo_heartbeat.capnp",
"src/plexo/schema/plexo_multicast/plexo_preparation.capnp",
"src/plexo/schema/plexo_multicast/plexo_promise.capnp",
"src/plexo/schema/plexo_multicast/plexo_proposal.capnp",
"src/plexo/schema/plexo_multicast/plexo_rejection.capnp",
]
def build(setup_kwargs):
capnpy_schemas(SetupKwargsProxy(setup_kwargs), "capnpy_schemas", schema_files)