From 7ae014ad4911c8a699697466bf9cad5d4ef43656 Mon Sep 17 00:00:00 2001 From: Ruslan Makhmatkhanov Date: Sat, 17 Jan 2015 22:16:49 +0000 Subject: [PATCH] devel/py-experimental.cssselect: fix packaging on python3 --- devel/py-experimental.cssselect/Makefile | 9 ++++++++- devel/py-experimental.cssselect/files/patch-setup.py | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 devel/py-experimental.cssselect/files/patch-setup.py diff --git a/devel/py-experimental.cssselect/Makefile b/devel/py-experimental.cssselect/Makefile index 193002d59481..08f73942dafa 100644 --- a/devel/py-experimental.cssselect/Makefile +++ b/devel/py-experimental.cssselect/Makefile @@ -13,6 +13,13 @@ COMMENT= Experimental version of lxml.cssselect RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}lxml>=0:${PORTSDIR}/devel/py-lxml USES= python zip -USE_PYTHON= distutils autoplist +USE_PYTHON= autoplist distutils + +post-patch: + # fix pkg-plist problem with python3. This file is not installing. + @${REINPLACE_CMD} -e 's|src/experimental/__init__.py||' \ + ${WRKSRC}/src/experimental.cssselect.egg-info/SOURCES.txt + @${RM} ${WRKSRC}/src/experimental/__init__.py \ + ${WRKSRC}/src/experimental.cssselect.egg-info/SOURCES.txt.bak .include diff --git a/devel/py-experimental.cssselect/files/patch-setup.py b/devel/py-experimental.cssselect/files/patch-setup.py new file mode 100644 index 000000000000..0b7c6c7bc5d6 --- /dev/null +++ b/devel/py-experimental.cssselect/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2012-04-04 20:27:16 UTC ++++ setup.py +@@ -16,7 +16,7 @@ setup( + open("CHANGES.txt").read(), + author='Laurence Rowe', + url='https://github.com/lrowe/experimental.cssselect', +- packages=find_packages('src'), ++ packages=['experimental'], + package_dir={'':'src'}, + namespace_packages=[ + '.'.join(name.split('.')[:n+1]) for n in range(name.count('.'))],