mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Ignore generated python pb2 files (#328)
* Got setup.py install working I think * Got setup.py build working with both templates and protos * Delete unused old proto dir inside squeakserver
This commit is contained in:
parent
287d0f34ca
commit
cd4caa0447
3 changed files with 24 additions and 3 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -13,4 +13,8 @@ dist/
|
|||
*.swp
|
||||
*~
|
||||
.tox/
|
||||
.mypy_cache/
|
||||
.mypy_cache/
|
||||
|
||||
# Ignore generated python proto files
|
||||
*pb2.py
|
||||
*pb2_grpc.py
|
||||
|
|
|
|||
21
setup.py
21
setup.py
|
|
@ -1,8 +1,9 @@
|
|||
import io
|
||||
|
||||
import setuptools.command.build_py
|
||||
from grpc_tools.command import BuildPackageProtos
|
||||
# from grpc_tools.command import BuildPackageProtos
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools import Command
|
||||
|
||||
PACKAGE_DIRECTORIES = {
|
||||
'': '.',
|
||||
|
|
@ -20,6 +21,22 @@ class BuildPyCommand(setuptools.command.build_py.build_py):
|
|||
setuptools.command.build_py.build_py.run(self)
|
||||
|
||||
|
||||
class BuildPackageProtos(Command):
|
||||
"""Command to generate project *_pb2.py modules from proto files."""
|
||||
|
||||
description = 'build grpc protobuf modules'
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
import grpc_tools.command
|
||||
grpc_tools.command.build_package_protos('.')
|
||||
|
||||
setup(
|
||||
name="squeakserver",
|
||||
version="1.0.0",
|
||||
|
|
@ -27,7 +44,7 @@ setup(
|
|||
description="Server for squeak protocol.",
|
||||
long_description=readme,
|
||||
packages=find_packages(),
|
||||
package_dir=PACKAGE_DIRECTORIES,
|
||||
#package_dir=PACKAGE_DIRECTORIES,
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
extras_require={"test": ["pytest", "coverage"]},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue