Merge lp:~thisfred/u1db/dont-install-cython-wrapper into lp:u1db

Proposed by Eric Casteleijn
Status: Merged
Approved by: Eric Casteleijn
Approved revision: 397
Merged at revision: 396
Proposed branch: lp:~thisfred/u1db/dont-install-cython-wrapper
Merge into: lp:u1db
Diff against target: 120 lines (+41/-30)
2 files modified
CMakeLists.txt (+15/-6)
setup.py (+26/-24)
To merge this branch: bzr merge lp:~thisfred/u1db/dont-install-cython-wrapper
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+123307@code.launchpad.net

Commit message

Made setup.py not build cython wrapper by default.

Description of the change

Made setup.py not build cython wrapper by default.

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) wrote :

+1

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (3.8 KiB)

The attempt to merge lp:~thisfred/u1db/dont-install-cython-wrapper into lp:u1db failed. Below is the output from the failed tests.

-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is GNU 4.7.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Cython: /usr/bin/cython
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.27.0")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'oauth'
-- found oauth, version 0.9.7
-- Found OAuth: /usr/lib/x86_64-linux-gnu/liboauth.so
-- checking for module 'json'
-- found json, version 0.10
-- Found JSON: /usr/lib/x86_64-linux-gnu/libjson.so
-- checking for module 'sqlite3'
-- found sqlite3, version 3.7.13
-- Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/tarmac/cache/u1db/trunk
Scanning dependencies of target ReplicatePythonSourceTree
[ 0%] Built target ReplicatePythonSourceTree
[ 11%] Generating u1db_schema.c
Scanning dependencies of target u1db
[ 22%] Building C object src/CMakeFiles/u1db.dir/mkstemp_compat.c.o
[ 33%] Building C object src/CMakeFiles/u1db.dir/u1db.c.o
[ 44%] Building C object src/CMakeFiles/u1db.dir/u1db_http_sync_target.c.o
[ 55%] Building C object src/CMakeFiles/u1db.dir/u1db_query.c.o
[ 66%] Building C object src/CMakeFiles/u1db.dir/u1db_sync_target.c.o
[ 77%] Building C object src/CMakeFiles/u1db.dir/u1db_uuid.c.o
[ 88%] Building C object src/CMakeFiles/u1db.dir/u1db_vectorclock.c.o
[100%] Building C object src/CMakeFiles/u1db.dir/u1db_schema.c.o
Linking C static library libu1db.a
[100%] Built target u1db
Scanning dependencies of target build-debug
running build_ext
[100%] Built target build-debug
Scanning dependencies of target check-valgrind
Tests running...
======================================================================
FAIL: u1db.tests.test_c_backend.TestCDatabaseExists.test_c_backend_compiled
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/tarmac/cache/u1db/trunk/u1db/tests/test_c_backend.py", line 38, in test_c_backend_compiled
    " Was it compiled properly?\n%s" % (c_backend_error,))
AssertionError: Could not import the c_backend_wrapper module. Was it compiled properly?
cannot import name c_backend_wrapper

Ran 1455 tests in 162.349s
FAILED (failures=1)

[59005 refs]
==2975== Memcheck, a memory error detector
==2975== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==2975== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==2975== Command: python-dbg -m testtools.run discover
==2975==
[168478 refs]
==2975==
==2975== HEAP SUMMARY:
==2975== in use at exit: 23,995,807 bytes in 9,372 blocks
==2975== total heap usage: 1,276,168 allocs, 1,266,796 frees, 632,798,209 bytes ...

Read more...

Revision history for this message
Samuele Pedroni (pedronis) wrote :

a more meditated +1 :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-08-21 20:06:02 +0000
+++ CMakeLists.txt 2012-09-07 16:55:22 +0000
@@ -46,12 +46,12 @@
4646
47add_custom_target(check-nodoc47add_custom_target(check-nodoc
48 COMMAND python -m testtools.run discover48 COMMAND python -m testtools.run discover
49 DEPENDS build-inplace49 DEPENDS build-inplace-for-tests
50)50)
5151
52add_custom_target(check52add_custom_target(check
53 COMMAND python -m testtools.run discover53 COMMAND python -m testtools.run discover
54 DEPENDS build-inplace doctests54 DEPENDS build-inplace-for-tests doctests
55)55)
5656
57add_custom_target(cdocs57add_custom_target(cdocs
@@ -68,19 +68,28 @@
68 DEPENDS ReplicatePythonSourceTree u1db68 DEPENDS ReplicatePythonSourceTree u1db
69)69)
7070
71add_custom_target(build-inplace-for-tests
72 COMMAND U1DB_TEST=1 python setup.py build_ext -i -f -I ${CMAKE_SOURCE_DIR}/include
73 DEPENDS ReplicatePythonSourceTree u1db
74)
75
76add_custom_target(build-debug-for-tests
77 COMMAND U1DB_TEST=1 python-dbg setup.py build_ext -i -f -I ${CMAKE_SOURCE_DIR}/include
78 DEPENDS ReplicatePythonSourceTree u1db
79)
71add_custom_target(check-valgrind80add_custom_target(check-valgrind
72 COMMAND valgrind --tool=memcheck --suppressions=${CMAKE_SOURCE_DIR}/custom.supp python-dbg -m testtools.run discover81 COMMAND valgrind --tool=memcheck --suppressions=${CMAKE_SOURCE_DIR}/custom.supp python-dbg -m testtools.run discover
73 DEPENDS build-debug82 DEPENDS build-debug-for-tests
74)83)
7584
76add_custom_target(check-valgrind-leaks85add_custom_target(check-valgrind-leaks
77 COMMAND valgrind --tool=memcheck --suppressions=${CMAKE_SOURCE_DIR}/custom.supp --track-origins=yes --num-callers=40 --leak-resolution=high --leak-check=full python-dbg -m testtools.run discover86 COMMAND valgrind --tool=memcheck --suppressions=${CMAKE_SOURCE_DIR}/custom.supp --track-origins=yes --num-callers=40 --leak-resolution=high --leak-check=full python-dbg -m testtools.run discover
78 DEPENDS build-debug87 DEPENDS build-debug-for-tests
79)88)
8089
81add_custom_target(check-verbose90add_custom_target(check-verbose
82 COMMAND python -c \"import unittest, sys\; from testtools import run\; run.TestProgram(argv=sys.argv, testRunner=unittest.TextTestRunner(verbosity=2), stdout=sys.stdout)\" discover91 COMMAND U1DB_TEST=1 python -c \"import unittest, sys\; from testtools import run\; run.TestProgram(argv=sys.argv, testRunner=unittest.TextTestRunner(verbosity=2), stdout=sys.stdout)\" discover
83 DEPENDS build-inplace92 DEPENDS build-inplace-for-tests
84)93)
8594
86add_custom_target(html-docs95add_custom_target(html-docs
8796
=== modified file 'setup.py'
--- setup.py 2012-08-14 14:31:45 +0000
+++ setup.py 2012-09-07 16:55:22 +0000
@@ -15,6 +15,7 @@
15# You should have received a copy of the GNU Lesser General Public License15# You should have received a copy of the GNU Lesser General Public License
16# along with u1db. If not, see <http://www.gnu.org/licenses/>.16# along with u1db. If not, see <http://www.gnu.org/licenses/>.
1717
18import os
18import sys19import sys
1920
2021
@@ -63,31 +64,32 @@
63synchronize them with other stores.64synchronize them with other stores.
64"""65"""
65 }66 }
66 try:67 if "U1DB_TEST" in os.environ:
67 from Cython.Distutils import build_ext68 try:
68 except ImportError:69 from Cython.Distutils import build_ext
69 print "Unable to import Cython, to test the C implementation"70 except ImportError:
70 else:71 print "Unable to import Cython, to test the C implementation"
71 kwargs["cmdclass"] = {"build_ext": build_ext}
72 extra_libs = []
73 extra_defines = []
74 if sys.platform == 'win32':
75 # Used for the random number generator
76 extra_libs.append('advapi32')
77 extra_libs.append('libcurl_imp')
78 extra_libs.append('libeay32')
79 extra_defines = [('_CRT_SECURE_NO_WARNINGS', 1)]
80 else:72 else:
81 extra_libs.append('curl')73 kwargs["cmdclass"] = {"build_ext": build_ext}
82 extra_libs.append('json')74 extra_libs = []
83 ext.append(Extension(75 extra_defines = []
84 "u1db.tests.c_backend_wrapper",76 if sys.platform == 'win32':
85 ["u1db/tests/c_backend_wrapper.pyx"],77 # Used for the random number generator
86 include_dirs=['include'],78 extra_libs.append('advapi32')
87 library_dirs=["src"],79 extra_libs.append('libcurl_imp')
88 libraries=['u1db', 'sqlite3', 'oauth'] + extra_libs,80 extra_libs.append('libeay32')
89 define_macros=[] + extra_defines,81 extra_defines = [('_CRT_SECURE_NO_WARNINGS', 1)]
90 ))82 else:
83 extra_libs.append('curl')
84 extra_libs.append('json')
85 ext.append(Extension(
86 "u1db.tests.c_backend_wrapper",
87 ["u1db/tests/c_backend_wrapper.pyx"],
88 include_dirs=['include'],
89 library_dirs=["src"],
90 libraries=['u1db', 'sqlite3', 'oauth'] + extra_libs,
91 define_macros=[] + extra_defines,
92 ))
91 setup(**kwargs)93 setup(**kwargs)
9294
93if __name__ == "__main__":95if __name__ == "__main__":

Subscribers

People subscribed via source and target branches