On 04/10/16 06:09, Stuart Henderson wrote:
On 2016/04/09 22:52, Michael Reed wrote:
+do-test:
+ (cd ${WRKSRC} ;\
+ virtualenv-3 --system-site-packages --no-pip borg-env ;\
+ . borg-env/bin/activate ;\
+ python${MODPY_DEFAULT_VERSION_3} ./setup.py install ;\
python${MODPY_DEFAULT_VERSION_3} should just be ${MODPY_BIN}
Why? I ask mainly because `make test' fails with your suggestion applied,
but works fine without. Keep in mind I'm new to all things python.port.mk :)
Anyway, I've attached a new patch that's been synced with the version in
ports and avoids the benchmark part of the testsuite more cleanly.
+ cd build/lib.openbsd-$$(uname -r)-$$(uname
-m)-${MODPY_DEFAULT_VERSION_3} ;\
+ export PYTHONPATH=`pwd` ;\
+ rm borg/testsuite/benchmark.py ;\
+ py.test-3 --pyargs borg.testsuite)
...but it fails for me, it looks like it should use a different dir:
(cd /usr/obj/ports/borgbackup-1.0.1/borgbackup-1.0.1 ; virtualenv-3
--system-site-packages --no-pip borg-env ; . borg-env/bin/activate ;
/usr/local/bin/python3.4 ./setup.py install ; cd build/lib.openbsd-$(uname
-r)-$(uname -m)-3.4 ; export PYTHONPATH=`pwd` ; rm borg/testsuite/benchmark.py
; py.test-3 --pyargs borg.testsuite)
Using base prefix '/usr/local'
New python executable in borg-env/bin/python3.4
Also creating executable in borg-env/bin/python
Installing setuptools, wheel...done.
running install
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied:
'/usr/local/lib/python3.4/site-packages/test-easy-install-1018.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python3.4/site-packages/
? update.diff
Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/borgbackup/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile 10 Apr 2016 09:27:53 -0000 1.2
+++ Makefile 10 Apr 2016 17:50:34 -0000
@@ -2,7 +2,7 @@
COMMENT = deduplicating backup program
-MODPY_EGG_VERSION = 1.0.0
+MODPY_EGG_VERSION = 1.0.1
DISTNAME = borgbackup-${MODPY_EGG_VERSION}
MODPY_PI = Yes
@@ -24,7 +24,9 @@ BUILD_DEPENDS += devel/py-setuptools_scm
textproc/py-sphinx
RUN_DEPENDS += net/py-msgpack${MODPY_FLAVOR}
-TEST_DEPENDS += net/py-msgpack${MODPY_FLAVOR}
+TEST_DEPENDS += net/py-msgpack${MODPY_FLAVOR} \
+ devel/py-test${MODPY_FLAVOR} \
+ devel/py-virtualenv${MODPY_FLAVOR}
MODPY_SETUPTOOLS = Yes
@@ -33,5 +35,14 @@ post-build:
post-install:
${INSTALL_MAN} ${WRKSRC}/docs/_build/man/borg.1 ${PREFIX}/man/man1/borg.1
+
+do-test:
+ (cd ${WRKSRC} ;\
+ virtualenv-3 --system-site-packages --no-pip borg-env ;\
+ . borg-env/bin/activate ;\
+ python${MODPY_DEFAULT_VERSION_3} ./setup.py install ;\
+ cd build/lib.openbsd-$$(uname -r)-$$(uname -m)-${MODPY_DEFAULT_VERSION_3} ;\
+ export PYTHONPATH=`pwd` ;\
+ py.test-3 -k 'not benchmark' --pyargs borg.testsuite)
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/borgbackup/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 8 Apr 2016 21:15:04 -0000 1.1.1.1
+++ distinfo 10 Apr 2016 17:50:34 -0000
@@ -1,2 +1,2 @@
-SHA256 (borgbackup-1.0.0.tar.gz) = UAueMRMxqojsB9+U2fMoCnnKIHvxqZe5LdHmofFmRnE=
-SIZE (borgbackup-1.0.0.tar.gz) = 424089
+SHA256 (borgbackup-1.0.1.tar.gz) = WKLC5kkgfI4VIj9jgNI4EksPG0X9g5kKQN9bZ4zUH7o=
+SIZE (borgbackup-1.0.1.tar.gz) = 413316