File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -266,13 +266,19 @@ def glob_cfiles(path, excludes):
266
266
267
267
for folder in glob .glob (os .path .join (USER_DIR , '*/' )):
268
268
module_name = folder .split ('/' )[- 2 ]
269
- print (folder .split ('/' ))
270
269
print ('Found User Module: {}' .format (module_name ))
271
270
user_sources = glob .glob (folder + '/*.pyx' )
272
271
print ('\t Found Cython sources: {}' .format (user_sources ))
272
+
273
273
if len (user_sources ) != 1 :
274
274
raise BuildError ("User Modules are only allowed one Cython .pyx file" )
275
- user_sources += glob_cfiles (folder , excludes = user_sources )
275
+
276
+ cfilename = user_sources [0 ].split ('/' )[- 1 ][:- 4 ] + '.c'
277
+ print (cfilename )
278
+ user_sources += glob_cfiles (folder , excludes = [cfilename ])
279
+
280
+ print (user_sources )
281
+
276
282
ext_modules .append (
277
283
Extension ("fidimag.extensions.user.{}" .format (module_name ),
278
284
sources = user_sources ,
You can’t perform that action at this time.
0 commit comments