cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefa...@apache.org
Subject [03/10] cassandra git commit: Make cython optional in pylib/setup.py
Date Wed, 27 Apr 2016 00:48:52 GMT
Make cython optional in pylib/setup.py

patch by Stefania Alborghetti; reviewed by tjake for CASSANDRA-11630


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b25139f8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b25139f8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b25139f8

Branch: refs/heads/cassandra-3.0
Commit: b25139f8ac5dd8a2955c4a0c13df61d529852e2f
Parents: ae03066
Author: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Authored: Fri Apr 22 10:15:01 2016 +0800
Committer: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Committed: Wed Apr 27 08:42:32 2016 +0800

----------------------------------------------------------------------
 CHANGES.txt    |  1 +
 pylib/setup.py | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b25139f8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d170def..ff26fde 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.15
+ * Make cython optional in pylib/setup.py (CASSANDRA-11630)
  * Change order of directory searching for cassandra.in.sh to favor local one (CASSANDRA-11628)
  * cqlsh COPY FROM fails with []{} chars in UDT/tuple fields/values (CASSANDRA-11633)
  * clqsh: COPY FROM throws TypeError with Cython extensions enabled (CASSANDRA-11574)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b25139f8/pylib/setup.py
----------------------------------------------------------------------
diff --git a/pylib/setup.py b/pylib/setup.py
index 3654502..a9f654a 100755
--- a/pylib/setup.py
+++ b/pylib/setup.py
@@ -15,12 +15,20 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import sys
 from distutils.core import setup
-from Cython.Build import cythonize
+
+
+def get_extensions():
+    if "--no-compile" in sys.argv:
+        return []
+
+    from Cython.Build import cythonize
+    return cythonize("cqlshlib/copyutil.py")
 
 setup(
     name="cassandra-pylib",
     description="Cassandra Python Libraries",
     packages=["cqlshlib"],
-    ext_modules=cythonize("cqlshlib/copyutil.py"),
+    ext_modules=get_extensions(),
 )


Mime
View raw message