From 8087f7bcb0f24132f554406ec1c93fcfed25cab9 Mon Sep 17 00:00:00 2001 From: Viktor Ershov Date: Tue, 29 Jan 2019 19:45:53 -0800 Subject: [PATCH 1/4] Add more python versions to .travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index d54bc433..91cc4227 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: python python: + - "3.4" + - "3.5" - "3.6" install: From f4cb08fa19244c7cd666b18637cd4b796bbd77b1 Mon Sep 17 00:00:00 2001 From: Viktor Ershov Date: Tue, 29 Jan 2019 19:56:26 -0800 Subject: [PATCH 2/4] Fix tests to work without python 3.4 --- tests/e2e/executors/java.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/executors/java.py b/tests/e2e/executors/java.py index 44a79588..9eb62776 100644 --- a/tests/e2e/executors/java.py +++ b/tests/e2e/executors/java.py @@ -24,8 +24,8 @@ def predict(self, X): "Executor", "Model", "score" ] exec_args.extend(map(str, X)) - result = subprocess.run(exec_args, stdout=subprocess.PIPE) - items = result.stdout.decode("utf-8").split(" ") + result = subprocess.Popen(exec_args, stdout=subprocess.PIPE) + items = result.stdout.read().decode("utf-8").split(" ") if len(items) == 1: return float(items[0]) else: @@ -51,4 +51,4 @@ def prepare(self): # Compile all files together. exec_args = [self._javac_bin] + files_to_compile + ( [os.path.join(self._resource_tmp_dir, "Executor.java")]) - subprocess.run(exec_args) + subprocess.call(exec_args) From fc6962bd1efcbb09773d46443bf62156d2b81efc Mon Sep 17 00:00:00 2001 From: Viktor Ershov Date: Tue, 29 Jan 2019 20:06:55 -0800 Subject: [PATCH 3/4] Add python3.7 to travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 91cc4227..215f5dbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: - "3.4" - "3.5" - "3.6" + - "3.7" install: - pip install -r requirements-test.txt From bce0fc0ceea7d9bce5c6cb9f16887084e8de98d3 Mon Sep 17 00:00:00 2001 From: Viktor Ershov Date: Tue, 29 Jan 2019 20:20:18 -0800 Subject: [PATCH 4/4] Add setup.py; remove python3.7 from travis --- .travis.yml | 1 - setup.py | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 setup.py diff --git a/.travis.yml b/.travis.yml index 215f5dbd..91cc4227 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ python: - "3.4" - "3.5" - "3.6" - - "3.7" install: - pip install -r requirements-test.txt diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..4ec4dab3 --- /dev/null +++ b/setup.py @@ -0,0 +1,21 @@ +from setuptools import find_packages, setup + +setup( + name='m2cgen', + version="0.0.0", + url='https://github.com/BayesWitnesses/m2cgen', + description='Code-generation for various ML models into native code.', + license='MIT', + packages=find_packages(exclude=['tests.*', 'tests']), + include_package_data=True, + classifiers=[ + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: Implementation :: CPython', + ], + python_requires='!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', +)