make-rules/setup.py.mk
branchs11-update
changeset 2692 ee922fed53a7
parent 774 d0cbca26a17c
child 1293 98e5300bb391
child 2693 2aa48dc32866
equal deleted inserted replaced
2691:39a54b66e155 2692:ee922fed53a7
    46 ifneq ($(findstring 2.7,$(PYTHON_VERSIONS)),)
    46 ifneq ($(findstring 2.7,$(PYTHON_VERSIONS)),)
    47 $(BUILD_DIR)/%-2.6/.build:	$(BUILD_DIR)/%-2.7/.build
    47 $(BUILD_DIR)/%-2.6/.build:	$(BUILD_DIR)/%-2.7/.build
    48 $(BUILD_DIR)/%-2.6/.installed:	$(BUILD_DIR)/%-2.7/.installed
    48 $(BUILD_DIR)/%-2.6/.installed:	$(BUILD_DIR)/%-2.7/.installed
    49 endif
    49 endif
    50 
    50 
       
    51 # Create a distutils config file specific to the combination of build
       
    52 # characteristics (bittedness x Python version), and put it in its own
       
    53 # directory.  We can set $HOME to point distutils at it later, allowing
       
    54 # the install phase to find the temporary build directories.
       
    55 CFG=.pydistutils.cfg
       
    56 $(BUILD_DIR)/config-%/$(CFG):
       
    57 	$(MKDIR) $(@D)
       
    58 	echo "[build]\nbuild_base = $(BUILD_DIR)/$*" > [email protected]
       
    59 
    51 # build the configured source
    60 # build the configured source
    52 $(BUILD_DIR)/%/.built:	$(SOURCE_DIR)/.prep
    61 $(BUILD_DIR)/%/.built:	$(SOURCE_DIR)/.prep $(BUILD_DIR)/config-%/$(CFG)
    53 	$(RM) -r $(@D) ; $(MKDIR) $(@D)
    62 	$(RM) -r $(@D) ; $(MKDIR) $(@D)
    54 	$(COMPONENT_PRE_BUILD_ACTION)
    63 	$(COMPONENT_PRE_BUILD_ACTION)
    55 	(cd $(SOURCE_DIR) ; $(ENV) $(PYTHON_ENV) \
    64 	(cd $(SOURCE_DIR) ; $(ENV) HOME=$(BUILD_DIR)/config-$* $(PYTHON_ENV) \
    56 		$(PYTHON.$(BITS)) ./setup.py build \
    65 		$(PYTHON.$(BITS)) ./setup.py build)
    57 			--build-temp $(@D:$(BUILD_DIR)/%=%))
       
    58 	$(COMPONENT_POST_BUILD_ACTION)
    66 	$(COMPONENT_POST_BUILD_ACTION)
    59 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
    67 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
    60 	-$(PARFAIT) $(SOURCE_DIR)/$(@D:$(BUILD_DIR)/%=%)
    68 	-$(PARFAIT) $(SOURCE_DIR)/$(@D:$(BUILD_DIR)/%=%)
    61 endif
    69 endif
    62 	$(TOUCH) [email protected]
    70 	$(TOUCH) [email protected]
    68 COMPONENT_INSTALL_ARGS +=	--install-platlib=$(PYTHON_LIB)
    76 COMPONENT_INSTALL_ARGS +=	--install-platlib=$(PYTHON_LIB)
    69 COMPONENT_INSTALL_ARGS +=	--install-data=$(PYTHON_DATA)
    77 COMPONENT_INSTALL_ARGS +=	--install-data=$(PYTHON_DATA)
    70 COMPONENT_INSTALL_ARGS +=	--force
    78 COMPONENT_INSTALL_ARGS +=	--force
    71 
    79 
    72 # install the built source into a prototype area
    80 # install the built source into a prototype area
    73 $(BUILD_DIR)/%/.installed:	$(BUILD_DIR)/%/.built
    81 $(BUILD_DIR)/%/.installed:	$(BUILD_DIR)/%/.built $(BUILD_DIR)/config-%/$(CFG)
    74 	$(COMPONENT_PRE_INSTALL_ACTION)
    82 	$(COMPONENT_PRE_INSTALL_ACTION)
    75 	(cd $(SOURCE_DIR) ; $(ENV) $(COMPONENT_INSTALL_ENV) \
    83 	(cd $(SOURCE_DIR) ; $(ENV) HOME=$(BUILD_DIR)/config-$* $(COMPONENT_INSTALL_ENV) \
    76 		$(PYTHON.$(BITS)) ./setup.py install $(COMPONENT_INSTALL_ARGS))
    84 		$(PYTHON.$(BITS)) ./setup.py install $(COMPONENT_INSTALL_ARGS))
    77 	$(COMPONENT_POST_INSTALL_ACTION)
    85 	$(COMPONENT_POST_INSTALL_ACTION)
    78 	$(TOUCH) [email protected]
    86 	$(TOUCH) [email protected]
    79 
    87 
    80 COMPONENT_TEST_DEP =	$(BUILD_DIR)/%/.installed
    88 COMPONENT_TEST_DEP =	$(BUILD_DIR)/%/.installed