File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -169,11 +169,22 @@ client-license-check: client-setup-env ## Run license compliance check
169169 @echo " --- License compliance check complete ---"
170170
171171.PHONY : client-build
172- client-build : client-setup-env # # Build client distribution
172+ client-build : client-setup-env # # Build client distribution. Pass FORMAT=sdist or FORMAT=wheel to build a specific format.
173173 @echo " --- Building client distribution ---"
174- @$(ACTIVATE_AND_CD ) && poetry build
174+ @if [ -n " $( FORMAT) " ]; then \
175+ if [ " $( FORMAT) " != " sdist" ] && [ " $( FORMAT) " != " wheel" ]; then \
176+ echo " Error: Invalid format '$( FORMAT) '. Supported formats are 'sdist' and 'wheel'." >&2 ; \
177+ exit 1; \
178+ fi ; \
179+ echo " Building with format: $( FORMAT) " ; \
180+ $(ACTIVATE_AND_CD ) && poetry build --format $(FORMAT ) ; \
181+ else \
182+ echo " Building default distribution (sdist and wheel)" ; \
183+ $(ACTIVATE_AND_CD ) && poetry build; \
184+ fi
175185 @echo " --- Client distribution build complete ---"
176186
187+
177188.PHONY : client-cleanup
178189client-cleanup : # # Cleanup virtual environment and Python cache files
179190 @echo " --- Cleaning up virtual environment and Python cache files ---"
Original file line number Diff line number Diff line change @@ -135,6 +135,16 @@ tasks.named<RatTask>("rat").configure {
135135 excludes.add(" **/*.png" )
136136}
137137
138+ tasks.register<Exec >(" buildPythonClient" ) {
139+ description = " Build the python client"
140+
141+ workingDir = project.projectDir
142+ if (project.hasProperty(" python.format" )) {
143+ environment(" FORMAT" , project.property(" python.format" ) as String )
144+ }
145+ commandLine(" make" , " client-build" )
146+ }
147+
138148// Pass environment variables:
139149// ORG_GRADLE_PROJECT_apacheUsername
140150// ORG_GRADLE_PROJECT_apachePassword
You can’t perform that action at this time.
0 commit comments