mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Install python requirements during daily (#11486)
* install python requirements during daily * Only check python 3 * ignore failures
This commit is contained in:
18
scripts/check_requirements.py
Executable file
18
scripts/check_requirements.py
Executable file
@@ -0,0 +1,18 @@
|
||||
#! /usr/bin/env python3
|
||||
import os
|
||||
import pkg_resources
|
||||
from pkg_resources import DistributionNotFound, VersionConflict
|
||||
|
||||
target = os.path.realpath(os.path.dirname(__file__) + '/../requirements.txt')
|
||||
|
||||
with open(target, 'r') as file:
|
||||
requirements = file.read().rstrip().split("\n")
|
||||
try:
|
||||
pkg_resources.require(requirements)
|
||||
except DistributionNotFound:
|
||||
exit(1)
|
||||
except VersionConflict:
|
||||
exit(2)
|
||||
exit(0)
|
||||
|
||||
exit(3)
|
Reference in New Issue
Block a user