Skip to content

feat: Make generate_clients.py windows compatible#3084

Merged
MonkeyCanCode merged 2 commits intoapache:mainfrom
MonkeyCanCode:3051
Nov 20, 2025
Merged

feat: Make generate_clients.py windows compatible#3084
MonkeyCanCode merged 2 commits intoapache:mainfrom
MonkeyCanCode:3051

Conversation

@MonkeyCanCode
Copy link
Contributor

This PR is to added windows support for python cli (#3051).

Here are some sample output:

Poetry install:

(venv) PS C:\Users\Yong\Desktop\test\polaris-main\polaris-main\client\python> poetry install --all-extras
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: apache-polaris (1.2.0)Preparing build environment with build-system requirements poetry-core==2.2.1, openapi-generator-cli==7.12.0
Preparing spec directory...
Copying spec directory from C:\Users\Yong\Desktop\test\polaris-main\polaris-main\spec to C:\Users\Yong\Desktop\test\polaris-main\polaris-main\client\python\spec
Spec directory copied to ensure it is up-to-date.
Deleting old tests...
Old test deletion complete.
Fixing catalog models __init__.py...
Catalog models __init__.py fixed.
Re-applying license headers...
License fix complete.
Installing the current project: apache-polaris (1.2.0)

(venv) PS C:\Users\Yong\Desktop\test\polaris-main\polaris-main\client\python> polaris
...
Exception: Please provide credentials via either --client-id & --client-secret or --access-token. Alternatively, you may set the environment variables CLIENT_ID & CLIENT_SECRET.

Poetry build:

(venv) PS C:\Users\Yong\Desktop\test\polaris-main\polaris-main\client\python> poetry build
Building apache-polaris (1.2.0)
Building sdist
Building wheel
(venv) PS C:\Users\Yong\Desktop\test\polaris-main\polaris-main\client\python\dist> ls


    Directory: C:\Users\Yong\Desktop\test\polaris-main\polaris-main\client\python\dist


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        11/19/2025  12:26 AM         548278 apache_polaris-1.2.0-cp310-cp310-win_amd64.whl
-a----        11/19/2025  12:26 AM         233088 apache_polaris-1.2.0.tar.gz

Install whl from poetry build:

(venv) PS C:\Users\Yong\Desktop\test\test_pkg> pip install C:\Users\Yong\Desktop\test\polaris-main\polaris-main\client\python\dist\apache_polaris-1.2.0-cp310-cp310-win_amd64.whl
Processing c:\users\Yong\desktop\test\polaris-main\polaris-main\client\python\dist\apache_polaris-1.2.0-cp310-cp310-win_amd64.whl
...
Installing collected packages: six, urllib3, python-dateutil, jmespath, typing-extensions, botocore, typing-inspection, s3transfer, pydantic-core, annotated-types, pydantic, boto3, apache-polaris
Successfully installed annotated-types-0.7.0 apache-polaris-1.2.0 boto3-1.40.76 botocore-1.40.76 jmespath-1.0.1 pydantic-2.11.10 pydantic-core-2.33.2 python-dateutil-2.9.0.post0 s3transfer-0.14.0 six-1.17.0 typing-extensions-4.15.0 typing-inspection-0.4.2 urllib3-2.5.0
...
(venv) PS C:\Users\Yong\Desktop\test\test_pkg> polaris
...
Exception: Please provide credentials via either --client-id & --client-secret or --access-token. Alternatively, you may set the environment variables CLIENT_ID & CLIENT_SECRET.

Install sdist from poetry build:

(venv) PS C:\Users\Yong\Desktop\test\test_dist> pip install C:\Users\Yong\Desktop\test\polaris-main\polaris-main\client\python\dist\apache_polaris-1.2.0.tar.gz
Processing c:\users\Yong\desktop\test\polaris-main\polaris-main\client\python\dist\apache_polaris-1.2.0.tar.gz
...
Successfully built apache-polaris
Installing collected packages: six, urllib3, python-dateutil, jmespath, typing-extensions, botocore, typing-inspection, s3transfer, pydantic-core, annotated-types, pydantic, boto3, apache-polaris
Successfully installed annotated-types-0.7.0 apache-polaris-1.2.0 boto3-1.40.76 botocore-1.40.76 jmespath-1.0.1 pydantic-2.11.10 pydantic-core-2.33.2 python-dateutil-2.9.0.post0 s3transfer-0.14.0 six-1.17.0 typing-extensions-4.15.0 typing-inspection-0.4.2 urllib3-2.5.0
...
(venv) PS C:\Users\Yong\Desktop\test\test_dist> polaris
...
Exception: Please provide credentials via either --client-id & --client-secret or --access-token. Alternatively, you may set the environment variables CLIENT_ID & CLIENT_SECRET.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

@snazy
Copy link
Member

snazy commented Nov 19, 2025

I don't mind making the Python part buildable on Win at all, which might be a requirement for cmake and/or testing against Win?
"Polaris itself" however can only be built on Linux or macOS.

@MonkeyCanCode
Copy link
Contributor Author

That is correct. I think the ask is for ensure on windows, people can do pip install and be able to integrate with Polaris with CLI.

I don't mind making the Python part buildable on Win at all, which might be a requirement for cmake and/or testing against Win?
"Polaris itself" however can only be built on Linux or macOS.

Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

This is great! Thanks for the quick fix here.

Yes, the goal here is just to ensure windows user can install Polaris CLI.

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Nov 20, 2025
@MonkeyCanCode
Copy link
Contributor Author

@snazy any concerns before this merge? I think we are all on the same page.

This is great! Thanks for the quick fix here.

Yes, the goal here is just to ensure windows user can install Polaris CLI.

@snazy
Copy link
Member

snazy commented Nov 20, 2025

Nah, no concerns from my side. It was just a question and note.

@MonkeyCanCode MonkeyCanCode merged commit b418762 into apache:main Nov 20, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Nov 20, 2025
snazy added a commit to snazy/polaris that referenced this pull request Feb 11, 2026
* Docs: update Helm Chart page to show usage without cloning Polaris github repo (apache#2939)

* Docs: update Helm Chart page to show usage without cloning Polaris github repo

* Apply suggestions from code review

* Add separate flows in Helm Chart doc for installing released chart and images vs building from source

---------

Co-authored-by: Alexandre Dutra <adutra@apache.org>

* docs: improve getting started and README documentation (apache#2267)

* The outdated config snippets and health-checks are removed from the index

* The binary guide stays focused and concise

* Update changelog with missing 1.3.0 features (apache#3087)

* Update registry.access.redhat.com/ubi9/openjdk-21-runtime Docker tag to v1.23-6.1763034977 (apache#3092)

* Update docker.io/jaegertracing/all-in-one Docker tag to v1.75.0 (apache#3093)

* feat: Make generate_clients.py windows compatible (apache#3084)

* Make generate_clients.py windows compatible

* Updated CHANGELOG.md

* PRs: Remove markdown-links-check from required checks (apache#3102)

The "Check Markdown links" workflow is known to produce false failures, leading to apache#3097.

This change is intended to unblock PRs due to these false failures.

* Update dependency com.diffplug.spotless:spotless-plugin-gradle to v8.1.0 (apache#3083)

* Update dependency com.diffplug.spotless:spotless-plugin-gradle to v8.1.0

* spotlessApply

---------

Co-authored-by: Robert Stupp <snazy@snazy.de>

* chore(deps): update gradle to v9.2.1 (apache#3069)

* chore(deps): update gradle to v9.2.1

* Fix Grale wrapper SHA

---------

Co-authored-by: Robert Stupp <snazy@snazy.de>

* chore(deps): update mongo docker tag to v8.2.2 (apache#3100)

* chore(deps): update docker.io/mongo docker tag to v8.2.2 (apache#3099)

* Source-tarball - eliminate git-gzip risk (apache#3075)

Details in the `git archive` chapter in https://reproducible-builds.org/docs/archives/

* NoSQL: Allow `null` IndexKey (de)serialization (apache#3076)

This change adopts the implementation to the API specification.

* PRs: Re-add markdown-links-check step (apache#3103)

The step was disabled in apache#3102 to pass CI and enable merging.

* NoSQL: Add maintenance implementation (apache#3077)

* Inject DefaultFileIOFactory in tests (apache#3043)

* Inject DefaultFileIOFactory in tests

also simplify `TaskFileIOSupplier` usage in tests, which allows removal
of `TestFileIOFactory`.

* Update Quarkus Platform and Group to v3.29.4 (apache#3094)

* Site: Replace feather logo (apache#3101)

The ASF has a new logo, a leaf. There is sadly no free icon that matches the new logo, so replacing the feather-ASF with "The ASF" in the top-bar navigation.

* Update actions/checkout action to v6 (apache#3106)

* Core: resolveAll() must be called before reading resolution results (apache#3064)

* Site: Added GCS related Bucket Properties for vending credentials. (apache#3066)

* Publish/pom: don't include test-fixtures dependencies as runtime (apache#3085)

The list of dependencies in pom's includes the api/runtime elements of the test-fixtures, which is not what should be published, as it "pulls up" deps like junit, mockito and assertj as Maven runtime scope dependencies.
This change fixes this.

* Increase javadoc visibility in `persistence/nosql/persistence/cdi/weld` (apache#3110)

This is to fix javadoc error: `No public or protected classes found to document`

* Disable cloud storage tests that would use @tempdir (apache#3095)

Disable tests from ViewCatalogTests for cloud storage integration tests
(S3, ADLS, GCS) that would otherwise use @tempdir. Since @tempdir internally
uses Paths.get, it cannot point to cloud storage paths. These tests remain
enabled for file-based integration tests.

* Remove 'beta' label for Generic Table (apache#3096)

* remove beta label

* address comments for change log

---------

Co-authored-by: Pierre Laporte <pierre@pingtimeout.fr>

* Update dependency jupyterlab to v4.5.0 (apache#3074)

* chore: Fix md link check in GH action (apache#3128)

* Fix md link check in GH action

* Fix md link check in GH action

* Update dependency pre-commit to v4.5.0 (apache#3123)

* Update dependency software.amazon.awssdk:bom to v2.39.2 (apache#3127)

* NoSQL: authZ API, SPI, impl and store (apache#3078)

NoSQL base functionality for ACLs

* NoSQL: Quarkus distributed cache invalidation (apache#3105)

Adds support for distributed NoSQL cache invalidation leveraging Quarkus.

* NoSQL: adjustments / merge fixes

* Last merged commit e124348

---------

Co-authored-by: Oleg Soloviov <40199597+olsoloviov@users.noreply.github.com>
Co-authored-by: Alexandre Dutra <adutra@apache.org>
Co-authored-by: Subham <subham.sangwan@adypu.edu.in>
Co-authored-by: Pierre Laporte <pierre@pingtimeout.fr>
Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Yong Zheng <yongzheng0809@gmail.com>
Co-authored-by: Christopher Lambert <xn137@gmx.de>
Co-authored-by: Yufei Gu <yufei@apache.org>
Co-authored-by: Saksham Ratra <sakshamratra.0106@gmail.com>
Co-authored-by: Dmitri Bourlatchkov <dmitri.bourlatchkov@gmail.com>
Co-authored-by: Tamas Mate <50709850+tmater@users.noreply.github.com>
Co-authored-by: Yun Zou <yunzou.colostate@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants