mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-23 00:14:48 +00:00
8 lines
208 B
Python
8 lines
208 B
Python
|
import pkg_resources
|
||
|
|
||
|
def has_package(package):
|
||
|
try:
|
||
|
pkg_resources.get_distribution(package.decode('ascii'))
|
||
|
return True
|
||
|
except pkg_resources.DistributionNotFound:
|
||
|
return False
|