We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pkgutil
importlib
1 parent 5a85a1c commit 1373a76Copy full SHA for 1373a76
setup.py
@@ -4,7 +4,7 @@
4
# Copyright (c) 2015, Ayun Park. All rights reserved.
5
# For licensing, see LICENSE file included in the package.
6
import sys
7
-import pkgutil
+import importlib.util
8
from setuptools import setup
9
from setuptools.command.install import install
10
@@ -13,9 +13,7 @@ class NewInstall(install):
13
14
@staticmethod
15
def check_pymongo():
16
- if pkgutil.find_loader('pymongo'):
17
- return True
18
- return False
+ return importlib.util.find_spec('pymongo')
19
20
def run(self):
21
install.run(self)
0 commit comments