krista-common-proto-schema 1.0.4__tar.gz → 1.0.6__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: krista_common_proto_schema
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Shared Protocol Buffer definitions.
5
5
  Home-page: https://github.com/your-org/krista-common-proto-schema
6
6
  Author: Krista
@@ -0,0 +1,16 @@
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.common 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.6"
15
+
16
+ __all__ = ["common"]
@@ -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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: krista-common-proto-schema
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Shared Protocol Buffer definitions.
5
5
  Home-page: https://github.com/your-org/krista-common-proto-schema
6
6
  Author: Krista
@@ -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
@@ -74,7 +76,7 @@ This package contains compiled Protocol Buffer definitions
74
76
  that can be imported directly in Python projects.
75
77
 
76
78
  Usage:
77
- from krista_common_proto_schema import user_pb2, message_pb2
79
+ from krista_common_proto_schema.common import user_pb2, message_pb2
78
80
 
79
81
  user = user_pb2.User(id=1, name="John")
80
82
  message = message_pb2.Message(id=1, sender=user, content="Hello")
@@ -82,11 +84,7 @@ Usage:
82
84
 
83
85
  __version__ = "{version}"
84
86
 
85
- # Import compiled proto modules for easy access
86
- from . import user_pb2
87
- from . import message_pb2
88
-
89
- __all__ = ["user_pb2", "message_pb2"]
87
+ __all__ = ["common"]
90
88
  ''')
91
89
 
92
90
  # Find all .proto files
@@ -138,6 +136,26 @@ __all__ = ["user_pb2", "message_pb2"]
138
136
  super().run()
139
137
 
140
138
 
139
+ class CustomBuild(build):
140
+ """Custom build command that ensures proto files are compiled."""
141
+
142
+ def run(self):
143
+ """Run build_py first to compile protos, then continue with normal build."""
144
+ # This ensures BuildProtoCommand runs before the build
145
+ self.run_command('build_py')
146
+ super().run()
147
+
148
+
149
+ class CustomSDist(sdist):
150
+ """Custom sdist command that ensures proto files are compiled before creating source distribution."""
151
+
152
+ def run(self):
153
+ """Compile proto files first, then create source distribution."""
154
+ # Ensure proto files are compiled
155
+ self.run_command('build_py')
156
+ super().run()
157
+
158
+
141
159
  # Read version from VERSION file at repository root
142
160
  version_file = Path(__file__).parent.parent / "VERSION"
143
161
  version = version_file.read_text().strip()
@@ -152,14 +170,16 @@ setup(
152
170
  long_description_content_type="text/markdown",
153
171
  url="https://github.com/your-org/krista-common-proto-schema",
154
172
 
155
- # Package configuration - include all subpackages
156
- packages=find_packages(where="."),
157
- package_dir={"": "."},
173
+ # Package configuration - explicitly list all packages
174
+ packages=[
175
+ "krista_common_proto_schema",
176
+ "krista_common_proto_schema.common",
177
+ ],
158
178
 
159
- # Include proto files and compiled Python files in the package
179
+ # Include proto files in the package
160
180
  package_data={
161
181
  "krista_common_proto_schema": ["*.proto"],
162
- "krista_common_proto_schema.common": ["*.proto"],
182
+ "krista_common_proto_schema.common": ["*.proto", "*.py"],
163
183
  },
164
184
 
165
185
  # Dependencies
@@ -172,9 +192,11 @@ setup(
172
192
  "grpcio-tools>=1.60.0",
173
193
  ],
174
194
 
175
- # Custom build command
195
+ # Custom build commands
176
196
  cmdclass={
197
+ "build": CustomBuild,
177
198
  "build_py": BuildProtoCommand,
199
+ "sdist": CustomSDist,
178
200
  },
179
201
 
180
202
  # Metadata
@@ -1,6 +0,0 @@
1
- setup.py
2
- krista_common_proto_schema.egg-info/PKG-INFO
3
- krista_common_proto_schema.egg-info/SOURCES.txt
4
- krista_common_proto_schema.egg-info/dependency_links.txt
5
- krista_common_proto_schema.egg-info/requires.txt
6
- krista_common_proto_schema.egg-info/top_level.txt