]> git.proxmox.com Git - mirror_zfs.git/blob - contrib/pyzfs/Makefile.am
Replace EXTRA_DIST with dist_noinst_DATA
[mirror_zfs.git] / contrib / pyzfs / Makefile.am
1 dist_noinst_DATA += %D%/libzfs_core %D%/README %D%/LICENSE %D%/docs
2 SUBSTFILES += %D%/setup.py
3
4 if PYZFS_ENABLED
5 ALL_LOCAL += pyzfs-all-local
6 pyzfs_V_1 = -v
7 pyzfs-all-local: %D%/setup.py
8 cd %D% && $(PYTHON) setup.py -q $(pyzfs_V_$(V)) egg_info -e . build
9
10 #
11 # On Debian (Ubuntu, and other downstream distros) the install location of
12 # Python packages is "../dist-packages" instead of "../site-packages" [1].
13 # The install location used by "$(PYTHON) setup.py install" must match the
14 # location specified in the ZFS specfile (RPM macro "%{python_sitelib}") to
15 # avoid errors during the rpmbuild process.
16 # However we cannot pass "--install-layout=deb" to the setup script here because
17 # it is not supported on RPM-based distros; we use the combination of
18 # "--prefix", "--root" and "--install-lib" parameters instead which should work
19 # on every supported system.
20 #
21 # [1] https://wiki.debian.org/Python#Deviations_from_upstream
22 #
23 # Using "--no-compile" will not generate .pyc files which, in turn, will not be
24 # packaged: this could result in failures during the uninstall phase if these
25 # files are later created by manually loading the Python modules.
26 #
27 install-exec-local:
28 cd %D% && $(PYTHON) setup.py egg_info -e . install \
29 --prefix $(prefix) \
30 --root $(DESTDIR)/ \
31 --install-lib $(pythonsitedir) \
32 --single-version-externally-managed \
33 --verbose
34
35 CLEAN_LOCAL += pyzfs-clean-local
36 pyzfs-clean-local:
37 -$(RM) -r %D%/build/ %D%/pyzfs.egg-info/
38 endif