[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The problem will go away when you install and use an arm64 or universal2 
variant of Python.

This is behaviour of macOS and cannot be changed in CPython.

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread junyixie


junyixie  added the comment:

> What's the architecture for the python binary (run "file $(which python3)" in 
> a shell to get this information, excluding the quotes)?
yeah, is x86_64 python executable
.../opt/anaconda3/bin/python3: Mach-O 64-bit executable x86_64

--

___
Python tracker 

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



[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread junyixie


junyixie  added the comment:

when run pyperformance compile in apple silicon also have this problem

--

___
Python tracker 

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



[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm assuming you run on a M1* system. 

What's the architecture for the python binary (run "file $(which python3)" in a 
shell to get this information, excluding the quotes)?

If the binary supports only x86_64 you might run into a "feature" of macOS: 
subprocesses started from a Rosetta 2 process also prefer to run in emulation.

This can also be demonstrated using the system install of perl, for example:

% perl -e 'print `arch`'
arm64

% arch -x86_64 perl -e 'print `arch`'
i386

There sadly doesn't appear to be documentation about this on Apple's site.

Note that the universal2 variants of the installers on python.org natively 
support both x86_64 and arm64.

--

___
Python tracker 

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



[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread junyixie


junyixie  added the comment:

subprocess.Popen([], executable=os.path.join(cpython_dir, "configure"), 
cwd=cpython_dir).wait()

--

___
Python tracker 

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



[issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong

2021-11-12 Thread junyixie


New submission from junyixie :

wrong:
checking build system type... x86_64-apple-darwin20.5.0
checking host system type... x86_64-apple-darwin20.5.0


expect:
checking build system type... arm-apple-darwin20.5.0
checking host system type... arm-apple-darwin20.5.0

--
components: macOS
messages: 406194
nosy: JunyiXie, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: execute shell command ./configure with python subprocess.popen, 
os.system ... checking build system type...  is wrong
type: behavior
versions: Python 3.11

___
Python tracker 

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