mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-14 12:43:24 +02:00
* Generate python proto files in setup.py * Generate python protos in setup.py install * Update readme
45 lines
1 KiB
Python
45 lines
1 KiB
Python
import io
|
|
|
|
from setuptools import find_packages, setup
|
|
import setuptools.command.build_py
|
|
|
|
from grpc_tools.command import BuildPackageProtos
|
|
|
|
|
|
PACKAGE_DIRECTORIES = {
|
|
'': '.',
|
|
}
|
|
|
|
with io.open("README.md", "rt", encoding="utf8") as f:
|
|
readme = f.read()
|
|
|
|
|
|
class BuildPyCommand(setuptools.command.build_py.build_py):
|
|
"""Custom build command."""
|
|
|
|
def run(self):
|
|
self.run_command('build_proto_modules')
|
|
setuptools.command.build_py.build_py.run(self)
|
|
|
|
|
|
setup(
|
|
name="squeakserver",
|
|
version="1.0.0",
|
|
url="https://github.com/yzernik/squeakserver",
|
|
description="Server for squeak protocol.",
|
|
long_description=readme,
|
|
packages=find_packages(),
|
|
package_dir=PACKAGE_DIRECTORIES,
|
|
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,
|
|
},
|
|
)
|