mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Rename to uv
(#1302)
First, replace all usages in files in-place. I used my editor for this. If someone wants to add a one-liner that'd be fun. Then, update directory and file names: ``` # Run twice for nested directories find . -type d -print0 | xargs -0 rename s/puffin/uv/g find . -type d -print0 | xargs -0 rename s/puffin/uv/g # Update files find . -type f -print0 | xargs -0 rename s/puffin/uv/g ``` Then add all the files again ``` # Add all the files again git add crates git add python/uv # This one needs a force-add git add -f crates/uv-trampoline ```
This commit is contained in:
parent
328b116d5d
commit
2586f655bb
229 changed files with 1796 additions and 1818 deletions
|
@ -3,12 +3,12 @@ import sys
|
|||
import sysconfig
|
||||
|
||||
|
||||
def find_puffin_bin() -> str:
|
||||
"""Return the puffin binary path."""
|
||||
def find_uv_bin() -> str:
|
||||
"""Return the uv binary path."""
|
||||
|
||||
puffin_exe = "puffin" + sysconfig.get_config_var("EXE")
|
||||
uv_exe = "uv" + sysconfig.get_config_var("EXE")
|
||||
|
||||
path = os.path.join(sysconfig.get_path("scripts"), puffin_exe)
|
||||
path = os.path.join(sysconfig.get_path("scripts"), uv_exe)
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
|
||||
|
@ -21,7 +21,7 @@ def find_puffin_bin() -> str:
|
|||
else:
|
||||
user_scheme = "posix_user"
|
||||
|
||||
path = os.path.join(sysconfig.get_path("scripts", scheme=user_scheme), puffin_exe)
|
||||
path = os.path.join(sysconfig.get_path("scripts", scheme=user_scheme), uv_exe)
|
||||
if os.path.isfile(path):
|
||||
return path
|
||||
|
||||
|
@ -29,11 +29,11 @@ def find_puffin_bin() -> str:
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
puffin = os.fsdecode(find_puffin_bin())
|
||||
uv = os.fsdecode(find_uv_bin())
|
||||
if sys.platform == "win32":
|
||||
import subprocess
|
||||
|
||||
completed_process = subprocess.run([puffin, *sys.argv[1:]])
|
||||
completed_process = subprocess.run([uv, *sys.argv[1:]])
|
||||
sys.exit(completed_process.returncode)
|
||||
else:
|
||||
os.execvp(puffin, [puffin, *sys.argv[1:]])
|
||||
os.execvp(uv, [uv, *sys.argv[1:]])
|
Loading…
Add table
Add a link
Reference in a new issue