squeaknode/setup.py

61 lines
1.4 KiB
Python
Raw Normal View History

2020-02-22 19:33:40 -08:00
import io
import setuptools.command.build_py
# from grpc_tools.command import BuildPackageProtos
2020-09-26 01:51:41 -07:00
from setuptools import find_packages, setup
from setuptools import Command
PACKAGE_DIRECTORIES = {
'': '.',
}
2020-02-22 19:33:40 -08:00
with io.open("README.md", "rt", encoding="utf8") as f:
2020-02-22 19:33:40 -08:00
readme = f.read()
class BuildPyCommand(setuptools.command.build_py.build_py):
2020-09-26 01:51:41 -07:00
"""Custom build command."""
2020-09-26 01:51:41 -07:00
def run(self):
self.run_command('build_proto_modules')
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('.')
2020-02-22 19:33:40 -08:00
setup(
name="squeakserver",
2020-02-22 19:33:40 -08:00
version="1.0.0",
url="https://github.com/yzernik/squeakserver",
description="Server for squeak protocol.",
2020-02-22 19:33:40 -08:00
long_description=readme,
packages=find_packages(),
#package_dir=PACKAGE_DIRECTORIES,
2020-02-22 19:33:40 -08:00
include_package_data=True,
zip_safe=False,
extras_require={"test": ["pytest", "coverage"]},
entry_points={
'console_scripts': [
'runsqueakserver = squeakserver.main:main',
],
},
cmdclass={
'build_proto_modules': BuildPackageProtos,
'build_py': BuildPyCommand,
},
2020-02-22 19:33:40 -08:00
)