aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/pyzfs/Makefile.am
blob: 49b6a6f29880cda26fabfa1e462ec6880fc39b68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
EXTRA_DIST = libzfs_core setup.py README LICENSE docs

if PYZFS_ENABLED
all:

all-local:
	$(PYTHON) setup.py build

#
# On Debian (Ubuntu, and other downstream distros) the install location of
# Python packages is "../dist-packages" instead of "../site-packages" [1].
# The install location used by "$(PYTHON) setup.py install" must match the
# location specified in the ZFS specfile (RPM macro "%{python_sitelib}") to
# avoid errors during the rpmbuild process.
# However we cannot pass "--install-layout=deb" to the setup script here because
# it is not supported on RPM-based distros; we use the combination of
# "--prefix", "--root" and "--install-lib" parameters instead which should work
# on every supported system.
#
# [1] https://wiki.debian.org/Python#Deviations_from_upstream
#
# Using "--no-compile" will not generate .pyc files which, in turn, will not be
# packaged: this could result in failures during the uninstall phase if these
# files are later created by manually loading the Python modules.
#
install-exec-local:
	$(PYTHON) $(srcdir)/setup.py install \
	--prefix $(prefix) \
	--root $(DESTDIR)/ \
	--install-lib $(pythondir) \
	--single-version-externally-managed \
	--verbose

clean:	clean-local

clean-local:

check-local: all
endif