@@ -167,23 +167,6 @@ def _get_interop_filename():
167
167
return os .path .join ("src" , "runtime" , interop_filename )
168
168
169
169
170
- def _get_source_files ():
171
- """Walk project and collect the files needed for ext_module"""
172
- for ext in (".sln" ,):
173
- for path in glob .glob ("*" + ext ):
174
- yield path
175
-
176
- for root , dirnames , filenames in os .walk ("src" ):
177
- for ext in (".cs" , ".csproj" , ".snk" , ".config" , ".py" , ".c" , ".h" , ".ico" ):
178
- for filename in fnmatch .filter (filenames , "*" + ext ):
179
- yield os .path .join (root , filename )
180
-
181
- for root , dirnames , filenames in os .walk ("tools" ):
182
- for ext in (".exe" , ".py" , ".c" , ".h" ):
183
- for filename in fnmatch .filter (filenames , "*" + ext ):
184
- yield os .path .join (root , filename )
185
-
186
-
187
170
def _get_long_description ():
188
171
"""Helper to populate long_description for pypi releases"""
189
172
return open ("README.rst" ).read ()
@@ -362,8 +345,6 @@ def build_extension(self, ext):
362
345
),
363
346
shell = use_shell ,
364
347
)
365
- if DEVTOOLS == "Mono" or DEVTOOLS == "dotnet" :
366
- self ._build_monoclr ()
367
348
368
349
def _get_manifest (self , build_dir ):
369
350
if DEVTOOLS != "MsDev" and DEVTOOLS != "MsDev15" :
@@ -379,30 +360,6 @@ def _get_manifest(self, build_dir):
379
360
subprocess .check_call (" " .join (cmd ), shell = False )
380
361
return manifest
381
362
382
- def _build_monoclr (self ):
383
- try :
384
- mono_libs = _check_output ("pkg-config --libs mono-2" , shell = True )
385
- except :
386
- if DEVTOOLS == "dotnet" :
387
- print ("Skipping building monoclr module..." )
388
- return
389
- raise
390
- mono_cflags = _check_output ("pkg-config --cflags mono-2" , shell = True )
391
- glib_libs = _check_output ("pkg-config --libs glib-2.0" , shell = True )
392
- glib_cflags = _check_output ("pkg-config --cflags glib-2.0" , shell = True )
393
- cflags = mono_cflags .strip () + " " + glib_cflags .strip ()
394
- libs = mono_libs .strip () + " " + glib_libs .strip ()
395
-
396
- # build the clr python module
397
- clr_ext = Extension (
398
- "clr" ,
399
- sources = ["src/monoclr/pynetinit.c" , "src/monoclr/clrmod.c" ],
400
- extra_compile_args = cflags .split (" " ),
401
- extra_link_args = libs .split (" " ),
402
- )
403
-
404
- build_ext .build_ext .build_extension (self , clr_ext )
405
-
406
363
def _install_packages (self ):
407
364
"""install packages using nuget"""
408
365
use_shell = DEVTOOLS == "Mono" or DEVTOOLS == "dotnet"
@@ -643,6 +600,7 @@ def run(self):
643
600
author = "The Python for .Net developers" ,
644
601
author_email = "pythondotnet@python.org" ,
645
602
setup_requires = setup_requires ,
603
+ install_requires = ["clr_loader" ],
646
604
long_description = _get_long_description (),
647
605
ext_modules = [Extension ("clr" , sources = list (_get_source_files ()))],
648
606
data_files = [("{install_platlib}" , ["{build_lib}/Python.Runtime.dll" ])],
0 commit comments