Better deps management

This commit is contained in:
Thomas FORGIONE 2017-02-27 15:00:30 +01:00
parent 518a0a70fe
commit a30afa2dd6
No known key found for this signature in database
GPG Key ID: 2A210FFC062E00C3
1 changed files with 11 additions and 8 deletions

View File

@ -7,31 +7,34 @@ import os
import math
# Test dependencies
missing_dependencies = []
try:
import PIL
except:
print('You need to install PIL', file=sys.stderr)
sys.exit(-1)
missing_dependencies.append('pillow')
try:
import pygame as pg
import pygame.locals as pgl
except:
print('You need to install pygame', file=sys.stderr)
sys.exit(-1)
missing_dependencies.append('pygame')
try:
import OpenGL.GL as gl
import OpenGL.GLU as glu
except:
print('You need to install pyopengl', file=sys.stderr)
sys.exit(-1)
missing_dependencies.append('pyopengl')
try:
import numpy
except:
print('You need to install numpy', file=sys.stderr)
sys.exit(-1)
missing_dependencies.append('numpy')
if len(missing_dependencies) > 0:
print('You are missing the following dependencies :', file=sys.stderr)
for dep in missing_dependencies:
print(dep, file=sys.stderr)
from d3.model.tools import load_model
from d3.geometry import Vector