@@ -111,7 +111,7 @@ def blosc_extension():
111111 sources = ['numcodecs/blosc.pyx' ]
112112
113113 # define extension module
114- extensions = [
114+ return [
115115 Extension (
116116 'numcodecs.blosc' ,
117117 sources = sources + blosc_sources ,
@@ -122,8 +122,6 @@ def blosc_extension():
122122 ),
123123 ]
124124
125- return extensions
126-
127125
128126def zstd_extension ():
129127 info ('setting up Zstandard extension' )
@@ -153,7 +151,7 @@ def zstd_extension():
153151 extra_objects = []
154152
155153 # define extension module
156- extensions = [
154+ return [
157155 Extension (
158156 'numcodecs.zstd' ,
159157 sources = sources + zstd_sources ,
@@ -164,8 +162,6 @@ def zstd_extension():
164162 ),
165163 ]
166164
167- return extensions
168-
169165
170166def lz4_extension ():
171167 info ('setting up LZ4 extension' )
@@ -182,7 +178,7 @@ def lz4_extension():
182178 sources = ['numcodecs/lz4.pyx' ]
183179
184180 # define extension module
185- extensions = [
181+ return [
186182 Extension (
187183 'numcodecs.lz4' ,
188184 sources = sources + lz4_sources ,
@@ -192,8 +188,6 @@ def lz4_extension():
192188 ),
193189 ]
194190
195- return extensions
196-
197191
198192def vlen_extension ():
199193 info ('setting up vlen extension' )
@@ -209,7 +203,7 @@ def vlen_extension():
209203 sources = ['numcodecs/vlen.pyx' ]
210204
211205 # define extension module
212- extensions = [
206+ return [
213207 Extension (
214208 'numcodecs.vlen' ,
215209 sources = sources ,
@@ -219,8 +213,6 @@ def vlen_extension():
219213 ),
220214 ]
221215
222- return extensions
223-
224216
225217def fletcher_extension ():
226218 info ('setting up fletcher32 extension' )
@@ -235,7 +227,7 @@ def fletcher_extension():
235227 sources = ['numcodecs/fletcher32.pyx' ]
236228
237229 # define extension module
238- extensions = [
230+ return [
239231 Extension (
240232 'numcodecs.fletcher32' ,
241233 sources = sources ,
@@ -245,8 +237,6 @@ def fletcher_extension():
245237 ),
246238 ]
247239
248- return extensions
249-
250240
251241def jenkins_extension ():
252242 info ('setting up jenkins extension' )
@@ -261,7 +251,7 @@ def jenkins_extension():
261251 sources = ['numcodecs/jenkins.pyx' ]
262252
263253 # define extension module
264- extensions = [
254+ return [
265255 Extension (
266256 'numcodecs.jenkins' ,
267257 sources = sources ,
@@ -271,8 +261,6 @@ def jenkins_extension():
271261 ),
272262 ]
273263
274- return extensions
275-
276264
277265def compat_extension ():
278266 info ('setting up compat extension' )
@@ -282,16 +270,14 @@ def compat_extension():
282270 sources = ['numcodecs/compat_ext.pyx' ]
283271
284272 # define extension module
285- extensions = [
273+ return [
286274 Extension (
287275 'numcodecs.compat_ext' ,
288276 sources = sources ,
289277 extra_compile_args = extra_compile_args ,
290278 ),
291279 ]
292280
293- return extensions
294-
295281
296282def shuffle_extension ():
297283 info ('setting up shuffle extension' )
@@ -301,12 +287,10 @@ def shuffle_extension():
301287 sources = ['numcodecs/_shuffle.pyx' ]
302288
303289 # define extension module
304- extensions = [
290+ return [
305291 Extension ('numcodecs._shuffle' , sources = sources , extra_compile_args = extra_compile_args ),
306292 ]
307293
308- return extensions
309-
310294
311295if sys .platform == 'win32' :
312296 ext_errors = (CCompilerError , ExecError , PlatformError , IOError , ValueError )
0 commit comments