mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
refactoring: revert platform moving to backwards compatibility (#5564)
Consensus with #5549 cc #5538 ## For community ⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍 comment** --------- Co-authored-by: a <1@1.1> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
6860388c88
commit
69dce1b293
7 changed files with 5 additions and 4 deletions
|
@ -31,7 +31,7 @@ packages = [
|
||||||
"xonsh.shells.ptk_shell",
|
"xonsh.shells.ptk_shell",
|
||||||
"xonsh.parsers.ply",
|
"xonsh.parsers.ply",
|
||||||
"xonsh.procs",
|
"xonsh.procs",
|
||||||
"xonsh.platform",
|
"xonsh.platforms",
|
||||||
"xonsh.parsers",
|
"xonsh.parsers",
|
||||||
"xonsh.xoreutils",
|
"xonsh.xoreutils",
|
||||||
"xontrib",
|
"xontrib",
|
||||||
|
|
|
@ -980,7 +980,7 @@ def make_default_aliases():
|
||||||
default_aliases["deactivate"] = ["source-cmd", "deactivate.bat"]
|
default_aliases["deactivate"] = ["source-cmd", "deactivate.bat"]
|
||||||
if shutil.which("sudo", path=XSH.env.get_detyped("PATH")):
|
if shutil.which("sudo", path=XSH.env.get_detyped("PATH")):
|
||||||
# XSH.commands_cache is not available during setup
|
# XSH.commands_cache is not available during setup
|
||||||
import xonsh.platform.winutils as winutils
|
import xonsh.platforms.winutils as winutils
|
||||||
|
|
||||||
def sudo(args):
|
def sudo(args):
|
||||||
if len(args) < 1:
|
if len(args) < 1:
|
||||||
|
|
|
@ -67,7 +67,7 @@ def msvcrt():
|
||||||
@lazyobject
|
@lazyobject
|
||||||
def winutils():
|
def winutils():
|
||||||
if ON_WINDOWS:
|
if ON_WINDOWS:
|
||||||
import xonsh.platform.winutils as m
|
import xonsh.platforms.winutils as m
|
||||||
else:
|
else:
|
||||||
m = None
|
m = None
|
||||||
return m
|
return m
|
||||||
|
@ -76,7 +76,7 @@ def winutils():
|
||||||
@lazyobject
|
@lazyobject
|
||||||
def macutils():
|
def macutils():
|
||||||
if ON_DARWIN:
|
if ON_DARWIN:
|
||||||
import xonsh.platform.macutils as m
|
import xonsh.platforms.macutils as m
|
||||||
else:
|
else:
|
||||||
m = None
|
m = None
|
||||||
return m
|
return m
|
||||||
|
|
1
xonsh/platforms/__init__.py
Normal file
1
xonsh/platforms/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
"""Platform-dependent code."""
|
Loading…
Add table
Reference in a new issue