Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/pickley/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from runez.pyenv import PypiStd, PythonDepot, Version

from pickley import bstrap
from pickley.bstrap import PICKLEY

LOG = logging.getLogger(__name__)
DEFAULT_VERSION_CHECK_DELAY = 300
Expand Down Expand Up @@ -588,6 +589,9 @@ def save_manifest(self):
manifest.package_manager = venv_settings.package_manager
manifest.python_executable = venv_settings.python_executable

if self.canonical_name == PICKLEY:
runez.save_json(manifest.install_info, CFG.manifests / ".bootstrap.json")

payload = manifest.to_dict()
runez.save_json(payload, self.manifest_path)
folder = self.target_installation_folder()
Expand Down
8 changes: 5 additions & 3 deletions src/pickley/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from runez.pyenv import Version
from runez.render import PrettyTable

from pickley import bstrap, CFG, PackageSpec, Reporter, ResolvedPackage, TrackedInstallInfo, TrackedSettings
from pickley import bstrap, CFG, PackageSpec, PICKLEY, Reporter, ResolvedPackage, TrackedSettings
from pickley.package import VenvPackager

LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -342,7 +342,10 @@ def auto_heal():
@click.argument("package", required=True)
def auto_upgrade(force, package):
"""Background auto-upgrade command (called by wrapper)"""
CFG.require_bootstrap()
if package != PICKLEY:
# Auto-upgrade of pickley will mark current installation as bootstrapped
CFG.require_bootstrap()

canonical_name = CFG.required_canonical_name(package)
pspec = PackageSpec(canonical_name)
cooldown_path = CFG.cache / f"{canonical_name}.cooldown"
Expand Down Expand Up @@ -409,7 +412,6 @@ def bootstrap(base_folder, pickley_spec):

pspec = PackageSpec(pickley_spec or bstrap.PICKLEY, authoritative=bool(pickley_spec))
perform_install(pspec)
runez.save_json(TrackedInstallInfo.current(), bootstrap_marker)


@main.command()
Expand Down
Loading