typo
This commit is contained in:
parent
fd51a0625f
commit
8e8409afc4
@ -32,7 +32,7 @@ def config_logging(verbose: bool):
|
|||||||
logging.getLogger().setLevel(logging.DEBUG)
|
logging.getLogger().setLevel(logging.DEBUG)
|
||||||
mommy_logger.setLevel(50)
|
mommy_logger.setLevel(50)
|
||||||
serious_logger.setLevel(logging.DEBUG)
|
serious_logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
|
||||||
WRAPPER_TEMPLATE = """#!{inner_bin}
|
WRAPPER_TEMPLATE = """#!{inner_bin}
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
@ -75,8 +75,8 @@ PIP_HOOK = """# GENERATED BY MOMMY
|
|||||||
|
|
||||||
first_line = text.split("\\n")[0]
|
first_line = text.split("\\n")[0]
|
||||||
if not ("inner_" in first_line and first_line.startswith("#!")):
|
if not ("inner_" in first_line and first_line.startswith("#!")):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
print(f"mommifying " + str(path))
|
print(f"mommifying " + str(path))
|
||||||
|
|
||||||
text = text.replace("inner_", "", 1)
|
text = text.replace("inner_", "", 1)
|
||||||
@ -145,7 +145,7 @@ def install_pip_hook(path: Path):
|
|||||||
mommy_logger.info("ahhhhh mommy already watches %s", str(path))
|
mommy_logger.info("ahhhhh mommy already watches %s", str(path))
|
||||||
serious_logger.info("pip hook already installed at %s", str(path))
|
serious_logger.info("pip hook already installed at %s", str(path))
|
||||||
return
|
return
|
||||||
|
|
||||||
mommy_logger.info("mommy needs to keep an eye on this little pip~ %s", str(path))
|
mommy_logger.info("mommy needs to keep an eye on this little pip~ %s", str(path))
|
||||||
serious_logger.info("installing pip hook at %s", str(path))
|
serious_logger.info("installing pip hook at %s", str(path))
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ def install_pip_hook(path: Path):
|
|||||||
|
|
||||||
def cli_compile_config():
|
def cli_compile_config():
|
||||||
parser = argparse.ArgumentParser(description="only recompile the config")
|
parser = argparse.ArgumentParser(description="only recompile the config")
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-v", "--verbose",
|
"-v", "--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
@ -176,7 +176,7 @@ def cli_compile_config():
|
|||||||
|
|
||||||
def mommify_venv():
|
def mommify_venv():
|
||||||
parser = argparse.ArgumentParser(description="patch the virtual environment to use mommy")
|
parser = argparse.ArgumentParser(description="patch the virtual environment to use mommy")
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-v", "--verbose",
|
"-v", "--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
@ -203,7 +203,7 @@ def mommify_venv():
|
|||||||
|
|
||||||
mommy_logger.info("mommy looks in %s to mess your system up~ <33", str(bin_path))
|
mommy_logger.info("mommy looks in %s to mess your system up~ <33", str(bin_path))
|
||||||
serious_logger.info("scanning binary directory of venv at %s", str(bin_path))
|
serious_logger.info("scanning binary directory of venv at %s", str(bin_path))
|
||||||
|
|
||||||
resolved_symlinks = {}
|
resolved_symlinks = {}
|
||||||
for path in list(bin_path.iterdir()):
|
for path in list(bin_path.iterdir()):
|
||||||
if path.is_symlink():
|
if path.is_symlink():
|
||||||
@ -217,8 +217,8 @@ def mommify_venv():
|
|||||||
# check for both just to be more expressive
|
# check for both just to be more expressive
|
||||||
if name.startswith("inner_"):
|
if name.startswith("inner_"):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if subprocess.run([str(path), '-c', '"exit(0)"'], stdout=sys.devnull).returncode != 0:
|
if subprocess.run([str(path), '-c', '"exit(0)"']).returncode != 0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
wrap_interpreter(path, resolved_symlinks[path.name])
|
wrap_interpreter(path, resolved_symlinks[path.name])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user