-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Optionally skip creation of .gitignore in virtualenv directory #2004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
43d27d7
8025d4e
1a28968
6e13306
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Optionally skip generation of ``.gitignore`` with * directive in virtualenv | ||
| directory, using command line option :option:`no-gitignore`. | ||
| Default behavior is to generate the file as before. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ def __init__(self, options, interpreter): | |
| self._debug = None | ||
| self.dest = Path(options.dest) | ||
| self.clear = options.clear | ||
| self.gitignore = options.gitignore | ||
| self.pyenv_cfg = PyEnvCfg.from_folder(self.dest) | ||
| self.app_data = options.app_data | ||
|
|
||
|
|
@@ -57,6 +58,7 @@ def _args(self): | |
| return [ | ||
| ("dest", ensure_text(str(self.dest))), | ||
| ("clear", self.clear), | ||
| ("gitignore", self.gitignore), | ||
| ] | ||
|
|
||
| @classmethod | ||
|
|
@@ -90,6 +92,13 @@ def add_parser_arguments(cls, parser, interpreter, meta, app_data): | |
| help="remove the destination directory if exist before starting (will overwrite files otherwise)", | ||
| default=False, | ||
| ) | ||
| parser.add_argument( | ||
| "--no-gitignore", | ||
| dest="gitignore", | ||
| action="store_false", | ||
| help="skip creation of coverall .gitignore in destination directory", | ||
| default=True, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this break convention and more importantly the CLI option-environment variable interop, by renaming the argument? I wasn't aware of the config-file/env-var pathway to set these, and now it's not clear to me if those will expect a value at
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So if you put: in your users
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perfect |
||
| ) | ||
|
|
||
| @abstractmethod | ||
| def create(self): | ||
|
|
@@ -160,7 +169,8 @@ def run(self): | |
| safe_delete(self.dest) | ||
| self.create() | ||
| self.set_pyenv_cfg() | ||
| self.setup_ignore_vcs() | ||
|
compwiztobe marked this conversation as resolved.
|
||
| if self.gitignore: | ||
| self.setup_ignore_vcs() | ||
|
|
||
| def set_pyenv_cfg(self): | ||
| self.pyenv_cfg.content = OrderedDict() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.