Skip to content

Commit a6e638d

Browse files
authored
Make process_args function optional for ports. NFC (#21012)
1 parent 2701825 commit a6e638d

17 files changed

+3
-65
lines changed

tools/ports/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
def read_ports():
33-
expected_attrs = ['get', 'clear', 'process_args', 'show', 'needed']
33+
expected_attrs = ['get', 'clear', 'show', 'needed']
3434
for filename in os.listdir(ports_dir):
3535
if not filename.endswith('.py') or filename == '__init__.py':
3636
continue
@@ -47,6 +47,8 @@ def read_ports():
4747
port.linker_setup = lambda x, y: 0
4848
if not hasattr(port, 'deps'):
4949
port.deps = []
50+
if not hasattr(port, 'process_args'):
51+
port.process_args = lambda x: []
5052
if not hasattr(port, 'variants'):
5153
# port variants (default: no variants)
5254
port.variants = {}

tools/ports/bzip2.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,5 @@ def clear(ports, settings, shared):
3434
shared.cache.erase_lib('libbz2.a')
3535

3636

37-
def process_args(ports):
38-
return []
39-
40-
4137
def show():
4238
return 'bzip2 (USE_BZIP2=1; BSD license)'

tools/ports/giflib.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,5 @@ def clear(ports, settings, shared):
3333
shared.cache.erase_lib('libgif.a')
3434

3535

36-
def process_args(ports):
37-
return []
38-
39-
4036
def show():
4137
return 'giflib (USE_GIFLIB=1; MIT license)'

tools/ports/icu.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,5 @@ def clear(ports, settings, shared):
9999
shared.cache.erase_lib(get_lib_name(libname_libicu_io, settings))
100100

101101

102-
def process_args(ports):
103-
return []
104-
105-
106102
def show():
107103
return 'icu (USE_ICU=1; Unicode License)'

tools/ports/libjpeg.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ def clear(ports, settings, shared):
3737
shared.cache.erase_lib('libjpeg.a')
3838

3939

40-
def process_args(ports):
41-
return []
42-
43-
4440
def show():
4541
return 'libjpeg (USE_LIBJPEG=1; BSD license)'
4642

tools/ports/libmodplug.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ def clear(ports, settings, shared):
8787
shared.cache.erase_lib('libmodplug.a')
8888

8989

90-
def process_args(ports):
91-
return []
92-
93-
9490
def show():
9591
return 'libmodplug (USE_MODPLUG=1; public domain)'
9692

tools/ports/libpng.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ def process_dependencies(settings):
5757
settings.USE_ZLIB = 1
5858

5959

60-
def process_args(ports):
61-
return []
62-
63-
6460
def show():
6561
return 'libpng (-sUSE_LIBPNG; zlib license)'
6662

tools/ports/mpg123.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ def clear(ports, settings, shared):
8080
shared.cache.erase_lib('libmpg123.a')
8181

8282

83-
def process_args(ports):
84-
return []
85-
86-
8783
def show():
8884
return 'mpg123 (USE_MPG123=1; zlib license)'
8985

tools/ports/ogg.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ def clear(ports, settings, shared):
2929
shared.cache.erase_lib('libogg.a')
3030

3131

32-
def process_args(ports):
33-
return []
34-
35-
3632
def show():
3733
return 'ogg (USE_OGG=1; zlib license)'
3834

tools/ports/regal.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,5 @@ def linker_setup(ports, settings):
125125
settings.FULL_ES2 = 1
126126

127127

128-
def process_args(ports):
129-
return []
130-
131-
132128
def show():
133129
return 'regal (USE_REGAL=1; Regal license)'

0 commit comments

Comments
 (0)