[issue39633] venv does not include python. symlink by default

2020-02-16 Thread Eryk Sun


Eryk Sun  added the comment:

> That means that libraries should assume they are being installed into
> venvs. Therefore makefiles should be invoking plain "python" rather
> than "pythonX.Y"

In Unix, 3.x virtual environments include a "python3" symlink or copy, even if 
created with a "python" command. A makefile that needs Python 3 can rely on 
running "python3" -- but only in Unix. Though someone using Unix tools in 
Windows (not Cygwin or MSYS2) must already be prepared for this.

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-16 Thread Vinay Sajip


Change by Vinay Sajip :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-15 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

That's right. I'll do that then. Thanks for baring with me.

Should we update the docs to mentiom this or just close this issue?

On Sat, Feb 15, 2020, 22:33 Vinay Sajip  wrote:

>
> Vinay Sajip  added the comment:
>
> In general, people should be working in venvs. That means that libraries
> should assume they are being installed into venvs. Therefore makefiles
> should be invoking plain "python" rather than "pythonX.Y", as they can
> never be sure which exact interpreter they're running under (you might have
> a newer one than the one in the Makefile - that shouldn't fail). Why not
> raise this as an issue with these projects?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-15 Thread Vinay Sajip


Vinay Sajip  added the comment:

In general, people should be working in venvs. That means that libraries should 
assume they are being installed into venvs. Therefore makefiles should be 
invoking plain "python" rather than "pythonX.Y", as they can never be sure 
which exact interpreter they're running under (you might have a newer one than 
the one in the Makefile - that shouldn't fail). Why not raise this as an issue 
with these projects?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-15 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

You're right! That could be very confusing. But isn't this risk already there, 
since this could happen if one runs `python3.8 -m venv venv` and then 
`python3.7` with the venv activated?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-15 Thread Vinay Sajip


Vinay Sajip  added the comment:

Except that if there's a global other pythonX.Y of the different version, that 
would get run ... potentially even more confusing.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-14 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

The thing is that some projects I've worked on, like pegen, include a Makefile 
which uses `pythonX.Y` to choose the version and I have to change it to 
`python` quite frequently. 

I can't really figure out any way this could harm anyone, other than what you 
said (running `pythonX.Y` with the wrong values for X and Y), but even in that 
case you get something like `command not fonund` and that's an easy enough typo 
to find.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-14 Thread Vinay Sajip


Vinay Sajip  added the comment:

When a venv is activated, only one Python interpreter is active - whichever one 
the venv was created with. Why would you want to invoke it with `pythonX.Y` 
when `python` would do? I don't think that this is something people generally 
do - this has never come up before AFAIK. What if you invoked it with the wrong 
values of X.Y?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-14 Thread Éric Araujo

Change by Éric Araujo :


--
nosy: +eric.araujo, vinay.sajip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39633] venv does not include python. symlink by default

2020-02-14 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

At the moment running python -m venv venv or python3 -m venv venv creates a 
virtual environment that does not contain a python. symlink, 
which results in executing whatever the default python is when running i.e. 
python. within an activated virtual env. OTOH if one runs 
python. -m venv venv, then everything is OK. Would it be possible 
to include a python. symlink in all cases? If not, then I think 
we should update the docs to mention that somewhere, since it took me quite a 
while to figure this out.

--
components: Library (Lib)
messages: 361993
nosy: lys.nikolaou
priority: normal
severity: normal
status: open
title: venv does not include python. symlink by default
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com