Example #1
0
 def virtualenv(self):
     """
     :return: the current virtual environment
     :rtype: str
     """
     # noinspection PyArgumentEqualDefault
     return env_value('VIRTUAL_ENV', None)
Example #2
0
    def env_without_virtualenvwrapper(self):
        """
        Strip out the virtualenvwrapper stuff from the os environment for use when building the wheels in each
        of the virtual environments.

        :returns: a modified copy of env
        :rtype: dict
        """
        hook_dir = env_value('VIRTUALENVWRAPPER_HOOK_DIR', None)
        new_parts = []
        for part in os.environ['PATH'].split(':'):
            if hook_dir is not None and hook_dir in part:
                continue
            new_parts.append(str(part))
        new_path = ':'.join(new_parts)
        new_env = os.environ.copy()
        if 'VIRTUAL_ENV' in new_env:
            del new_env['VIRTUAL_ENV']
        new_env['PATH'] = new_path
        return new_env
Example #3
0
 'api_dir': {
     'default': 'docs/api',
     'help': 'The directory where the API docs are placed relative to the herringfile_dir.  '
             'Defaults to "{herringfile_dir}/docs/api".'},
 'author': {
     'required': True,
     'help': "The primary author's real name."},
 'author_email': {
     'required': True,
     'help': "The primary author's email address."},
 'bin_dir': {
     'default': '~/bin',
     'help': 'The path to the user\'s bin directory.  '
             'Defaults to "~/bin".'},
 'bugzilla_url': {
     'default': env_value('BUGZILLA_URL', default_value='http://localhost'),
     'help': 'A URL to bugzilla.'
             'Defaults to the value of the BUGZILLA_URL environment variable or "http://localhost".'},
 'build_dir': {
     'default': 'build',
     'help': 'The directory to build into relative to the herringfile_dir.  '
             'Defaults to "{herringfile_dir}/build".'},
 'changelog_file': {
     'default': "docs/CHANGES.rst",
     'help': 'The change log filespec.  '
             'Defaults to "{herringfile_dir}/docs/CHANGES.rst".'},
 'class_name_prefix': {
     'help': 'The prefix to use for class names.  Defaults to the project name.'},
 'description': {
     'required': True,
     'help': 'A short description of this project.'},
Example #4
0
 def in_virtualenv(self):
     """Are we in a virtual environment?"""
     # noinspection PyArgumentEqualDefault
     return env_value('VIRTUAL_ENV', None) is not None