Xavier de Gaye added the comment:

> $(cd /path/to/source && pwd)/configure
> Why do you use $(pwd) here?

'configure' fails with the following error message when used with 
'--prefix=../install':
    configure: error: expected an absolute directory name for --prefix: 
../install
So for consistency, the example used absolute paths everywhere.

> --prefix=$(cd ../install && pwd)
> Won’t that embed the path of the install directory in e.g. sys.prefix or 
> something? Can’t you use “DESTDIR=../install” instead?

You are right.
On an Android device where /usr and /bin do not exist, the platform independent 
Python files are installed on the sdcard.  So the build system I am using for 
Android does the following:
* uses '--prefix=/sdcard/org.bitbucket.pyona
* before running 'make install', it creates temporarily the /sdcard directory 
on the build system (with sudo) and use 'sudo mount --bind $INSTALL_ROOT 
/sdcard' so that 'make install' actually copies the files to $INSTALL_ROOT and 
so that the modules are byte compiled modules with the proper '-d' option to 
compileall. This allows also for multiple cross-compilation using different 
$INSTALL_ROOT directory names for each Android API level or architecture (x86, 
arm, armv7, ...)
* creates a tar file from the files in $INSTALL_ROOT that is later copied and 
expanded on the device using the Android swiss army knife 'adb shell'.


> I remember there are a bunch of extra things you have to manually configure 
> to cross-compile. See e.g. revision 12a56a349af2 which asks for /dev/ptmx and 
> /dev/ptc settings in a CONFIG_SITE file (although I have had success just 
> adding them to the “configure” command line). Perhaps we could add something 
> like
> 
> '''
> configure --host=[. . .] \
>     ac_cv_file__dev_ptmx=no \
>     ac_cv_file__dev_ptc=no
> . . .
> 
> If the target Python could use /dev/ptmx or /dev/ptc to implement 
> os.openpty(), set the corresponding argument to "yes".

Ok

> I suspect some people cross compile 2.7, so it may be worth applying 
> something like this to that branch.

Not sure that all the recent cross-compilation changes have been applied to 
2.7. Would not documenting cross-compilation in 2.7 entail that we support it 
on 2.7 ?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28542>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to