1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

Remove pyiso8601 from third_party

The trend has been to remove widely available packages from third_party/

This module is both widely available, and only needed for --enable-selftest

It is, strangely enough, a BuildDependes in the RHEL/Fedora packages
just to stop it being installed in third_party.

The check for iso8601 being available is moved to python/wscript

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
This commit is contained in:
Andrew Bartlett
2020-08-17 17:14:25 +12:00
parent 0573c13da2
commit 091e11260d
17 changed files with 26 additions and 1394 deletions

View File

@@ -2,6 +2,26 @@
import os
# work out what python external libraries we need to be successful
selftest_pkgs = {
'iso8601': 'python3-iso8601',
}
def find_third_party_module(conf, module, package):
conf.COMPOUND_START("Checking for system installation of Python module %s" % module)
try:
__import__(module)
except ImportError:
conf.COMPOUND_END(False)
raise Errors.WafError("""\
Unable to find Python module '%s'. Please install the system package: %s'.
""" % (module, package))
else:
# Installed on the system
conf.COMPOUND_END("system")
def configure(conf):
if conf.env.disable_python:
return
@@ -41,6 +61,11 @@ def configure(conf):
finally:
f.close()
if conf.CONFIG_GET('ENABLE_SELFTEST'):
for module, package in selftest_pkgs.items():
find_third_party_module(conf, module, package)
def build(bld):