-
Notifications
You must be signed in to change notification settings - Fork 314
Publish CLI to the binary distribution #2530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -71,6 +71,17 @@ distributions { | |||
into("bin") { | ||||
from("bin/server") | ||||
from("bin/admin") | ||||
from("${rootDir}/polaris") | ||||
} | ||||
|
||||
into("bin/client") { | ||||
from("${rootDir}/client/python") { | ||||
include("**/*") | ||||
} | ||||
} | ||||
|
||||
into("regtests") { | ||||
from("${rootDir}/regtests/requirements.txt") | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks a little bit weird to include things from the regtests. The only information in that file is the poetry version, may be we could refactor to move the requirement inside There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated: The current polaris/client/python/pyproject.toml Line 48 in b3366e5
So I think we do not need to include this requirements.txt anymore
|
||||
} | ||||
Comment on lines
+83
to
85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's weird to have this directory in the binary distribution. We can make a symlink in the dir |
||||
|
||||
from("README.md") | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't need everything under
client/python
. For example, tests are not needed. Can you confirm which are needed? cc @HonahX @MonkeyCanCodeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I think we should only publish wheel file produced by #2425. Reasoning is as
client/python/pyproject.toml
is invokinggenerate_clients.py
which refs OpenAPI files outsideclient/python
, people won't be able to build this anyway with only these files without restore the structure. Thus, I make more sense to me for publishing the wheel file instead which will have everything generated. You can do so via following:Once completed, you will then have a wheel file under
client/python/dist/
such as following:The content of the wheel files will then be following:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is binary distribution, I think it makes more sense to only installable wheels anyway? The
polaris
script shall be able to pick up the package after pip install, we can update the README to reflect that@MonkeyCanCode That's a good point. How do you feel creating a symlink inside the
client/python
that points to the spec folder? This way we still have single source of truth during the development but the python folder will contain everything needed for build when copy-paste to other places.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I can raise a PR later this weekend. Then the distribution build (along with wheel build) will also work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is up: #2557
Maybe get the distribution (wheel, sdist, or both) instead of manually cheery pick?