Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Use the identified python when building System.Private.CoreLib - #19043

Merged
jkotas merged 1 commit into
dotnet:masterfrom
omajid:use-identified-python
Aug 1, 2018
Merged

jkotas merged 1 commit into
dotnet:masterfrom
omajid:use-identified-python

Conversation

@omajid

@omajid omajid commented Jul 19, 2018

Copy link
Copy Markdown
Member

build.sh and build.cmd contain logic to identify a working version of python to use. System.Private.CoreLib ignores that and directly invokes 'python', which may not work, or even execute a different program.

build.sh and build.cmd contain logic to identify a working version of
python to use. System.Private.CoreLib ignores that and directly invokes
'python', which may not work, or even execute a different program.
@omajid
omajid force-pushed the use-identified-python branch from 7a8d1dd to 21e04d9 Compare July 19, 2018 21:57
@omajid

omajid commented Jul 22, 2018

Copy link
Copy Markdown
Member Author

For the motivation behind this change, see python/peps#630

Essentially, it is now going to be possible to only have the commands python2 and python3 and not python. For example, Fedora 29 is doing this. The python detection logic in build.sh currently handles this correctly, picking up python2, but this csproj file does not.

@omajid

omajid commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

Adding some folks who have touched these files in the past to cc. Can someone please take a look? Thanks.

@gkhanna79 @leemgs @jkotas @janvorli @maryamariyan

@jkotas
jkotas merged commit 5164e76 into dotnet:master Aug 1, 2018
@omajid

omajid commented Aug 1, 2018

Copy link
Copy Markdown
Member Author

Thanks for reviewing and merging!

omajid added a commit to omajid/dotnet-coreclr that referenced this pull request Aug 24, 2020
This is a combined fix from 3 different PRs and one additional fix for
2.1:

- dotnet#19043
- dotnet#19356
- dotnet#22145

The 2.1-specific fix is that python is is only used as a fallback, in
case all other python program names dont work.

As for the original PRs, they perform these changes:

build.sh and build.cmd contain logic to identify a working version of
python to use. System.Private.CoreLib ignores that and directly invokes
'python', which may not work, or even execute a different program. Fix
that.

The windows build scripts try finding python in order of python3,
python2 and then python. The unix build scripts dont. They just try
python2 variants and then fail. This change makes brings them closer
together by letting users build using only python3.

Use the same logic in CMakeLists.txt that's used in build.sh/build.cmd
to lookup python.
Anipik pushed a commit that referenced this pull request Sep 18, 2020
This is a combined fix from 3 different PRs and one additional fix for
2.1:

- #19043
- #19356
- #22145

The 2.1-specific fix is that python is is only used as a fallback, in
case all other python program names dont work.

As for the original PRs, they perform these changes:

build.sh and build.cmd contain logic to identify a working version of
python to use. System.Private.CoreLib ignores that and directly invokes
'python', which may not work, or even execute a different program. Fix
that.

The windows build scripts try finding python in order of python3,
python2 and then python. The unix build scripts dont. They just try
python2 variants and then fail. This change makes brings them closer
together by letting users build using only python3.

Use the same logic in CMakeLists.txt that's used in build.sh/build.cmd
to lookup python.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants