squeaknode/setup.py
Jonathan Zernik 00fc72514f
Use squeaklib with ptlc (#502)
* Rename secret_key

* More work to convert to using PTLC

* Updated most code for PTLC

* More work to use ptlc with secret key

* Got itest passing

* Remove unused import

* Use version 0.5.0 of squeaklib

* Added simple unit test for squeak controller

* Use modular addition subtraction for secret key nonce tweak

* Move util to core folder

* Store secret key as hex in database

* Store nonce as hex in db
2020-12-25 20:17:54 -08:00

71 lines
1.7 KiB
Python

import io
import setuptools.command.build_py
import setuptools.command.test
# from grpc_tools.command import BuildPackageProtos
from setuptools import find_packages, setup
from setuptools import Command
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)
# class TestCommand(setuptools.command.test.test):
# """Custom test command."""
# def run(self):
# print("Running custom test command...")
# self.run_command('build_proto_modules')
# # setuptools.command.test.test.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="squeaknode",
version="1.0.0",
url="https://github.com/yzernik/squeaknode",
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': [
'runsqueaknode = squeaknode.main:main',
],
},
cmdclass={
'build_proto_modules': BuildPackageProtos,
'build_py': BuildPyCommand,
# 'test': TestCommand,
},
)