1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

devel/py-minimongo: Fix build with setuptools 58.0.0+

With hat:	python
This commit is contained in:
Po-Chuan Hsieh 2022-03-25 21:32:17 +08:00
parent 4e3b12e13d
commit f9075b3add
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B

View File

@ -0,0 +1,29 @@
--- minimongo/config.py.orig 2011-04-13 04:54:06 UTC
+++ minimongo/config.py
@@ -31,7 +31,7 @@ def _resolve_name(name, package, level):
if not hasattr(package, 'rindex'):
raise ValueError("'package' not set to a string")
dot = len(package)
- for x in xrange(level, 1, -1):
+ for x in range(level, 1, -1):
try:
dot = package.rindex('.', 0, dot)
except ValueError:
@@ -66,7 +66,7 @@ if __name__ != '__main__':
try:
settings_modules.append(os.environ['MINIMONGO_SETTINGS_MODULE'])
- except KeyError, e:
+ except KeyError as e:
pass
# Here are the other 2 places that we try to import configs from:
@@ -81,7 +81,7 @@ if __name__ != '__main__':
# Once we get a successfull config module import, we break out
# of the loop above.
break
- except ImportError, exc:
+ except ImportError as exc:
# Error importing this modlue, so we continue
pass