Skip to content
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

Add repo rule for fetching a Python SDK #8265

Closed
wants to merge 1 commit into from

Conversation

gurobokum
Copy link

Backbone for https://github.com/bazelbuild/bazel/issues/7467

  • Doesn't support Windows
  • I haven't covered it with tests due to the issue, shall I raise a ticket? What is the best approach to apply the tests for the implementation?
  • Periodically I see Restarting after Install phase, what can be the cause?

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels May 8, 2019
@gurobokum gurobokum marked this pull request as ready for review May 8, 2019 15:43
@Globegitter
Copy link

Globegitter commented May 13, 2019

As much as I love seeing this, would it maybe make more sense to have this in an external repository? https://github.com/bazelbuild/rules_python/ has not received much love recently but imo it would probably be the best place for this to have fixes/updates to this repo rule independent of bazel releases. WDYT?

@gurobokum
Copy link
Author

Hi @Globegitter
Yes, it sounds reasonable, I've created the PR here cause py toolchain is a part of bazel_toolsand the issue #7467 was created here. But looks like there is no anything that doesn't allow to move it out to python_rules

What do you think, @brandjon

Could you please also clarify my doubts above related testing
FYI as a part of testing approach I decided to create mocked python tar based on autoconf which simulates configuration/building and installing python and would like to upload it into the source code as done with six package. am I looking in a right direction or not?

@Globegitter
Copy link

Also quite interesting project that has a standalone python for windows: https://github.com/indygreg/python-build-standalone - though I have not tested it yet.

@gurobokum
Copy link
Author

@Globegitter thank you for your sharing!
@brandjon, do you have any updates regarding it? Fill free to close the PR, cause the work should be done in https://github.com/bazelbuild/rules_python/
I would like to proceed work on the issue but needs your feedback

ctx.report_progress("Configure")
res = ctx.execute([
"./configure",
"--prefix=" + str(ctx.path("./"))
Copy link
Member

Choose a reason for hiding this comment

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

We might want something like --enable-optimizations here too?

@jin
Copy link
Member

jin commented Apr 17, 2020

Perhaps this should be reopened in rules_python?

@brandjon
Copy link
Member

Right, this should definitely be reopened in rules_python. I'll transfer the underlying issue.

@jin
Copy link
Member

jin commented Apr 28, 2020

Closing this for now - please reopen a new PR in the rules_python repository.

@jin jin closed this Apr 28, 2020
@ddlees
Copy link

ddlees commented May 13, 2020

FWIW I ran into this problem and saw it wasn't solved so I just recently published some rules that leverage pyenv to download, compile and register the python toolchain with whatever py_runtime_pair the project calls for.

It's probably a little rough but feedback and PRs are welcome; I just hope what's currently there can help some folks. 😉 🍻

https://github.com/digital-plumbers-union/rules_pyenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-Rules-Python Native rules for Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants