Skip to content

Commit

Permalink
Update local files with proper revision number
Browse files Browse the repository at this point in the history
Signed-off-by: Maroun Touma <touma@us.ibm.com>
  • Loading branch information
touma-I committed Oct 9, 2024
1 parent 999747d commit a1ff406
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions transforms/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
REPOROOT=../
# Use make help, to see the available rules
include ../.make.defaults
include ./transform.config


setup::
@# Help: Recursively make $@ all subdirs
Expand Down Expand Up @@ -78,11 +80,30 @@ workflow-upload::

set-versions::
@# Help: Recursively make $@ in all subdirs
# $(MAKE) TRANSFORM_PYTHON_VERSION=$(DPK_TRANSFORMS_VERSION) TOML_VERSION=$(DPK_TRANSFORMS_VERSION) .transforms.set-versions
make set-pkg-version
@$(MAKE) RULE=$@ .recurse

set-pkg-version:
-e 's/\("data-prep-toollitpk[_-].*transform[_-]python[=<>~][=]\).*"/\1$(TRANSFORM_PYTHON_VERSION)"/' \


echo $(TRANSFORMS_PKG_VERSION)
cat pyproject.toml | sed -e \
's/^version[ ]*=.*/version = "'${TRANSFORMS_PKG_VERSION}'"/' \
> tt
mv tt pyproject.toml
echo $(DPK_VERSION)
cat requirements.txt | sed -e \
's/data-prep-toolkit\([=><~][=]\).*/data-prep-toolkit\1$(DPK_VERSION)/' \
> tt
mv tt requirements.txt
cat requirements-ray.txt | sed -e \
's/data-prep-toolkit\[ray\]\([=><~][=]\).*/data-prep-toolkit\[ray\]\1$(DPK_VERSION)/' \
> tt
mv tt requirements-ray.txt


build-pkg-dist::
build-pkg-dist:
## Most transforms today don't have a package name.... Need to fix that
## In the meantime, we will copy everything to a single folder
-rm -fr src
Expand All @@ -98,7 +119,7 @@ build-pkg-dist::
$(MAKE) BUILD_WHEEL_ARG=-w .defaults.build-dist
-rm -fr src

test-pkg-dist::
test-pkg-dist:
-rm -fr venv
python -m venv venv
source venv/bin/activate && $(PYTHON) -m pip install '$(REPOROOT)/data-processing-lib/dist/data_prep_toolkit-$(DPK_VERSION)-py3-none-any.whl[dev,ray]'
Expand Down

0 comments on commit a1ff406

Please sign in to comment.