diff --git a/mayan/apps/common/dependencies.py b/mayan/apps/common/dependencies.py index 67f1f67245..d8f1c71ba1 100644 --- a/mayan/apps/common/dependencies.py +++ b/mayan/apps/common/dependencies.py @@ -3,7 +3,8 @@ from __future__ import absolute_import, unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.dependencies.classes import ( - environment_development, environment_testing, PythonDependency + environment_build, environment_development, environment_testing, + PythonDependency ) PythonDependency( @@ -444,3 +445,12 @@ PythonDependency( environment=environment_testing, module=__name__, name='psutil', version_string='==5.6.1' ) + +PythonDependency( + environment=environment_build, module=__name__, name='twine', + version_string='==1.9.1' +) +PythonDependency( + environment=environment_build, module=__name__, name='wheel', + version_string='==0.30.0' +) diff --git a/mayan/apps/dependencies/classes.py b/mayan/apps/dependencies/classes.py index 82de9032e3..a8874f19a7 100644 --- a/mayan/apps/dependencies/classes.py +++ b/mayan/apps/dependencies/classes.py @@ -55,11 +55,12 @@ class DependencyEnvironment(object): return force_text(self.label) -environment_production = DependencyEnvironment( +environment_build = DependencyEnvironment( help_text=_( - 'Normal environment for end users. A missing depedencies under this ' - 'environment will result issues and error during normal use.' - ), label=_('Production'), name='production' + 'Environment used for building distributable packages of the ' + 'software. End users can ignore missing depedencies under this ' + 'environment.' + ), label=_('Build'), name='build' ) environment_development = DependencyEnvironment( help_text=_( @@ -67,6 +68,12 @@ environment_development = DependencyEnvironment( 'can ignore missing depedencies under this environment.' ), label=_('Development'), name='development' ) +environment_production = DependencyEnvironment( + help_text=_( + 'Normal environment for end users. A missing depedencies under this ' + 'environment will result issues and error during normal use.' + ), label=_('Production'), name='production' +) environment_testing = DependencyEnvironment( help_text=_( 'Environment used running the test suit to verify the functionality ' @@ -191,10 +198,10 @@ class Dependency(object): return Dependency.return_sorted(dependencies=dependencies) @classmethod - def get_for_attribute(cls, attribute_name, attribute_value): + def get_for_attribute(cls, attribute_name, attribute_value, **kwargs): result = [] - for dependency in cls.get_all(): + for dependency in cls.get_all(**kwargs): if resolve_attribute(attribute=attribute_name, obj=dependency) == attribute_value: result.append(dependency)