mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
d98a67a53a
The EXTRA_DIST variable is ignored when used in the FALSE conditional of a Makefile.am. This results in the `make dist` target omitting these files from the generated tarball unless CONFIG_USER is defined. This issue can be avoided by switching to use the dist_noinst_DATA variable which is handled as expected by autoconf. This change also adds support for --with-config=dist as an alias for --with-config=srpm and updates the GitHub workflows to use it. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #13459 Closes #13505
39 lines
1.4 KiB
Makefile
39 lines
1.4 KiB
Makefile
dist_noinst_DATA += %D%/libzfs_core %D%/README %D%/LICENSE %D%/docs
|
|
SUBSTFILES += %D%/setup.py
|
|
|
|
if PYZFS_ENABLED
|
|
ALL_LOCAL += pyzfs-all-local
|
|
pyzfs_V_1 = -v
|
|
pyzfs-all-local: %D%/setup.py
|
|
cd %D% && $(PYTHON) setup.py -q $(pyzfs_V_$(V)) egg_info -e . 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:
|
|
cd %D% && $(PYTHON) setup.py egg_info -e . install \
|
|
--prefix $(prefix) \
|
|
--root $(DESTDIR)/ \
|
|
--install-lib $(pythonsitedir) \
|
|
--single-version-externally-managed \
|
|
--verbose
|
|
|
|
CLEAN_LOCAL += pyzfs-clean-local
|
|
pyzfs-clean-local:
|
|
-$(RM) -r %D%/build/ %D%/pyzfs.egg-info/
|
|
endif
|