Index: devel/Makefile =================================================================== --- devel/Makefile (revision 455565) +++ devel/Makefile (working copy) @@ -4263,6 +4263,7 @@ SUBDIR += py-avro SUBDIR += py-babel SUBDIR += py-babelfish + SUBDIR += py-backports SUBDIR += py-backports.csv SUBDIR += py-backports.functools_lru_cache SUBDIR += py-backports.shutil_get_terminal_size Index: devel/py-backports/Makefile =================================================================== --- devel/py-backports/Makefile (nonexistent) +++ devel/py-backports/Makefile (working copy) @@ -0,0 +1,38 @@ +# $FreeBSD$ + +PORTNAME= backports +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +PORTVERSION= 1 +CATEGORIES= devel python +DISTFILES= + +MAINTAINER= lifanov@FreeBSD.org +COMMENT= Shared namespace shim for py-backports.* ports + +LICENSE= MIT + +NO_FETCH= yes +NO_BUILD= yes +NO_ARCH= yes +USES= python +USE_PYTHON= flavors + +.include + +.if ${PYTHON_MAJOR_VER} == 2 +PLIST_FILES= ${PYTHON_SITELIBDIR}/backports/__init__.py \ + ${PYTHON_SITELIBDIR}/backports/__init__.pyc \ + ${PYTHON_SITELIBDIR}/backports/__init__.${PYTHON_PYOEXTENSION} +.else +PLIST_FILES= ${PYTHON_SITELIBDIR}/backports/__init__.py \ + ${PYTHON_SITELIBDIR}/backports/__pycache__/__init__.cpython-${PYTHON_SUFFIX}.pyc \ + ${PYTHON_SITELIBDIR}/backports/__pycache__/__init__.cpython-${PYTHON_SUFFIX}.${PYTHON_PYOEXTENSION} +.endif + +do-install: + ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/backports + ${ECHO_CMD} "__path__ = __import__('pkgutil').extend_path(__path__, __name__)" > ${STAGEDIR}${PYTHON_SITELIBDIR}/backports/__init__.py + ${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} + ${PYTHON_CMD} -O -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} + +.include Index: devel/py-backports/pkg-descr =================================================================== --- devel/py-backports/pkg-descr (nonexistent) +++ devel/py-backports/pkg-descr (working copy) @@ -0,0 +1,4 @@ +shared namespace shim for py-backports.* ports + +py-backports provides a common backports/__init__.py, +which is shared among all py-backports.* ports. Index: devel/py-backports.functools_lru_cache/Makefile =================================================================== --- devel/py-backports.functools_lru_cache/Makefile (revision 455565) +++ devel/py-backports.functools_lru_cache/Makefile (working copy) @@ -2,6 +2,7 @@ PORTNAME= backports.functools_lru_cache PORTVERSION= 1.4 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,9 +13,20 @@ LICENSE= MIT BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=1.15.0:devel/py-setuptools_scm@${FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}backports>0:devel/py-backports@${FLAVOR} NO_ARCH= yes USE_PYTHON= autoplist distutils USES= python:2.7 +POST_PLIST= trim-backports-namespace + +post-install: + @${RM} ${STAGEDIR}${PYTHON_SITELIBDIR}/backports/__init__.py* + @${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/backports/__pycache__ + +trim-backports-namespace: + @${REINPLACE_CMD} '/backports\/__init__.py*/d' ${TMPPLIST} + @${REINPLACE_CMD} '/backports\/__pycache__*/d' ${TMPPLIST} + .include Index: devel/py-backports.shutil_get_terminal_size/Makefile =================================================================== --- devel/py-backports.shutil_get_terminal_size/Makefile (revision 455565) +++ devel/py-backports.shutil_get_terminal_size/Makefile (working copy) @@ -2,6 +2,7 @@ PORTNAME= backports.shutil_get_terminal_size PORTVERSION= 1.0.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,7 +12,19 @@ LICENSE= PSFL +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}backports>0:devel/py-backports@${FLAVOR} + USES= python USE_PYTHON= autoplist distutils +POST_PLIST= trim-backports-namespace + +post-install: + @${RM} ${STAGEDIR}${PYTHON_SITELIBDIR}/backports/__init__.py* + @${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/backports/__pycache__ + +trim-backports-namespace: + @${REINPLACE_CMD} '/backports\/__init__.py*/d' ${TMPPLIST} + @${REINPLACE_CMD} '/backports\/__pycache__*/d' ${TMPPLIST} + .include Index: security/py-backports.ssl_match_hostname/Makefile =================================================================== --- security/py-backports.ssl_match_hostname/Makefile (revision 455565) +++ security/py-backports.ssl_match_hostname/Makefile (working copy) @@ -2,6 +2,7 @@ PORTNAME= backports.ssl_match_hostname PORTVERSION= 3.5.0.1 +PORTREVISION= 1 CATEGORIES= security python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,7 +12,19 @@ LICENSE= PSFL +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}backports>0:devel/py-backports@${FLAVOR} + USES= python:-3.4 USE_PYTHON= autoplist distutils +POST_PLIST= trim-backports-namespace + +post-install: + @${RM} ${STAGEDIR}${PYTHON_SITELIBDIR}/backports/__init__.py* + @${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/backports/__pycache__ + +trim-backports-namespace: + @${REINPLACE_CMD} '/backports\/__init__.py*/d' ${TMPPLIST} + @${REINPLACE_CMD} '/backports\/__pycache__*/d' ${TMPPLIST} + .include