Only adding a small patch to setup.py that has been sent upstream and then
adjusting the TEST_DEPENDS.
All tests pass same as before on amd64.
OK?
--Kurt
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/py-objgraph/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile 12 Jul 2019 20:45:51 -0000 1.4
+++ Makefile 13 Sep 2019 22:08:24 -0000
@@ -23,7 +23,10 @@ MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
RUN_DEPENDS = math/py-graphviz${MODPY_FLAVOR}
-TEST_DEPENDS = devel/py-mock${MODPY_FLAVOR} \
- math/graphviz
+TEST_DEPENDS = math/graphviz
+
+.if !${FLAVOR:Mpython3}
+TEST_DEPENDS = devel/py-mock
+.endif
.include <bsd.port.mk>
Index: patches/patch-setup_py
===================================================================
RCS file: patches/patch-setup_py
diff -N patches/patch-setup_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-setup_py 13 Sep 2019 22:08:24 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Change setup.py to only require mock for python 2
+
+Sent to upstream: https://github.com/mgedmin/objgraph/pull/44
+
+Index: setup.py
+--- setup.py.orig
++++ setup.py
+@@ -82,7 +82,7 @@ setup(
+ install_requires=[
+ 'graphviz', # just for ipython support currently
+ ],
+- tests_require=['mock'],
++ tests_require=['mock;python_version=="2.7"'],
+ test_suite='tests.test_suite',
+ zip_safe=True,
+ )
No comments:
Post a Comment