From 9bac2c050fad40b0b04b37709b77db54f7cfe0c1 Mon Sep 17 00:00:00 2001 From: jovany-wang Date: Tue, 18 Feb 2020 13:51:16 +0800 Subject: [PATCH 1/3] WIP --- deploy/python/{distkv => dkv}/__init__.py | 0 deploy/python/{ => dkv}/distkv_cli.py | 2 +- deploy/python/{ => dkv}/distkv_server.py | 2 +- deploy/python/{distkv => dkv}/jars/.gitkeep | 0 deploy/python/setup.py | 6 +++--- 5 files changed, 5 insertions(+), 5 deletions(-) rename deploy/python/{distkv => dkv}/__init__.py (100%) rename deploy/python/{ => dkv}/distkv_cli.py (86%) rename deploy/python/{ => dkv}/distkv_server.py (85%) rename deploy/python/{distkv => dkv}/jars/.gitkeep (100%) diff --git a/deploy/python/distkv/__init__.py b/deploy/python/dkv/__init__.py similarity index 100% rename from deploy/python/distkv/__init__.py rename to deploy/python/dkv/__init__.py diff --git a/deploy/python/distkv_cli.py b/deploy/python/dkv/distkv_cli.py similarity index 86% rename from deploy/python/distkv_cli.py rename to deploy/python/dkv/distkv_cli.py index 830f70835..e09806e62 100644 --- a/deploy/python/distkv_cli.py +++ b/deploy/python/dkv/distkv_cli.py @@ -11,7 +11,7 @@ def main(): command = [ "java", "-classpath", - os.path.join(get_current_dir(), "distkv/jars/distkv-cli.jar"), + os.path.join(get_current_dir(), "jars/distkv-cli.jar"), "com.distkv.client.commandlinetool.DistkvCommandLineToolStarter"] try: subprocess.check_call(command) diff --git a/deploy/python/distkv_server.py b/deploy/python/dkv/distkv_server.py similarity index 85% rename from deploy/python/distkv_server.py rename to deploy/python/dkv/distkv_server.py index 0c7ad7f7c..901e42921 100644 --- a/deploy/python/distkv_server.py +++ b/deploy/python/dkv/distkv_server.py @@ -11,7 +11,7 @@ def main(): command = [ "java", "-classpath", - os.path.join(get_current_dir(), "distkv/jars/distkv-server.jar"), + os.path.join(get_current_dir(), "jars/distkv-server.jar"), "com.distkv.server.storeserver.StoreServer"] try: subprocess.check_call(command) diff --git a/deploy/python/distkv/jars/.gitkeep b/deploy/python/dkv/jars/.gitkeep similarity index 100% rename from deploy/python/distkv/jars/.gitkeep rename to deploy/python/dkv/jars/.gitkeep diff --git a/deploy/python/setup.py b/deploy/python/setup.py index e8f619c08..3a3c860b9 100644 --- a/deploy/python/setup.py +++ b/deploy/python/setup.py @@ -29,15 +29,15 @@ def has_ext_modules(self): author_email='kingchin1218@gmail.com', license='BSD-3-clause', url='https://github.com/distkv-project/distkv', - packages=['distkv'], + packages=['dkv'], cmdclass={"build_ext": build_ext}, # The BinaryDistribution argument triggers build_ext. distclass=BinaryDistribution, install_requires=[], entry_points={ "console_scripts": [ - "dkv-server=distkv_server:main", - "dkv-cli=distkv_cli:main", + "dkv-server=dkv.distkv_server:main", + "dkv-cli=dkv.distkv_cli:main", ] }, ) From 61a0a7e716f3b97340cd731867e13ad271d0993b Mon Sep 17 00:00:00 2001 From: jovany-wang Date: Tue, 18 Feb 2020 14:45:01 +0800 Subject: [PATCH 2/3] Fox --- deploy/python/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/python/build.sh b/deploy/python/build.sh index b10fa7a2d..75770cf5c 100644 --- a/deploy/python/build.sh +++ b/deploy/python/build.sh @@ -9,8 +9,8 @@ pushd ../../ mvn clean install -DskipTests # copy distkv-server jar to wheel dist. -cp server/target/distkv-server-0.1.3-SNAPSHOT-jar-with-dependencies.jar deploy/python/distkv/jars/distkv-server.jar +cp server/target/distkv-server-0.1.3-SNAPSHOT-jar-with-dependencies.jar deploy/python/dkv/jars/distkv-server.jar # copy distkv-cli jar to wheel dist. -cp client/target/distkv-client-0.1.3-SNAPSHOT-jar-with-dependencies.jar deploy/python/distkv/jars/distkv-cli.jar +cp client/target/distkv-client-0.1.3-SNAPSHOT-jar-with-dependencies.jar deploy/python/dkv/jars/distkv-cli.jar popd From 7c135708231c74581718cadfe6e67ecdf0d2b687 Mon Sep 17 00:00:00 2001 From: jovany-wang Date: Sat, 22 Feb 2020 16:37:28 +0800 Subject: [PATCH 3/3] Fix --- deploy/python/dkv/jars/__init__.py | 0 deploy/python/setup.py | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 deploy/python/dkv/jars/__init__.py diff --git a/deploy/python/dkv/jars/__init__.py b/deploy/python/dkv/jars/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/deploy/python/setup.py b/deploy/python/setup.py index 3a3c860b9..a57799798 100644 --- a/deploy/python/setup.py +++ b/deploy/python/setup.py @@ -30,6 +30,9 @@ def has_ext_modules(self): license='BSD-3-clause', url='https://github.com/distkv-project/distkv', packages=['dkv'], + package_data={ + 'dkv': ['*'], + }, cmdclass={"build_ext": build_ext}, # The BinaryDistribution argument triggers build_ext. distclass=BinaryDistribution, @@ -40,4 +43,5 @@ def has_ext_modules(self): "dkv-cli=dkv.distkv_cli:main", ] }, +# include_package_data=True, )