from confpy.api import BoolOption from confpy.api import Configuration from confpy.api import Namespace from confpy.api import StringOption from .. import interface cfg = Configuration(file_permissions=Namespace( description='Add default file permissions to files in buildroot.', user=StringOption( description='The owner user.', required=True, ), create_user=BoolOption( description='Create the user if it does not exist.', default=False, ), group=StringOption( description='The owner group.', required=True, ), create_group=BoolOption( description='Create the group if it does not exist.', default=False), ), ) class Extension(interface.Extension): """Extension which adds default file permissions.""" name = 'file_permissions' description = 'Set default file permissions to a user and group.'
python=StringOption( description='The python executable to use in the venv.', required=False, ), requirements=ListOption( description='Names of requirements files to install in the venv.', option=StringOption(), default=('requirements.txt', )), pip_flags=ListOption( description='Flags to pass to pip during pip install calls.', option=StringOption(), default=(), ), strip_binaries=BoolOption( description='Whether to strip native modules of debug information ' 'that often contains the buildroot paths', required=False, default=True, )), ) class Extension(interface.Extension): """Extension for packaging a Python virtualenv.""" name = 'python_venv' description = 'Packaging extension for generating virtualenv.' version = '1.0.0' requirements = {} @staticmethod def generate(config, spec): """Generate Python virtualenv content."""
), name=StringOption( description='The name of the installed venv.', required=True, ), path=StringOption( description='The path in which to install the venv.', default='/usr/share/python', ), python=StringOption( description='The python executable to use in the venv.', required=False, ), require_setup_py=BoolOption( description='Whether to build the rpm with the use of setup.py. ' 'When false can be used to repackage a wheel', required=False, default=True, ), requirements=ListOption( description='Names of requirements files to install in the venv.', option=StringOption(), default=('requirements.txt',) ), pip_flags=ListOption( description='Flags to pass to pip during pip install calls.', option=StringOption(), default=(), ), strip_binaries=BoolOption( description='Whether to strip native modules of debug information ' 'that often contains the buildroot paths',
), name=StringOption( description='The name of the installed venv.', required=True, ), path=StringOption( description='The path in which to install the venv.', default='/usr/share/python', ), python=StringOption( description='The python executable to use in the venv.', required=False, ), require_setup_py=BoolOption( description='Whether to build the rpm with the use of setup.py. ' 'When false can be used to repackage a wheel', required=False, default=True, ), requirements=ListOption( description='Names of requirements files to install in the venv.', option=StringOption(), default=('requirements.txt', )), pip_flags=ListOption( description='Flags to pass to pip during pip install calls.', option=StringOption(), default=(), ), strip_binaries=BoolOption( description='Whether to strip native modules of debug information ' 'that often contains the buildroot paths', required=False,