mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
feat: add poetry.lock to uv migration (#1468)
This commit is contained in:
committed by
GitHub
parent
e4f950720c
commit
69cd84d78f
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
import tomli_w
|
import tomli_w
|
||||||
@@ -94,6 +95,15 @@ def migrate_pyproject(input_file, output_file):
|
|||||||
shutil.copy2(input_file, backup_file)
|
shutil.copy2(input_file, backup_file)
|
||||||
print(f"Original pyproject.toml backed up as {backup_file}")
|
print(f"Original pyproject.toml backed up as {backup_file}")
|
||||||
|
|
||||||
|
# Rename the poetry.lock file
|
||||||
|
lock_file = "poetry.lock"
|
||||||
|
lock_backup = "poetry-old.lock"
|
||||||
|
if os.path.exists(lock_file):
|
||||||
|
os.rename(lock_file, lock_backup)
|
||||||
|
print(f"Original poetry.lock renamed to {lock_backup}")
|
||||||
|
else:
|
||||||
|
print("No poetry.lock file found to rename.")
|
||||||
|
|
||||||
# Write the new pyproject.toml
|
# Write the new pyproject.toml
|
||||||
with open(output_file, "wb") as f:
|
with open(output_file, "wb") as f:
|
||||||
tomli_w.dump(new_pyproject, f)
|
tomli_w.dump(new_pyproject, f)
|
||||||
|
|||||||
Reference in New Issue
Block a user