components/python/cssutils/Makefile
changeset 6159 7e27d23491c5
parent 5028 db8ff415ba49
child 7687 1093e2a9adbd
--- a/components/python/cssutils/Makefile	Thu Jun 09 13:01:52 2016 -0700
+++ b/components/python/cssutils/Makefile	Thu Jun 09 14:18:41 2016 -0700
@@ -20,25 +20,22 @@
 #
 
 #
-# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		cssutils
-COMPONENT_VERSION=	0.9.6
+COMPONENT_VERSION=	1.0.1
 COMPONENT_PROJECT_URL=	https://pypi.python.org/pypi/cssutils/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_ARCHIVE=	$(COMPONENT_SRC).zip
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH= \
-    sha256:18f3cffb2ff413e0796d0c9192db3a56f18fe57524cc54edc57d20239614eb87
-COMPONENT_ARCHIVE_URL=	https://pypi.python.org/packages/source/c/cssutils/$(COMPONENT_ARCHIVE)
+    sha256:d8a18b2848ea1011750231f1dd64fe9053dbec1be0b37563c582561e7a529063
+COMPONENT_ARCHIVE_URL=	$(call pypi_url)
 COMPONENT_BUGDB=	python-mod/cssutils
 
-TPNO=			7908
-
-# This module is not Python 3 ready: syntax issues.
-PYTHON_VERSIONS = $(PYTHON2_VERSIONS)
+TPNO=			29366
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/setup.py.mk
@@ -47,10 +44,10 @@
 COMPONENT_TEST_DIR= $(COMPONENT_SRC)
 COMPONENT_TEST_ARGS= ./setup.py test
 
-# Remove the trailing Control-M's from the Python source files.
-COMPONENT_PRE_BUILD_ACTION = \
-	/usr/bin/find $(SOURCE_DIR)/src \
-		-name *.py -exec $(GSED) -i -e 's/
//g' "{}" \; ;
+# Replace "#!/usr/bin/env ..." shebang lines with properly versioned ones.
+COMPONENT_POST_INSTALL_ACTION += \
+	$(FIND) $(PROTOUSRLIBDIR)/python$(PYTHON_VERSION) -name *.py \
+		-exec $(GSED) -i -e 's|env python|python$(PYTHON_VERSION)|' "{}" \; ;
 
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)