Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Dec 2017 11:15:02 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r457144 - in head/textproc/py-genshi: . files
Message-ID:  <201712241115.vBOBF2ch034187@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Sun Dec 24 11:15:01 2017
New Revision: 457144
URL: https://svnweb.freebsd.org/changeset/ports/457144

Log:
  Fix Python 3 build
  
  - While I'm here, convert to options dependency helper
  
  This port is ready for Python 3.
  The only failure for FreeBSD (autoplist) is the missing _speedups.so.
  Upstream disabled the speedups C extension on Python 3.3+ which fixes the problem.
  
  Obtained from:  https://github.com/edgewall/genshi/commit/cef2c8df44166195e1705638f9f17033a4943bb7
  With hat:	python

Added:
  head/textproc/py-genshi/files/
  head/textproc/py-genshi/files/patch-setup.py   (contents, props changed)
Modified:
  head/textproc/py-genshi/Makefile

Modified: head/textproc/py-genshi/Makefile
==============================================================================
--- head/textproc/py-genshi/Makefile	Sun Dec 24 11:14:56 2017	(r457143)
+++ head/textproc/py-genshi/Makefile	Sun Dec 24 11:15:01 2017	(r457144)
@@ -17,13 +17,9 @@ LICENSE=	BSD3CLAUSE
 OPTIONS_DEFINE=	BABEL
 BABEL_DESC=	I18n support through the Babel plugin
 
-USES=		python:2.7
+USES=		python
 USE_PYTHON=	distutils autoplist
 
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MBABEL}
-RUN_DEPENDS+=	${PKGNAMEPREFIX}Babel>=0.9.6:devel/py-babel@${FLAVOR}
-.endif
+BABEL_RUN_DEPENDS=	${PKGNAMEPREFIX}Babel>=0.9.6:devel/py-babel@${FLAVOR}
 
 .include <bsd.port.mk>

Added: head/textproc/py-genshi/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/py-genshi/files/patch-setup.py	Sun Dec 24 11:15:01 2017	(r457144)
@@ -0,0 +1,17 @@
+--- setup.py.orig	2013-01-27 15:48:03 UTC
++++ setup.py
+@@ -65,9 +65,13 @@ available.""")
+ 
+ 
+ if Feature:
++    # Optional C extension module for speeding up Genshi:
++    # Not activated by default on:
++    # - PyPy (where it harms performance)
++    # - CPython >= 3.3 (the new Unicode C API is not supported yet)
+     speedups = Feature(
+         "optional C speed-enhancements",
+-        standard = not is_pypy,
++        standard = not is_pypy and sys.version_info < (3, 3),
+         ext_modules = [
+             Extension('genshi._speedups', ['genshi/_speedups.c']),
+         ],



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712241115.vBOBF2ch034187>