Skip to content

Commit bd98f3e

Browse files
committed
RHAIENG-304: update sync-requirements-txt.sh to generate requirements.txt with micropipenv and add pylock.toml output with uv (#2145)
1 parent e7755d5 commit bd98f3e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,12 @@ refresh-pipfilelock-files:
448448
echo "Processing directory: $$dir"
449449
cd $(ROOT_DIR)
450450
if [ -d "$$dir" ]; then
451-
echo "Updating $(PYTHON_VERSION) Pipfile.lock in $$dir"
451+
echo "Updating $(PYTHON_VERSION) uv.lock in $$dir"
452452
cd $$dir
453-
if [ -f "Pipfile" ]; then
454-
pipenv lock || pipenv lock --verbose
453+
if [ -f "pyproject.toml" ]; then
454+
uv lock
455455
else
456-
echo "No Pipfile found in $$dir, skipping."
456+
echo "No pyproject.toml found in $$dir, skipping."
457457
fi
458458
else
459459
echo "Skipping $$dir as it does not exist"

scripts/sync-requirements-txt.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set -Eeuxo pipefail
77
# The following will create an extra requirement.txt file for every Pipfile.lock we have.
88
micropipenv --version || pip install micropipenv
99
find . -name Pipfile.lock -execdir bash -c '
10+
pwd
1011
echo "# Generated by /scripts/sync-requirements-txt.sh from Pipfile.lock" > requirements.txt &&
1112
echo >> requirements.txt &&
12-
micropipenv requirements >> requirements.txt' \;
13+
micropipenv requirements >> requirements.txt
14+
uv pip compile pyproject.toml --output-file pylock.toml --format pylock.toml --generate-hashes --emit-index-url --python-platform linux --no-annotate -q' \;

0 commit comments

Comments
 (0)