components/python/m2crypto/Makefile
changeset 1890 5a4ef66c42bf
parent 1434 c782e620dd26
child 1907 446472de62e9
--- a/components/python/m2crypto/Makefile	Fri May 09 15:56:52 2014 -0700
+++ b/components/python/m2crypto/Makefile	Fri May 09 20:59:20 2014 -0700
@@ -18,12 +18,13 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+
 #
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+#
+
 include ../../../make-rules/shared-macros.mk
 
-PATH=/usr/bin:/usr/gnu/bin:/usr/sbin
-
 COMPONENT_NAME=		M2Crypto
 COMPONENT_VERSION=	0.21.1
 COMPONENT_PROJECT_URL=	http://chandlerproject.org/Projects/MeTooCrypto/
@@ -40,12 +41,28 @@
 
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
+# Needed to get around a broken /usr/lib/python2.7/config/Makefile
+# See CR #16837431.
+LD=$(CC)
+LDSHARED=$(CC) -G
+PYTHON_ENV += CC="$(CC)"
+PYTHON_ENV += LDSHARED="$(LDSHARED)"
+PYTHON_ENV += LD="$(LD)"
+PYTHON_ENV += CFLAGS="$(CFLAGS)"
+COMPONENT_INSTALL_ENV += $(PYTHON_ENV)
+
+COMPONENT_TEST_ARGS =	setup.py test
+COMPONENT_TEST_DIR =	$(COMPONENT_SRC)
+COMPONENT_TEST_ENV=	CC=$(CC)
+COMPONENT_TEST_ENV +=	PATH=/usr/bin
+COMPONENT_TEST_ENV +=	PYTHONPATH=$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES.32)
+
 # common targets
 build:		$(BUILD_32_and_64)
 
 install:	$(INSTALL_32_and_64)
 
-test:		$(NO_TESTS)
+test:		$(TEST_32_and_64)
 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)