Fix proto generation from setup.py#45
Conversation
SebastianSchildt
left a comment
There was a problem hiding this comment.
I think this does not work. Just trying the container form CI already yields
% docker run --rm -it --net=host ttl.sh/kuksa-python-sdk/kuksa-client-d418af9b39e1400ad9c76d0af37d4d7ac89f0dc7
Unable to find image 'ttl.sh/kuksa-python-sdk/kuksa-client-d418af9b39e1400ad9c76d0af37d4d7ac89f0dc7:latest' locally
latest: Pulling from kuksa-python-sdk/kuksa-client-d418af9b39e1400ad9c76d0af37d4d7ac89f0dc7
da88a3b79f2c: Pull complete
bfb59b82a9b6: Pull complete
4eff9a62d888: Pull complete
a62778643d56: Pull complete
7c12895b777b: Pull complete
3214acf345c0: Pull complete
5664b15f108b: Pull complete
0bab15eea81d: Pull complete
4aa0ea1413d3: Pull complete
da7816fa955e: Pull complete
ddf74a63f7d8: Pull complete
7faf6706c0c2: Pull complete
8687fa856c98: Pull complete
38a3d10be31b: Pull complete
9ad354df3867: Pull complete
255d58538c65: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:52cbb628e8635fc9b03d7b69dc65392058b353c6ec20757269b19b292750cfb2
Status: Downloaded newer image for ttl.sh/kuksa-python-sdk/kuksa-client-d418af9b39e1400ad9c76d0af37d4d7ac89f0dc7:latest
⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀
⣴⣿⡿⠋⣿⣿ ⠈⠙⢿⣿⣦
⣾⣿⠋ ⣿⣿ ⣶⣿ ⠙⣿⣷
⣸⣿⠇ ⣿⣿⠠⣾⡿⠃ ⠸⣿⣇ ⣶ ⣠⡶⠂ ⣶ ⢰⡆ ⢰⡆⢀⣴⠖ ⢠⡶⠶⠶⡦ ⣰⣶⡀
⣿⣿ ⠿⢿⣷⣦⡀ ⣿⣿ ⣿⢾⣏ ⣿ ⢸⡇ ⢸⡷⣿⡁ ⠘⠷⠶⠶⣦ ⢠⡟⠘⣷
⢹⣿⡆ ⣿⣶⠈⢻⣿⡆ ⢰⣿⡏ ⠿ ⠙⠷⠄ ⠙⠷⠶⠟⠁ ⠸⠇⠈⠻⠦ ⠐⠷⠶⠶⠟ ⠠⠿⠁ ⠹⠧
⢿⣿⣄ ⣿⣿ ⠿⣿ ⣠⣿⡿
⠻⣿⣷⡄⣿⣿ ⢀⣠⣾⣿⠟ kuksa-client CLI
⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁ 0.5.0a2.post6+git.d418af9b.dirty
Connecting to VSS server at 127.0.0.1 port 55555 using KUKSA GRPC protocol.
TLS will not be used.
Traceback (most recent call last):
File "kuksa-client.py", line 8, in <module>
File "kuksa_client/__main__.py", line 696, in main
File "kuksa_client/__main__.py", line 348, in __init__
File "kuksa_client/__main__.py", line 615, in connect
File "kuksa_client/__init__.py", line 37, in __init__
File "kuksa_client/cli_backend/__init__.py", line 43, in from_config
File "PyInstaller/loader/pyimod02_importers.py", line 457, in exec_module
File "kuksa_client/cli_backend/grpc.py", line 34, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 457, in exec_module
File "kuksa_client/grpc/__init__.py", line 39, in <module>
ModuleNotFoundError: No module named 'kuksa'
[PYI-1:ERROR] Failed to execute script 'kuksa-client' due to unhandled exception!
SebastianSchildt
left a comment
There was a problem hiding this comment.
Still broken
Digest: sha256:f04616872e20d57d4729a8860ade629d7e58338c94de9fe2492f28f78110f382
Status: Downloaded newer image for ttl.sh/kuksa-python-sdk/kuksa-client-6d9fcfb15087cd748af4f8dd9944d47a095c0684:latest
⢀⣤⣶⣾⣿⢸⣿⣿⣷⣶⣤⡀
⣴⣿⡿⠋⣿⣿ ⠈⠙⢿⣿⣦
⣾⣿⠋ ⣿⣿ ⣶⣿ ⠙⣿⣷
⣸⣿⠇ ⣿⣿⠠⣾⡿⠃ ⠸⣿⣇ ⣶ ⣠⡶⠂ ⣶ ⢰⡆ ⢰⡆⢀⣴⠖ ⢠⡶⠶⠶⡦ ⣰⣶⡀
⣿⣿ ⠿⢿⣷⣦⡀ ⣿⣿ ⣿⢾⣏ ⣿ ⢸⡇ ⢸⡷⣿⡁ ⠘⠷⠶⠶⣦ ⢠⡟⠘⣷
⢹⣿⡆ ⣿⣶⠈⢻⣿⡆ ⢰⣿⡏ ⠿ ⠙⠷⠄ ⠙⠷⠶⠟⠁ ⠸⠇⠈⠻⠦ ⠐⠷⠶⠶⠟ ⠠⠿⠁ ⠹⠧
⢿⣿⣄ ⣿⣿ ⠿⣿ ⣠⣿⡿
⠻⣿⣷⡄⣿⣿ ⢀⣠⣾⣿⠟ kuksa-client CLI
⠈⠛⠇⢿⣿⣿⣿⣿⡿⠿⠛⠁ 0.5.0a2.post7+git.6d9fcfb1.dirty
Connecting to VSS server at 127.0.0.1 port 55555 using KUKSA GRPC protocol.
TLS will not be used.
Traceback (most recent call last):
File "kuksa-client.py", line 8, in <module>
File "kuksa_client/__main__.py", line 696, in main
File "kuksa_client/__main__.py", line 348, in __init__
File "kuksa_client/__main__.py", line 615, in connect
File "kuksa_client/__init__.py", line 37, in __init__
File "kuksa_client/cli_backend/__init__.py", line 43, in from_config
File "PyInstaller/loader/pyimod02_importers.py", line 457, in exec_module
File "kuksa_client/cli_backend/grpc.py", line 34, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 457, in exec_module
File "kuksa_client/grpc/__init__.py", line 39, in <module>
File "/kuksa-client/_internal/kuksa/val/v1/types_pb2.py", line 25, in <module>
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
ImportError: cannot import name 'timestamp_pb2' from 'google.protobuf' (/kuksa-client/_internal/google/protobuf/__init__.py)
[PYI-1:ERROR] Failed to execute script 'kuksa-client' due to unhandled exception!
ac3fb35 to
7cd2ebc
Compare
Signed-off-by: Sebastian Schildt <sebastian.schildt@de.bosch.com>
Signed-off-by: Sebastian Schildt <sebastian.schildt@de.bosch.com>
7cd2ebc to
36d2ea3
Compare
|
I changed the proto generation to hopefully work "In all cases", but mainly to be able to generate working wheels and sdists. It seems the Python package build process is two stage
I "should" work now. If unsure try with a fresh checkout. There are many combinations possible of
Not sure all corner cases are caught correctly. |
SebastianSchildt
left a comment
There was a problem hiding this comment.
Works for me. @lukasmittag pls also do a sanity check
|
normal pip install for development only functions after calling twice. Before it complains about not finding the module. This should be because of the order of calling commands or maybe because of not picking up the libraries maybe we need to wait somewhere can have a look next week. |
The proto generation was not executed automatically and was called manually in the dockerfile for containers or by the developer. This led to a faulty version of the pypi packages 0.5.0a1 and 0.5.0a2. This hopefully fixes this by integrating the proto generation script in the setup.py