Closed Bug 1427468 Opened 6 years ago Closed 6 years ago

Allow to run mach python without a virtualenv

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

      No description provided.
Note that I'm actually tempted to make this the default, kill the virtualenv completely, and make the build system use mach python instead of python. But I'm calling scope bloat and risky because of the additional process spawning that would entail.
Comment on attachment 8939188 [details]
Bug 1427468 - Allow to run mach python without a virtualenv.

https://reviewboard.mozilla.org/r/209578/#review215442

I implemented |mach python|, so I will take the review.  I'm fine with this approach.

::: python/mach_commands.py:46
(Diff revision 1)
>      @CommandArgument('args', nargs=argparse.REMAINDER)
> -    def python(self, args):
> +    def python(self, no_virtualenv, args):
>          # Avoid logging the command
>          self.log_manager.terminal_handler.setLevel(logging.CRITICAL)
>  
> +        # Note: subprocess requires native strings in os.environ on Windows

nit: full sentence when not a continuation comment.
Attachment #8939188 - Flags: review+
Attachment #8939188 - Flags: review?(core-build-config-reviews)
(In reply to Mike Hommey [back on Jan 9] [:glandium] from comment #2)
> Note that I'm actually tempted to make this the default, kill the virtualenv
> completely, and make the build system use mach python instead of python. But
> I'm calling scope bloat and risky because of the additional process spawning
> that would entail.

I don't understand how you can kill the virtualenv completely, since we need it to pin upstream library versions.  My guess is that this would make commands like |mach artifact|, which install packages on demand using the virtualenv, more difficult to develop.
Attachment #8939188 - Flags: review?(core-build-config-reviews)
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/aa60e61cdc95
Allow to run mach python without a virtualenv. r=nalexander
https://hg.mozilla.org/mozilla-central/rev/aa60e61cdc95
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: