Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104373

Re: Question

From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Subject Re: Question
Date 2016-03-08 18:27 -0700
Message-ID <mailman.63.1457486912.15725.python-list@python.org> (permalink)
References (5 earlier) <mailman.44.1457378999.10335.python-list@python.org> <slrnndsbjk.19u.jon+usenet@wintry.unequivocal.co.uk> <mailman.52.1457457599.15725.python-list@python.org> <56df65a1$0$1596$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmqzod5kZ+p34=gh8fkTpP8tho_bZwLnsqyaHw78E-22Pw@mail.gmail.com>

Show all headers | View raw


On Tue, Mar 8, 2016 at 5:13 PM, Chris Angelico <rosuav@gmail.com> wrote:
> On Wed, Mar 9, 2016 at 10:52 AM, Steven D'Aprano <steve@pearwood.info> wrote:
>>> Well, running bash on Windows is decidedly non-standard. This is like
>>> installing a Python package on a Linux system and then complaining
>>> that it won't run under wine. I don't think that Python should be
>>> expected to provide an activate script for all possible shells the
>>> user might conceivably want to use.
>>
>> Not "all possible shells", no. But it's not unreasonable for it to handle
>> the single most popular operating system environment in the world, Windows,
>> don't you think?
>
> I'm not sure that the issue is "Windows can't use venv", but "Windows
> with Git Bash can't use venv". Windows has a number of shells
> available; the default one is pretty terrible but does kinda work, and
> then there's PowerShell, and ports of other shells like bash. Cygwin
> provides its own shell (which I think is bash), and I'm not sure if
> that's the same as Git Bash installs. And then there's the difference
> between the shell (the command interpreter) and the, for want of a
> better name, terminal emulator (the thing that displays stuff on the
> screen).
>
> Working purely within cmd.exe and the default terminal emulator, I was
> able to "py -m venv env" and then "env\scripts\activate" (note, *not*
> env/bin/activate which is what I'm used to - no idea why). It seemed
> to work.
>
> Working instead in Git Bash, though, leaves me unable to activate,
> because there is no bash script for venv activation. Hence, the
> problem is "supporting all possible shells" (which is an enormous
> challenge), rather than "supporting one of the three most popular
> operating systems" (which, I agree, is well worth doing).

It looks like the shell environment that comes with Git for Windows is
actually Windows Powershell [1], so presumably the activate.ps1 script
that's already provided by venv is what's needed, not a bash script.

Git Bash is apparently separate and runs under MinGW, which in my
limited experience could charitably be described as "semi-functional".
Admittedly, it's been a long while since the last time I tried to use
it. Cygwin is much better, and it emulates a POSIX platform so closely
that I wouldn't be surprised if a Python running under Cygwin simply
installed the bash venv script to begin with.

[1] https://git-scm.com/book/en/v2/Git-in-Other-Environments-Git-in-Powershell

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-07 09:57 -0700
  Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-07 18:09 +0000
    Re: Question mm0fmf <none@invalid.com> - 2016-03-07 18:18 +0000
      Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-07 18:51 +0000
        Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-07 12:29 -0700
          Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 01:41 +0000
            Re: Question justin walters <walters.justin01@gmail.com> - 2016-03-07 17:59 -0800
              Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 10:24 +0000
                Re: Question justin walters <walters.justin01@gmail.com> - 2016-03-08 08:47 -0800
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 16:53 +0000
            Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-08 10:19 -0700
              Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 17:56 +0000
                Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-08 11:08 -0700
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 18:08 +0000
              Re: Question Steven D'Aprano <steve@pearwood.info> - 2016-03-09 10:52 +1100
                Re: Question Chris Angelico <rosuav@gmail.com> - 2016-03-09 11:13 +1100
                Re: Question Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-08 18:27 -0700
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-09 12:28 +0000
                Re: Question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-09 23:01 -0500
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-10 11:44 +0000
                Re: Question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-10 08:37 -0500
                Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-09 12:52 +0000
        Re: Question Chris Angelico <rosuav@gmail.com> - 2016-03-08 06:47 +1100
          Re: Question Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-03-08 01:33 +0000
        Re: Question Andrew Farrell <amfarrell@mit.edu> - 2016-03-07 14:00 -0600
        Re: Question justin walters <walters.justin01@gmail.com> - 2016-03-07 11:04 -0800
    Re: Question Chris Warrick <kwpolska@gmail.com> - 2016-03-07 19:22 +0100
    Re: Question Random832 <random832@fastmail.com> - 2016-03-07 13:26 -0500

csiph-web