This is an automated email from the ASF dual-hosted git repository.

yzheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 654955151 Python client: add license check (#2580)
654955151 is described below

commit 65495515121d52e6c63a87ce3ee05e6ad7a1b544
Author: Yong Zheng <yongzheng0...@gmail.com>
AuthorDate: Tue Sep 16 20:41:40 2025 -0500

    Python client: add license check (#2580)
    
    * Python client: add license check
    
    * Python client: add license check
    
    * Python client: add license check
    
    * test
    
    * Enable license check
---
 .github/workflows/python-client.yml |  4 ++++
 Makefile                            |  6 ++++++
 client/python/pyproject.toml        | 29 +++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+)

diff --git a/.github/workflows/python-client.yml 
b/.github/workflows/python-client.yml
index 1e61e8378..dc445f926 100644
--- a/.github/workflows/python-client.yml
+++ b/.github/workflows/python-client.yml
@@ -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
diff --git a/Makefile b/Makefile
index 6f8e89942..9211d791f 100644
--- a/Makefile
+++ b/Makefile
@@ -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
+       @echo "--- License compliance check complete ---"
+
 .PHONY: client-build
 client-build: client-setup-env ## Build client distribution
        @echo "--- Building client distribution ---"
diff --git a/client/python/pyproject.toml b/client/python/pyproject.toml
index 7d4af8f1f..6d3f83389 100644
--- a/client/python/pyproject.toml
+++ b/client/python/pyproject.toml
@@ -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"

Reply via email to