Skip to content

Commit

Permalink
Update vendored deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Feb 16, 2024
1 parent 0042183 commit b31b36e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,32 @@ def _create_package_from_conda_yaml(
else:
target.write_text(output, encoding="utf-8")

# Remove conda.yaml
if backup:
new_path = conda_yaml.parent / (conda_yaml.name + ".bak")
print(f"Renaming {conda_yaml.name} to {new_path.name}", file=stream)
new_conda_yaml_path = conda_yaml.parent / (conda_yaml.name + ".bak")
print(f"Renaming {conda_yaml.name} to {new_conda_yaml_path.name}", file=stream)
if not dry_run:
conda_yaml.rename(new_path)
conda_yaml.rename(new_conda_yaml_path)
else:
print(f"Removing {conda_yaml.name}", file=stream)
if not dry_run:
os.remove(conda_yaml)

# Remove robot.yaml
robot_yaml = conda_yaml.parent / "robot.yaml"
if robot_yaml.exists():
if backup:
new_robot_yaml_path = robot_yaml.parent / (robot_yaml.name + ".bak")
print(
f"Renaming {robot_yaml.name} to {new_robot_yaml_path.name}", file=stream
)
if not dry_run:
robot_yaml.rename(new_robot_yaml_path)
else:
print(f"Removing {robot_yaml.name}", file=stream)
if not dry_run:
os.remove(robot_yaml)


def update_package(
cwd: Path, dry_run: bool, backup: bool = True, *, stream=None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import weakref
from typing import Dict, Iterator, List, Optional, Sequence, Union

from ._deps_protocols import PyPiInfoTypedDict, ReleaseData, Versions, VersionStr
from ._deps_protocols import (PyPiInfoTypedDict, ReleaseData, Versions,
VersionStr)

log = logging.getLogger(__name__)

Expand Down

0 comments on commit b31b36e

Please sign in to comment.