]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/pyzfs/Makefile.am
pyzfs: python3 support (build system)
[mirror_zfs.git] / tests / zfs-tests / tests / functional / pyzfs / Makefile.am
index 61cb3d074d9d54c0ffaacd4349fbb05b7ef6d654..0a27adeccaf48ba39b2d7239fc6f0522577aa9ce 100644 (file)
@@ -1,4 +1,18 @@
-pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/pyzfs
-
-dist_pkgdata_SCRIPTS = \
+pkgpyzfsdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/pyzfs
+pkgpyzfs_SCRIPTS = \
        pyzfs_unittest.ksh
+
+EXTRA_DIST = \
+       pyzfs_unittest.ksh.in
+
+#
+# The pyzfs module is built either for Python 2 or Python 3.  In order
+# to properly test it the unit tests must be updated to the matching vesion.
+#
+$(pkgpyzfs_SCRIPTS):%:%.in
+       -$(SED) -e 's,@PYTHON\@,$(PYTHON),g' \
+               $< >'$@'
+       -chmod 775 $@
+
+distclean-local::
+       -$(RM) $(pkgpyzfs_SCRIPTS)