README notes on Python3.
authorRalph Bean <rbean@redhat.com>
Mon, 16 Nov 2015 14:28:44 +0000 (09:28 -0500)
committerRalph Bean <rbean@redhat.com>
Mon, 16 Nov 2015 14:28:44 +0000 (09:28 -0500)
README.md

index ff2524313a5487e6d020625c616c7711921c9590..6a1e247b897fe8538bd3eebdccaf6caa869616d3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -71,6 +71,17 @@ where the path is path to your build of drpm library.
 
     cmake -DDRPM_PATH="/home/tmlcoch/git/drpm" .. && make
 
+## Building for a different Python version
+
+By default, cmake should find the default version of python on your system
+(say, Python 2), but if you want to build for Python 3 you need to specify
+parameters like the following:
+
+    cmake \
+        -DPYTHON_LIBRARY=/usr/lib64/libpython3.4m.so \
+        -DPYTHON_INCLUDE_DIR=/usr/include/python3.4m \
+        -D PYTHON_EXECUTABLE=/usr/bin/python3 .
+
 ## Build tarball
 
     utils/make_tarball.sh [git revision]
@@ -105,6 +116,10 @@ Note: The C tests have to be builded by ``make tests``)!
 
     PYTHONPATH=`readlink -f ./build/src/python/` nosetests -s tests/python/tests/
 
+Or, for an alternative python version, specify the appropriate nosetests executable:
+
+    PYTHONPATH=`readlink -f ./build/src/python/` nosetests-3.4 -s tests/python/tests/
+
 ### Links
 
 [Bugzilla](https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=MODIFIED&bug_status=VERIFIED&component=createrepo_c&query_format=advanced)