[csw-devel] SF.net SVN: gar:[21572] csw/mgar/gar/v2

pfelecan at users.sourceforge.net pfelecan at users.sourceforge.net
Mon Jul 29 17:15:33 CEST 2013


Revision: 21572
          http://gar.svn.sourceforge.net/gar/?rev=21572&view=rev
Author:   pfelecan
Date:     2013-07-29 15:15:33 +0000 (Mon, 29 Jul 2013)
Log Message:
-----------
./buildys/v2: start to support building for multiple Python interpreters.

Modified Paths:
--------------
    csw/mgar/gar/v2/categories/python/category.mk
    csw/mgar/gar/v2/gar.conf.mk
    csw/mgar/gar/v2/gar.lib.mk

Modified: csw/mgar/gar/v2/categories/python/category.mk
===================================================================
--- csw/mgar/gar/v2/categories/python/category.mk	2013-07-29 15:00:32 UTC (rev 21571)
+++ csw/mgar/gar/v2/categories/python/category.mk	2013-07-29 15:15:33 UTC (rev 21572)
@@ -1,5 +1,5 @@
 # Add a dependency to CSWpython
-_EXTRA_GAR_PKGS += CSWpython
+_EXTRA_GAR_PKGS += $(PYTHON_PACKAGE)
 
 # For the record, do not include the following line:
 # _MERGE_EXCLUDE_CATEGORY += .*\.egg-info.*
@@ -28,11 +28,11 @@
 LICENSE ?= PKG-INFO
 SPKG_SOURCEURL ?= http://pypi.python.org/pypi/$(NAME)
 MASTER_SITES ?= $(PYPI_MIRROR)
-PACKAGES ?= CSWpy-$(DASHED_NAME)
+PACKAGES ?= $(PYTHON_MODULE_PACKAGE_PREFIX)$(DASHED_NAME)
 
 # for use in any references by specific recipes so it can be replaced easily
 # across the tree.  this could later be parameterized for use by multiple
 # versions of python too.
-SITE_PACKAGES = $(libdir)/python2.6/site-packages
+SITE_PACKAGES = $(PYTHON_SITE_PACKAGES)
 
 include gar/gar.mk

Modified: csw/mgar/gar/v2/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2/gar.conf.mk	2013-07-29 15:00:32 UTC (rev 21571)
+++ csw/mgar/gar/v2/gar.conf.mk	2013-07-29 15:15:33 UTC (rev 21572)
@@ -869,6 +869,31 @@
 
 INSTALL_SCRIPTS   ?= $(WORKSRC)/Makefile
 
+#
+# Python configuration
+
+PYTHON_VERSION ?= 2_6
+
+PYTHON_EXECUTABLE_2_6 = /opt/csw/bin/python2.6
+PYTHON_EXECUTABLE_2_7 = /opt/csw/bin/python2.7
+PYTHON_EXECUTABLE_3_3 = /opt/csw/bin/python3.3
+PYTHON_EXECUTABLE = $(PYTHON_EXECUTABLE_$(PYTHON_VERSION))
+
+PYTHON_PACKAGE_2_6 = CSWpython
+PYTHON_PACKAGE_2_7 = CSWpython27
+PYTHON_PACKAGE_3_3 = CSWpython33
+PYTHON_PACKAGE = $(PYTHON_PACKAGE_$(PYTHON_VERSION))
+
+PYTHON_SITE_PACKAGES_2_6 = $(libdir)/python2.6/site-packages
+PYTHON_SITE_PACKAGES_2_7 = $(libdir)/python2.7/site-packages
+PYTHON_SITE_PACKAGES_3_3 = $(libdir)/python3.3/site-packages
+PYTHON_SITE_PACKAGES = $(PYTHON_SITE_PACKAGES_$(PYTHON_VERSION))
+
+PYTHON_MODULE_PACKAGE_PREFIX_2_6 = CSWpy-
+PYTHON_MODULE_PACKAGE_PREFIX_2_7 = CSWpy-
+PYTHON_MODULE_PACKAGE_PREFIX_3_3 = CSWpy33-
+PYTHON_MODULE_PACKAGE_PREFIX = $(PYTHON_MODULE_PACKAGE_PREFIX_$(PYTHON_VERSION))
+
 # Global environment
 export PATH PKG_CONFIG_PATH
 

Modified: csw/mgar/gar/v2/gar.lib.mk
===================================================================
--- csw/mgar/gar/v2/gar.lib.mk	2013-07-29 15:00:32 UTC (rev 21571)
+++ csw/mgar/gar/v2/gar.lib.mk	2013-07-29 15:15:33 UTC (rev 21572)
@@ -910,7 +910,7 @@
 PYBUILD_CMD ?= build
 build-%/setup.py:
 	@echo " ==> Running setup.py $(PYBUILD_TYPE) in $*"
-	@( cd $* ; $(BUILD_ENV) python ./setup.py $(PYBUILD_CMD) $(BUILD_ARGS) )
+	@( cd $* ; $(BUILD_ENV) $(PYTHON_EXECUTABLE) ./setup.py $(PYBUILD_CMD) $(BUILD_ARGS) )
 	@$(MAKECOOKIE)
 
 #################### CLEAN RULES ####################
@@ -988,6 +988,7 @@
 test-%/setup.py:
 	@echo " ==> Running setup.py test in $*"
 	@( cd $* ; cd $(OBJDIR) ; $(TEST_ENV) python ./setup.py test $(TEST_ARGS) )
+	@( cd $* ; cd $(OBJDIR) ; $(TEST_ENV) $(PYTHON_EXECUTABLE) ./setup.py test $(TEST_ARGS) )
 	@$(MAKECOOKIE)
 
 ################# INSTALL RULES ####################
@@ -1035,7 +1036,7 @@
 PYINSTALL_CMD ?= install
 install-%/setup.py:
 	@echo " ==> Running setup.py $(PYINSTALL_CMD) in $*"
-	@( cd $* ; $(INSTALL_ENV) python ./setup.py $(PYINSTALL_CMD) $(INSTALL_ARGS) )
+	@( cd $* ; $(INSTALL_ENV) $(PYTHON_EXECUTABLE) ./setup.py $(PYINSTALL_CMD) $(INSTALL_ARGS) )
 	@$(MAKECOOKIE)
 
 # pkg-config scripts

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list