Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/python-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
run: |
make client-lint

- name: License Compliance Check
run: |
make client-license-check

- name: Generated Client Tests
run: |
make client-unit-test
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ client-integration-test: client-setup-env ## Run client integration tests
@echo "Tearing down Docker Compose services..."
@$(DOCKER) compose -f $(PYTHON_CLIENT_DIR)/docker-compose.yml down || true # Ensure teardown even if tests fail

.PHONY: client-license-check
client-license-check: client-setup-env ## Run license compliance check
@echo "--- Starting license compliance check ---"
@$(ACTIVATE_AND_CD) && pip-licenses
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow this does not work for me in an old poetry environment.

pip-licenses: command not found

But I've verified that a clean install will work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the previous poetry env doesn't have this dependency installed as I added it last night via this PR. In case if u want that env to work, u can source the venv then run poetry command to install all again.

Copy link
Contributor

@HonahX HonahX Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I ran make install-dependencies and I saw poetry explicitly said it installed pip-licenses yet it still could not found it. Could be some other weird issue in that env. So I ends up using a clean environment to verify : )

Using poetry run pip-licenses will work btw

@echo "--- License compliance check complete ---"

.PHONY: client-build
client-build: client-setup-env ## Build client distribution
@echo "--- Building client distribution ---"
Expand Down
29 changes: 29 additions & 0 deletions client/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,39 @@ mypy = ">=1.18, <=1.18.1"
pyiceberg = "==0.10.0"
pre-commit = "==4.3.0"
openapi-generator-cli = "==7.11.0.post0"
pip-licenses = "==5.0.0"
# pin virtualenv version to prevent poetry from upgrading to an incompatible version
# see https://github.com/python-poetry/poetry/issues/10504#issuecomment-3176923981
virtualenv = ">=20.26.6,<20.33.0"

[tool.pip-licenses]
from-classifier = true
# Packages with "UNKNOWN" licenses in pip-licenses metadata.
# These have been manually verified and are known to be compatible with ASF.
ignore-packages = [
"anyio", # MIT License (MIT)
"build", # MIT License (MIT)
"CacheControl", # Apache-2.0
"cffi", # MIT License (MIT)
"click", # BSD-3-Clause
"fsspec", # BSD-3-Clause
"jaraco.functools", # MIT License (MIT)
"jeepney", # MIT License (MIT)
"more-itertools", # MIT License (MIT)
"mypy_extensions", # MIT License (MIT)
"pyparsing", # MIT License (MIT)
"RapidFuzz", # MIT License (MIT)
"SecretStorage", # BSD-3-Clause
"types-python-dateutil", # Apache-2.0
"typing-inspection", # MIT License (MIT)
"typing_extensions", # PSF-2.0
"urllib3", # MIT License (MIT)
"zipp", # MIT License (MIT)
"zstandard", # BSD-3-Clause
]
partial-match = true
allow-only = "MIT;Apache;BSD License;PSF-2.0;ISC;The Unlicense;Python Software Foundation License;Mozilla Public License"

[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0", "openapi-generator-cli==7.11.0.post0"]
build-backend = "poetry.core.masonry.api"
Expand Down