still trying to make it work

This commit is contained in:
or-else
2018-08-31 17:26:34 +03:00
parent c1cdd11700
commit ac62c25091
3 changed files with 19 additions and 4 deletions

View File

@ -126,6 +126,16 @@ rm -f $GOPATH/bin/init-db
# Build chatbot release
echo "Building chatbot..."
pushd ./py_grpc > /dev/null
# Generate version file from git tags
python3 version.py
#Generate tinode-grpc package
python3 setup.py sdist bdist_wheel
popd > /dev/null
rm -fR ./releases/tmp
mkdir -p ./releases/tmp

View File

@ -1,12 +1,14 @@
# Script for packaging generated model_pb2*.py into tinode_grpc module.
import os
import setuptools
from pkg_resources import resource_string
with open("README.md", "r") as readme_file:
long_description = readme_file.read()
with open(os.path.join(mypackage_root_dir, "GIT_VERSION"), "r") as version_file:
git_version = version_file.read().strip()
#with open("tinode_grpc/GIT_VERSION", "r") as version_file:
# git_version = version_file.read().strip()
version = resource_string(__name__, 'GIT_VERSION')
setuptools.setup(
name="tinode_grpc",
@ -21,6 +23,9 @@ setuptools.setup(
install_requires=['grpcio>=1.9.1'],
license="Apache 2.0",
keywords="chat messaging messenger im tinode",
package_data={
"": ["GIT_VERSION"],
},
classifiers=(
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",

View File

@ -16,5 +16,5 @@ def git_version():
return line
if __name__ == '__main__':
with open("GIT_VERSION","w") as fh:
with open("tinode_grpc/GIT_VERSION","w") as fh:
fh.write(git_version())