@@ -366,14 +366,14 @@ def package_systems():
366366 [Feature('homebrew'), Feature('sage_spkg'), Feature('pip')]
367367 """
368368 # The current implementation never returns more than one system.
369- from subprocess import run , CalledProcessError
369+ from subprocess import run , CalledProcessError , PIPE
370370 global _cache_package_systems
371371 if _cache_package_systems is None :
372372 _cache_package_systems = []
373373 # Try to use scripts from SAGE_ROOT (or an installation of sage_bootstrap)
374374 # to obtain system package advice.
375375 try :
376- proc = run ('sage-guess-package-system' , shell = True , capture_output = True , text = True , check = True )
376+ proc = run ('sage-guess-package-system' , shell = True , stdout = PIPE , stderr = PIPE , text = True , check = True )
377377 _cache_package_systems = [PackageSystem (proc .stdout .strip ())]
378378 except CalledProcessError :
379379 pass
@@ -435,16 +435,16 @@ def _spkg_installation_hint(self, spkgs, prompt, feature):
435435 sage: fedora.spkg_installation_hint('openblas') # optional - SAGE_ROOT
436436 'To install openblas using the fedora package manager, you can try to run:\n!sudo yum install openblas-devel'
437437 """
438- from subprocess import run , CalledProcessError
438+ from subprocess import run , CalledProcessError , PIPE
439439 lines = []
440440 system = self .name
441441 try :
442442 proc = run (f'sage-get-system-packages { system } { spkgs } ' ,
443- shell = True , capture_output = True , text = True , check = True )
443+ shell = True , stdout = PIPE , stderr = PIPE , text = True , check = True )
444444 system_packages = proc .stdout .strip ()
445445 print_sys = f'sage-print-system-package-command { system } --verbose --sudo --prompt="{ prompt } "'
446446 command = f'{ print_sys } update && { print_sys } install { system_packages } '
447- proc = run (command , shell = True , capture_output = True , text = True , check = True )
447+ proc = run (command , shell = True , stdout = PIPE , stderr = PIPE , text = True , check = True )
448448 command = proc .stdout .strip ()
449449 if command :
450450 lines .append (f'To install { feature } using the { system } package manager, you can try to run:' )
0 commit comments