Adopt pyzfs from ClusterHQ
This commit introduces several changes:
* Update LICENSE and project information
* Give a good PEP8 talk to existing Python source code
* Add RPM/DEB packaging for pyzfs
* Fix some outstanding issues with the existing pyzfs code caused by
changes in the ABI since the last time the code was updated
* Integrate pyzfs Python unittest with the ZFS Test Suite
* Add missing libzfs_core functions: lzc_change_key,
lzc_channel_program, lzc_channel_program_nosync, lzc_load_key,
lzc_receive_one, lzc_receive_resumable, lzc_receive_with_cmdprops,
lzc_receive_with_header, lzc_reopen, lzc_send_resume, lzc_sync,
lzc_unload_key, lzc_remap
Note: this commit slightly changes zfs_ioc_unload_key() ABI. This allow
to differentiate the case where we tried to unload a key on a
non-existing dataset (ENOENT) from the situation where a dataset has
no key loaded: this is consistent with the "change" case where trying
to zfs_ioc_change_key() from a dataset with no key results in EACCES.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7230
2018-03-18 11:34:45 +03:00
|
|
|
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
|
2018-06-12 04:42:12 +03:00
|
|
|
rm -rf build/ pyzfs.egg-info/
|
Adopt pyzfs from ClusterHQ
This commit introduces several changes:
* Update LICENSE and project information
* Give a good PEP8 talk to existing Python source code
* Add RPM/DEB packaging for pyzfs
* Fix some outstanding issues with the existing pyzfs code caused by
changes in the ABI since the last time the code was updated
* Integrate pyzfs Python unittest with the ZFS Test Suite
* Add missing libzfs_core functions: lzc_change_key,
lzc_channel_program, lzc_channel_program_nosync, lzc_load_key,
lzc_receive_one, lzc_receive_resumable, lzc_receive_with_cmdprops,
lzc_receive_with_header, lzc_reopen, lzc_send_resume, lzc_sync,
lzc_unload_key, lzc_remap
Note: this commit slightly changes zfs_ioc_unload_key() ABI. This allow
to differentiate the case where we tried to unload a key on a
non-existing dataset (ENOENT) from the situation where a dataset has
no key loaded: this is consistent with the "change" case where trying
to zfs_ioc_change_key() from a dataset with no key results in EACCES.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7230
2018-03-18 11:34:45 +03:00
|
|
|
|
|
|
|
clean-local:
|
|
|
|
|
|
|
|
check-local: all
|
|
|
|
endif
|