You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by jm...@apache.org on 2019/06/19 22:05:22 UTC

[incubator-datasketches-cpp] branch py_setup updated: quasi-working python wrapper, probably works best on mac. planning to merge this and then refactor to use pybind11 for better portability

This is an automated email from the ASF dual-hosted git repository.

jmalkin pushed a commit to branch py_setup
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-cpp.git


The following commit(s) were added to refs/heads/py_setup by this push:
     new 62a00ac  quasi-working python wrapper, probably works best on mac. planning to merge this and then refactor to use pybind11 for better portability
62a00ac is described below

commit 62a00ac77fbf075efec3c32b878c5e24c5382b07
Author: jmalkin <jm...@users.noreply.github.com>
AuthorDate: Wed Jun 19 15:05:03 2019 -0700

    quasi-working python wrapper, probably works best on mac. planning to merge this and then refactor to use pybind11 for better portability
---
 pyproject.toml         |  2 ++
 python/src/__init__.py |  1 +
 setup.py               | 22 ++++++++++------------
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..5dbb23e
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,2 @@
+[build-system]
+requires = ["wheel", "setuptools", "cmake >= 3.12"]
diff --git a/python/src/__init__.py b/python/src/__init__.py
index 49a263e..1e1acc2 100644
--- a/python/src/__init__.py
+++ b/python/src/__init__.py
@@ -1 +1,2 @@
 name = "datasketches"
+ 
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 4e36929..50ff70d 100644
--- a/setup.py
+++ b/setup.py
@@ -19,12 +19,12 @@ class CMakeExtension(Extension):
 
 class CMakeBuild(build_ext):
     def run(self):
-        # try:
-        #     out = subprocess.check_output(['cmake', '--version'])
-        # except OSError:
-        #     raise RuntimeError(
-        #         "CMake must be installed to build the following extensions: " +
-        #         ", ".join(e.name for e in self.extensions))
+        try:
+            out = subprocess.check_output(['cmake', '--version'])
+        except OSError:
+            raise RuntimeError(
+                "CMake >= 3.12 must be installed to build the following extensions: " +
+                ", ".join(e.name for e in self.extensions))
 
         # if platform.system() == "Windows":
         #     cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)',
@@ -72,17 +72,15 @@ setup(
     author_email='jon.malkin@yahoo.com',
     description='A wrapper for the C++ Datasketches library',
     long_description='',
-    install_requires=[
-        'cmake>=3.12'
-    ],
     # tell setuptools to look for any packages under 'python/src'
     packages=find_packages('python/src'),
     # tell setuptools that all packages will be under the 'python/src' directory
     # and nowhere else
     package_dir={'':'python/src'},
     # likely need to add all source paths for proper sdist packages
-    ext_modules=[CMakeExtension('datasketches' [])],
+    ext_modules=[CMakeExtension('datasketches')],
     # add custom build_ext command
-    cmdclass=dict(build_ext=CMakeBuild)
-    #zip_safe=False
+    # cmdclass=dict(build_ext=CMakeBuild)
+    cmdclass={'build_ext': CMakeBuild},
+    zip_safe=False
 )


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org