Skip to content

Commit c800644

Browse files
committed
Remove deprecated generate option
1 parent c141cda commit c800644

File tree

3 files changed

+70
-90
lines changed

3 files changed

+70
-90
lines changed

robotpy_build/config/pyproject_toml.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,6 @@ class WrapperConfig:
298298
#:
299299
autogen_headers: Optional[Dict[str, str]] = None
300300

301-
#: DEPRECATED: Same as autogen_headers, but more complicated
302-
generate: Optional[List[Dict[str, str]]] = None
303-
304301
#: Path to a single data.yml to use during code generation, or a directory
305302
#: of yaml files. If a directory, generation data will be looked up
306303
#: using the key in the generate dictionary.

robotpy_build/setup.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,6 @@ def __init__(self):
7979
f"robotpy-build configuration in pyproject.toml is incorrect"
8080
) from e
8181

82-
# Remove deprecated 'generate' data and migrate
83-
for wname, wrapper in self.project.wrappers.items():
84-
if wrapper.generate:
85-
if wrapper.autogen_headers:
86-
raise ValueError(
87-
"must not specify 'generate' and 'autogen_headers'"
88-
)
89-
autogen_headers = {}
90-
for l in wrapper.generate:
91-
for name, header in l.items():
92-
if name in autogen_headers:
93-
raise ValueError(
94-
f"{wname}.generate: duplicate key '{name}'"
95-
)
96-
autogen_headers[name] = header
97-
wrapper.autogen_headers = autogen_headers
98-
wrapper.generate = None
99-
10082
# Shared wrapper writer instance
10183
self.wwriter = WrapperWriter()
10284

tests/cpp/pyproject.toml.tmpl

Lines changed: 70 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -41,75 +41,76 @@ sources = [
4141
]
4242

4343
generation_data = "gen/ft"
44-
generate = [
45-
{ abstract = "abstract.h" },
46-
{ base_qualname = "base_qualname.h" },
47-
{ base_qualname_hidden = "base_qualname_hidden.h" },
48-
{ buffers = "buffers.h" },
49-
{ custom_type_caster = "custom_type_caster.h" },
50-
{ defaults = "defaults.h" },
51-
{ docstrings = "docstrings.h" },
52-
{ docstrings_append = "docstrings_append.h" },
53-
{ enums = "enums.h" },
54-
{ factory = "factory.h" },
55-
{ fields = "fields.h" },
56-
{ gilsafe_container = "gilsafe_container.h" },
57-
{ keepalive = "keepalive.h" },
58-
{ ignore = "ignore.h" },
59-
{ ignored_by_default = "ignored_by_default.h" },
60-
{ inline_code = "inline_code.h" },
61-
{ lifetime = "lifetime.h" },
62-
{ nested = "nested.h" },
63-
{ ns_class = "ns_class.h" },
64-
{ ns_hidden = "ns_hidden.h" },
65-
{ operators = "operators.h" },
66-
{ overloads = "overloads.h" },
67-
{ parameters = "parameters.h" },
68-
{ refqual = "refqual.h" },
69-
{ rename = "rename.h" },
70-
{ retval = "retval.h" },
71-
{ subpkg = "subpkg.h" },
72-
{ static_only = "static_only.h" },
73-
{ trampoline = "trampoline.h" },
74-
{ type_caster = "type_caster.h" },
75-
{ type_caster_nested = "type_caster_nested.h" },
76-
{ using = "using.h" },
77-
{ using2 = "using2.h" },
78-
{ virtual_comma = "virtual_comma.h" },
79-
{ virtual_xform = "virtual_xform.h" },
80-
81-
# Inheritance
82-
{ IBase = "inheritance/ibase.h" },
83-
{ IChild = "inheritance/ichild.h" },
84-
{ IMChild = "inheritance/imchild.h" },
85-
{ IGChild = "inheritance/igchild.h" },
86-
{ Overloaded = "inheritance/overloaded.h" },
87-
{ mvi = "inheritance/mvi.h" },
88-
{ usingparent = "inheritance/usingparent.h" },
89-
90-
# Protection
91-
{ PBase = "protection/pbase.h" },
92-
{ PChild = "protection/pchild.h" },
93-
{ PGChild = "protection/pgchild.h" },
94-
95-
# Templates
96-
{tbase = "templates/tbase.h"},
97-
{tcrtp = "templates/tcrtp.h"},
98-
{tcrtpfwd = "templates/tcrtpfwd.h"},
99-
{tconcrete = "templates/tconcrete.h"},
100-
101-
{tvbase = "templates/tvbase.h"},
102-
{tvchild = "templates/tvchild.h"},
103-
104-
{tbasic = "templates/basic.h"},
105-
{tdependent_base = "templates/dependent_base.h"},
106-
{tdependent_param = "templates/dependent_param.h"},
107-
{tdependent_using = "templates/dependent_using.h"},
108-
{tdependent_using2 = "templates/dependent_using2.h"},
109-
{tfn = "templates/fn.h" },
110-
{tnumeric = "templates/numeric.h"},
111-
{tnested = "templates/nested.h"},
112-
]
44+
45+
[tool.robotpy-build.wrappers."rpytest.ft".autogen_headers]
46+
abstract = "abstract.h"
47+
base_qualname = "base_qualname.h"
48+
base_qualname_hidden = "base_qualname_hidden.h"
49+
buffers = "buffers.h"
50+
custom_type_caster = "custom_type_caster.h"
51+
defaults = "defaults.h"
52+
docstrings = "docstrings.h"
53+
docstrings_append = "docstrings_append.h"
54+
enums = "enums.h"
55+
factory = "factory.h"
56+
fields = "fields.h"
57+
gilsafe_container = "gilsafe_container.h"
58+
keepalive = "keepalive.h"
59+
ignore = "ignore.h"
60+
ignored_by_default = "ignored_by_default.h"
61+
inline_code = "inline_code.h"
62+
lifetime = "lifetime.h"
63+
nested = "nested.h"
64+
ns_class = "ns_class.h"
65+
ns_hidden = "ns_hidden.h"
66+
operators = "operators.h"
67+
overloads = "overloads.h"
68+
parameters = "parameters.h"
69+
refqual = "refqual.h"
70+
rename = "rename.h"
71+
retval = "retval.h"
72+
subpkg = "subpkg.h"
73+
static_only = "static_only.h"
74+
trampoline = "trampoline.h"
75+
type_caster = "type_caster.h"
76+
type_caster_nested = "type_caster_nested.h"
77+
using = "using.h"
78+
using2 = "using2.h"
79+
virtual_comma = "virtual_comma.h"
80+
virtual_xform = "virtual_xform.h"
81+
82+
# Inheritance
83+
IBase = "inheritance/ibase.h"
84+
IChild = "inheritance/ichild.h"
85+
IMChild = "inheritance/imchild.h"
86+
IGChild = "inheritance/igchild.h"
87+
Overloaded = "inheritance/overloaded.h"
88+
mvi = "inheritance/mvi.h"
89+
usingparent = "inheritance/usingparent.h"
90+
91+
# Protection
92+
PBase = "protection/pbase.h"
93+
PChild = "protection/pchild.h"
94+
PGChild = "protection/pgchild.h"
95+
96+
# Templates
97+
tbase = "templates/tbase.h"
98+
tcrtp = "templates/tcrtp.h"
99+
tcrtpfwd = "templates/tcrtpfwd.h"
100+
tconcrete = "templates/tconcrete.h"
101+
102+
tvbase = "templates/tvbase.h"
103+
tvchild = "templates/tvchild.h"
104+
105+
tbasic = "templates/basic.h"
106+
tdependent_base = "templates/dependent_base.h"
107+
tdependent_param = "templates/dependent_param.h"
108+
tdependent_using = "templates/dependent_using.h"
109+
tdependent_using2 = "templates/dependent_using2.h"
110+
tfn = "templates/fn.h"
111+
tnumeric = "templates/numeric.h"
112+
tnested = "templates/nested.h"
113+
113114

114115
[tool.robotpy-build.wrappers."rpytest.srconly"]
115116
name = "rpytest_srconly"

0 commit comments

Comments
 (0)