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