#50775 Issue 50771 - 1.4.2.5 doesn't compile due to error ModuleNotFoundError: No module named 'pkg_resources.extern'
Closed 3 years ago by spichugi. Opened 4 years ago by vashirov.
vashirov/389-ds-base ds50771  into  master

file modified
+6 -1
@@ -40,7 +40,12 @@ 

  import operator

  import subprocess

  import math

- from pkg_resources.extern.packaging.version import LegacyVersion

+ # Setuptools ships with 'packaging' module, let's use it from there

+ try:

+     from pkg_resources.extern.packaging.version import LegacyVersion

+ # Fallback to a normal 'packaging' module in case 'setuptools' is stripped

+ except:

+     from packaging.version import LegacyVersion

  from socket import getfqdn

  from ldapurl import LDAPUrl

  from contextlib import closing

Bug Description:

Arch Linux ships python-setuptools stripped of vendored packages.
This makes lib389 fail with ModuleNotFoundError on import.

Fix Description:

Use a fallback to packaging module.

Fixes: https://pagure.io/389-ds-base/issue/50771
Relates: https://pagure.io/389-ds-base/issue/50712

Reviewed by: ???

rebased onto bcf5e9f

4 years ago

Pull-Request has been merged by vashirov

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3830

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata