krista-common-proto-schema 1.0.3__tar.gz → 1.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of krista-common-proto-schema might be problematic. Click here for more details.
- {krista_common_proto_schema-1.0.3 → krista_common_proto_schema-1.0.5}/PKG-INFO +1 -1
- krista_common_proto_schema-1.0.5/krista_common_proto_schema/__init__.py +20 -0
- krista_common_proto_schema-1.0.5/krista_common_proto_schema/common/__init__.py +1 -0
- krista_common_proto_schema-1.0.5/krista_common_proto_schema/common/message_pb2.py +40 -0
- krista_common_proto_schema-1.0.5/krista_common_proto_schema/common/user_pb2.py +39 -0
- {krista_common_proto_schema-1.0.3 → krista_common_proto_schema-1.0.5}/krista_common_proto_schema.egg-info/PKG-INFO +1 -1
- krista_common_proto_schema-1.0.5/krista_common_proto_schema.egg-info/SOURCES.txt +10 -0
- krista_common_proto_schema-1.0.5/krista_common_proto_schema.egg-info/top_level.txt +1 -0
- {krista_common_proto_schema-1.0.3 → krista_common_proto_schema-1.0.5}/setup.py +32 -6
- krista_common_proto_schema-1.0.3/krista_common_proto_schema.egg-info/SOURCES.txt +0 -6
- krista_common_proto_schema-1.0.3/krista_common_proto_schema.egg-info/top_level.txt +0 -1
- {krista_common_proto_schema-1.0.3 → krista_common_proto_schema-1.0.5}/krista_common_proto_schema.egg-info/dependency_links.txt +0 -0
- {krista_common_proto_schema-1.0.3 → krista_common_proto_schema-1.0.5}/krista_common_proto_schema.egg-info/requires.txt +0 -0
- {krista_common_proto_schema-1.0.3 → krista_common_proto_schema-1.0.5}/setup.cfg +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Krista Common Proto Schema Package
|
|
3
|
+
|
|
4
|
+
This package contains compiled Protocol Buffer definitions
|
|
5
|
+
that can be imported directly in Python projects.
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
from krista_common_proto_schema import user_pb2, message_pb2
|
|
9
|
+
|
|
10
|
+
user = user_pb2.User(id=1, name="John")
|
|
11
|
+
message = message_pb2.Message(id=1, sender=user, content="Hello")
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
__version__ = "1.0.5"
|
|
15
|
+
|
|
16
|
+
# Import compiled proto modules for easy access
|
|
17
|
+
from . import user_pb2
|
|
18
|
+
from . import message_pb2
|
|
19
|
+
|
|
20
|
+
__all__ = ["user_pb2", "message_pb2"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Auto-generated package file."""
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: common/message.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'common/message.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from common import user_pb2 as common_dot_user__pb2
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x63ommon/message.proto\x12\x06\x63ommon\x1a\x11\x63ommon/user.proto\"z\n\x07Message\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x1c\n\x06sender\x18\x02 \x01(\x0b\x32\x0c.common.User\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\x12!\n\x04type\x18\x05 \x01(\x0e\x32\x13.common.MessageType*7\n\x0bMessageType\x12\x08\n\x04TEXT\x10\x00\x12\t\n\x05IMAGE\x10\x01\x12\t\n\x05VIDEO\x10\x02\x12\x08\n\x04\x46ILE\x10\x03\x42\'\n\x17\x63om.krista.proto.commonB\x0cMessageProtob\x06proto3')
|
|
29
|
+
|
|
30
|
+
_globals = globals()
|
|
31
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common.message_pb2', _globals)
|
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
35
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\027com.krista.proto.commonB\014MessageProto'
|
|
36
|
+
_globals['_MESSAGETYPE']._serialized_start=175
|
|
37
|
+
_globals['_MESSAGETYPE']._serialized_end=230
|
|
38
|
+
_globals['_MESSAGE']._serialized_start=51
|
|
39
|
+
_globals['_MESSAGE']._serialized_end=173
|
|
40
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: common/user.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'common/user.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x63ommon/user.proto\x12\x06\x63ommon\"c\n\x04User\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12\x12\n\ncreated_at\x18\x04 \x01(\x03\x12\x1e\n\x04role\x18\x05 \x01(\x0e\x32\x10.common.UserRole*7\n\x08UserRole\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x41\x44MIN\x10\x01\x12\x08\n\x04USER\x10\x02\x12\t\n\x05GUEST\x10\x03\x42$\n\x17\x63om.krista.proto.commonB\tUserProtob\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common.user_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\027com.krista.proto.commonB\tUserProto'
|
|
35
|
+
_globals['_USERROLE']._serialized_start=130
|
|
36
|
+
_globals['_USERROLE']._serialized_end=185
|
|
37
|
+
_globals['_USER']._serialized_start=29
|
|
38
|
+
_globals['_USER']._serialized_end=128
|
|
39
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
setup.py
|
|
2
|
+
krista_common_proto_schema/__init__.py
|
|
3
|
+
krista_common_proto_schema.egg-info/PKG-INFO
|
|
4
|
+
krista_common_proto_schema.egg-info/SOURCES.txt
|
|
5
|
+
krista_common_proto_schema.egg-info/dependency_links.txt
|
|
6
|
+
krista_common_proto_schema.egg-info/requires.txt
|
|
7
|
+
krista_common_proto_schema.egg-info/top_level.txt
|
|
8
|
+
krista_common_proto_schema/common/__init__.py
|
|
9
|
+
krista_common_proto_schema/common/message_pb2.py
|
|
10
|
+
krista_common_proto_schema/common/user_pb2.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
krista_common_proto_schema
|
|
@@ -18,6 +18,8 @@ Usage:
|
|
|
18
18
|
|
|
19
19
|
from setuptools import setup, find_packages
|
|
20
20
|
from setuptools.command.build_py import build_py
|
|
21
|
+
from setuptools.command.sdist import sdist
|
|
22
|
+
from distutils.command.build import build
|
|
21
23
|
import subprocess
|
|
22
24
|
import os
|
|
23
25
|
import shutil
|
|
@@ -138,6 +140,26 @@ __all__ = ["user_pb2", "message_pb2"]
|
|
|
138
140
|
super().run()
|
|
139
141
|
|
|
140
142
|
|
|
143
|
+
class CustomBuild(build):
|
|
144
|
+
"""Custom build command that ensures proto files are compiled."""
|
|
145
|
+
|
|
146
|
+
def run(self):
|
|
147
|
+
"""Run build_py first to compile protos, then continue with normal build."""
|
|
148
|
+
# This ensures BuildProtoCommand runs before the build
|
|
149
|
+
self.run_command('build_py')
|
|
150
|
+
super().run()
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class CustomSDist(sdist):
|
|
154
|
+
"""Custom sdist command that ensures proto files are compiled before creating source distribution."""
|
|
155
|
+
|
|
156
|
+
def run(self):
|
|
157
|
+
"""Compile proto files first, then create source distribution."""
|
|
158
|
+
# Ensure proto files are compiled
|
|
159
|
+
self.run_command('build_py')
|
|
160
|
+
super().run()
|
|
161
|
+
|
|
162
|
+
|
|
141
163
|
# Read version from VERSION file at repository root
|
|
142
164
|
version_file = Path(__file__).parent.parent / "VERSION"
|
|
143
165
|
version = version_file.read_text().strip()
|
|
@@ -152,14 +174,16 @@ setup(
|
|
|
152
174
|
long_description_content_type="text/markdown",
|
|
153
175
|
url="https://github.com/your-org/krista-common-proto-schema",
|
|
154
176
|
|
|
155
|
-
# Package configuration -
|
|
156
|
-
packages=
|
|
157
|
-
|
|
177
|
+
# Package configuration - explicitly list all packages
|
|
178
|
+
packages=[
|
|
179
|
+
"krista_common_proto_schema",
|
|
180
|
+
"krista_common_proto_schema.common",
|
|
181
|
+
],
|
|
158
182
|
|
|
159
|
-
# Include proto files
|
|
183
|
+
# Include proto files in the package
|
|
160
184
|
package_data={
|
|
161
185
|
"krista_common_proto_schema": ["*.proto"],
|
|
162
|
-
"krista_common_proto_schema.common": ["*.proto"],
|
|
186
|
+
"krista_common_proto_schema.common": ["*.proto", "*.py"],
|
|
163
187
|
},
|
|
164
188
|
|
|
165
189
|
# Dependencies
|
|
@@ -172,9 +196,11 @@ setup(
|
|
|
172
196
|
"grpcio-tools>=1.60.0",
|
|
173
197
|
],
|
|
174
198
|
|
|
175
|
-
# Custom build
|
|
199
|
+
# Custom build commands
|
|
176
200
|
cmdclass={
|
|
201
|
+
"build": CustomBuild,
|
|
177
202
|
"build_py": BuildProtoCommand,
|
|
203
|
+
"sdist": CustomSDist,
|
|
178
204
|
},
|
|
179
205
|
|
|
180
206
|
# Metadata
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|