aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Lacko <backup.rlacko@gmail.com>2013-06-29 17:57:58 +0200
committerRoman Lacko <backup.rlacko@gmail.com>2013-06-29 17:57:58 +0200
commit2d25c12dafb94de5744a8117803feca2eeb37290 (patch)
tree42db2683dc859f529b445cc8814d11219ea8f781
parentafc91d2f11962102432922fbfb83e872c44afeee (diff)
Add option --build-tests to enable building the tests
-rw-r--r--README.rst3
-rw-r--r--setup.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index 7353ff546..918c2afb9 100644
--- a/README.rst
+++ b/README.rst
@@ -308,6 +308,9 @@ Options
``--jom``
Use jom instead of nmake with msvc
+``--build-tests``
+ Enable building the tests
+
Feedback and getting involved
=============================
diff --git a/setup.py b/setup.py
index 070ded8a8..806a56d04 100644
--- a/setup.py
+++ b/setup.py
@@ -103,6 +103,7 @@ OPTION_MSVCVERSION = option_value("msvc-version")
OPTION_NOEXAMPLES = has_option("no-examples") # don't include pyside-examples
OPTION_JOBS = option_value('jobs') # number of parallel build jobs
OPTION_JOM = has_option('jom') # use jom instead of nmake with msvc
+OPTION_BUILDTESTS = has_option("build-tests")
if OPTION_QMAKE is None:
OPTION_QMAKE = find_executable("qmake")
@@ -286,6 +287,7 @@ class pyside_build(_build):
self.py_version = None
self.build_type = "Release"
self.qtinfo = None
+ self.build_tests = False
def run(self):
platform_arch = platform.architecture()[0]
@@ -448,10 +450,12 @@ class pyside_build(_build):
self.build_type = build_type
self.qtinfo = qtinfo
self.site_packages_dir = get_python_lib(1, 0, prefix=install_dir)
+ self.build_tests = OPTION_BUILDTESTS
log.info("=" * 30)
log.info("Package version: %s" % __version__)
log.info("Build type: %s" % self.build_type)
+ log.info("Build tests: %s" % self.build_tests)
log.info("-" * 3)
log.info("Make path: %s" % self.make_path)
log.info("Make generator: %s" % self.make_generator)
@@ -536,7 +540,7 @@ class pyside_build(_build):
OPTION_CMAKE,
"-G", self.make_generator,
"-DQT_QMAKE_EXECUTABLE=%s" % self.qmake_path,
- "-DBUILD_TESTS=False",
+ "-DBUILD_TESTS=%s" % self.build_tests,
"-DDISABLE_DOCSTRINGS=True",
"-DCMAKE_BUILD_TYPE=%s" % self.build_type,
"-DCMAKE_INSTALL_PREFIX=%s" % self.install_dir,