-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
3.0.0-alpha-2 won't pip install #333
Comments
When I uploaded alpha-1 to pypi, I commented out this GenerateUnittestProtos() line: https://github.com/google/protobuf/blob/master/python/setup.py#L124 It obviously indicates that line should be put into a different place but I haven't been able to figure it out. For alpha-2 I think we can use this temporary workaround and refactor the setup.py to address this issue. |
Thanks for the quick reply. We understood the implications of using an alpha release :) but were using alpha-1 because of the Python 3 support. (Discussion in #250 made us feel better about alpha-1) |
gcloud-python has four failing PRs due to this bug: we may be forced to pin |
ISTM that the correct long-term solution would be to automate the process of generating the |
This is also causing troubles with grpc. We currently are pinned on alpha-1 for python, and pinned on alpha-2 for Java. This is confusing for people, and causing integration issues where we can't have grpc-java and grpc-python running on the same machine. |
Sorry for the confusion. I'm looking into this now, with a fix targeted for alpha-3. |
Ok, what if we make
Then the "build" step won't fail for the PyPI packages, but development should still work as desired (protos will get generated eagerly). |
seems reasonable, let's just make sure we add some test coverage for this |
I'm kind of confused by the need for having
|
I fully agree with @tseaver on this. |
I can see where you are coming from. The main downside of your approach AFAICS is that it requires people who use the Git repo to run an extra We would also need to make sure that people run So I'm ok with this approach if you prefer it. Want to send a PR? |
@haberman Don't folks running from a Git clone need to run |
@xfxyjwf What do you think about the idea of generating Python protos as part of the top-level "make" target? The one thing that comes to mind is that the "python" directory will only exist in the Python .tar.gz AFAIK, so it should only try to descend into the "python" directory if it is there. |
@haberman I would prefer your proposed approach (i.e., making generate_proto() do nothing in certain scenarios). Currently we only use Makefiles for C++ build. Other languages has their own build scripts to build their runtime library. It's not the nature way (how we do it in protobuf) to have C++ Makefiles interfere with other languages build process. And it's not true that users need to run "make" before building the python runtime. What's actually needed is the protoc binary, not running "make". Users have to get a protoc binary before they can build python code and "make" is one of the ways to get it. For example for users who want to build protobuf Python on windows, we provide a protoc binary for download directly so they don't need to go to the hassle of running "make" (which is very inconvenient on windows). |
That is a good point about Windows. "python setup.py build" is probably a lot more convenient than "make" for Windows users. Ok, I'm inclined to agree with Feng here and keep using setup.py to generate protos, but modify it to do nothing if the output file already exists. |
FWIW, I see the |
@tseaver I think it boils down to:
I think it's simplest if users only have to run the standard We brainstormed another idea which might make this even simpler. For the release we can add an extra file into the distribution called RELEASE_DIST or something like that. If this file is present, |
@haberman if you want to do the last thing, you could just look for the |
As it seems this is blocking grpc/grpc#1455, it's also transitively blocking gRPC C# alpha release (as I need to upgrade gRPC's version of protobufs to version that supports C#). |
I have a passing build with this fixed in #351 |
Great! On Thu, May 14, 2015 at 6:24 PM, Tamir Duberstein notifications@github.com
|
BTW, I'm not sure this issue is, in fact, closed. While the repository has been updated with the fix, doing a |
@nicolasnoble that is infeasible -- PyPI does not allow for a released distribution file to be republished with a new filename. The most straightforward way to do that is to make a new release (maybe |
Fair enough. Let's do that ? |
I've uploaded protobuf-3.0.0a2. I was able to successfully install it with pip just now. Sorry for the delay on this. Let me know if there are any other problems. |
Why is it named protobuf-3.0.0a2? It seems you have successfully deleted On Mon, May 18, 2015 at 5:32 PM, Joshua Haberman notifications@github.com
|
It wouldn't let me upload it as protobuf-3.0.0-alpha-2.1 or anything like that. It gave me the error:
I have no idea how the previous version was uploaded with what appears to be a non-PEP440 version. |
|
I'm confused, didn't @haberman say it wouldn't allow |
Ah, you're right @dstufft. Sorry for the noise — I must have misread that comment. |
https://pypi.python.org/pypi/protobuf/3.0.0-alpha-2
For example:
Discovered in https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/60881924
/cc @tseaver
The text was updated successfully, but these errors were encountered: