Metadata-Version: 2.4
Name: venv-relocate
Version: 0.3.0
Summary: Detecte et corrige les chemins absolus casses d'un venv deplace ou renomme.
Author: Mehdi.A
License-Expression: MIT
Project-URL: Homepage, https://pypi.org/project/venv-relocate/
Keywords: venv,virtualenv,relocate,portability
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# venv-relocate

Detects and fixes broken absolute paths inside a Python virtual environment that has been moved or renamed.

## The problem

When you move or rename the parent folder of a venv, all scripts inside it still hold the old absolute path hardcoded (shebangs, `pyvenv.cfg`, activation scripts). The venv becomes unusable even though the files are physically still there.

`venv-relocate` detects the mismatch between the recorded path and the real path, then rewrites the affected files in-place.

## What it fixes

- `pyvenv.cfg`
- Shebangs of all scripts in `bin/` (or `Scripts/` on Windows)
- Activation scripts: `activate`, `activate.csh`, `activate.fish`, `Activate.ps1`

## Installation

```bash
pip install venv-relocate
```

## Usage

```bash
# Preview what would be changed (nothing is written)
venv-relocate .venv --dry-run

# Apply fixes (creates .bak backups by default)
venv-relocate .venv

# Apply without backups
venv-relocate .venv --no-backup
```

## License

Copyright (c) 2026 Mehdi.A — MIT
