Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue3871] cross and native build of python for mingw32 with packaging

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

May 30, 2012, 3:07 PM

Post #1 of 10 (123 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging

Changes by Ray Donnelly <mingw.android [at] gmail>:


Added file: http://bugs.python.org/file25761/python-py3k-20120318-MINGW-330a2.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 30, 2012, 4:04 PM

Post #2 of 10 (118 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Changes by Ray Donnelly <mingw.android [at] gmail>:


Added file: http://bugs.python.org/file25764/python-py3k-20120318-MINGW-330a2.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 30, 2012, 4:05 PM

Post #3 of 10 (118 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Changes by Ray Donnelly <mingw.android [at] gmail>:


Removed file: http://bugs.python.org/file25764/python-py3k-20120318-MINGW-330a2.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 30, 2012, 4:08 PM

Post #4 of 10 (120 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Ray Donnelly <mingw.android [at] gmail> added the comment:

Although mainly focussed on MinGW, I've begun adding Darwin cross support. I've also built Darwin cross compilers. The latest Linux version can be found at:

http://mingw-and-ndk.googlecode.com/files/multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120531.tar.xz

Here's a run-down of what's in the patch:

configure.ac:
Set MACHDEP=darwin when using darwin-cross compilers.
Set DELIM to ; for MACHDEP=win.
Switch from PC/getpathp.c to Modules/getpath.c for MinGW build.
This gives us a posix like layout as needed by autotools projects
such as GDB.
Add MSYSVPATH as an env. var to configure (used in getpath.c):
MSYS make uses a 'virtual' VPATH, but getpath.c uses
GetModuleFileNameW (replacing \ with /). This allows the user to
define the 'actual 'real' value. Note, it should contain / not \,
(i.e. use ecactly what is printed by "pwd -W")
Fixes to build with MinGW64 for REPARSE_DATA_BUFFER (needs defining)

Include/fileutils.h:
Define Py_wstat for MinGW/MinGW64.

Include/osdefs.h:
Define SEP to / and ALTSEP to \ for MinGW.

cygwinccompiler.py:
Fix RE_VERSION in for handling MinGW64 compiler versioning.
Ask gcc where ld is instead of requiring it to be passed in os.environ

plat-generic/regen:
Allow passing in the CC so sysroots can be determined from -print-search-dirs
If this CC passing is detected, use $CCINSTALL/include/stddef.h as netinet/in.h doesn't come with MinGW.

Moules/faulthandler.c:
Avoid _set_abort_behavior on MinGW64 as it's broken.

Modules/getpath.c:
Add support for MinGW.

Modules/socketmodule.c:
Change case (to lower) of #include <MSTcpIP.h> for MinGW/MinGW64 cross.

Parser/metagrammar.c:
Rename _PyParser_Grammar to _PyParser_MetaGrammar to avoid multiply defined symbols.

Python/pythonrun.c:
Translate ALTSEP (\) to SEP (/) in Py_SetProgramName

setup.py:
Add 'msi','cabinet','rpcrt4' as libs to link against for _msi module.
Fix an error with self.get_platform() no longer being defined (changed to host_platform)

Best regards,

Ray Donnelly.

----------
nosy: +Ray.Donnelly
Added file: http://bugs.python.org/file25765/python-py3k-20120318-MINGW-FIXES-USE-POSIX-GETPATH-330a2.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 30, 2012, 4:44 PM

Post #5 of 10 (110 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Éric Araujo <merwok [at] netwok> added the comment:

Thanks for your work Ray, but as your patch adds a feature to distutils it cannot be accepted.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 30, 2012, 4:54 PM

Post #6 of 10 (112 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Ray Donnelly <mingw.android [at] gmail> added the comment:

Hi Éric,

Do you mean this bit?:

diff -urN a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
--- a/Lib/distutils/cygwinccompiler.py 2012-05-30 07:33:00.234438631 +0100
+++ b/Lib/distutils/cygwinccompiler.py 2012-05-30 07:33:03.320855811 +0100
@@ -392,7 +392,7 @@
return (CONFIG_H_UNCERTAIN,
"couldn't read '%s': %s" % (fn, exc.strerror))

-RE_VERSION = re.compile(b'(\d+\.\d+(\.\d+)*)')
+RE_VERSION = re.compile(b'[\D\s]*(\d+\.\d+(\.\d+)*)[\D\s]*$')

It's hardly touching distutils and only the cygwinccompiler.py part (which I doubt is used very much anyway). It there not some extensive testsuite we can run patches against that would allow distutils changes?

I guess the very limited amount of changes I've made to distutils is academic though as it depends on two patches from Roumen Petrov which touch distutils a lot more.

I thought that the distutils-is-frozen rule was only for Python 2.x and that they would be allowed for 3.x? Is this not true?

Obviously making Python cross compile properly is a very desired feature (in this day and age I'd say cross-compilation for any major software is expected to be honest with you). How can we progress this task in a way that is acceptable? Please advise.

Best regards,

Ray.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 6, 2012, 3:04 PM

Post #7 of 10 (111 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Roumen Petrov <bugtrack [at] roumenpetrov> added the comment:

Also include mingw-w64 fixes - check for structure REPARSE_DATA_BUFFER, use lower case names of some headers . set_abort_behavior. I prefer to exclude use of parse_off_t so that functionality to be to same. Use of relict alarm function is not excluded as one of the test will fail as test require SIGALARM support.

----------
Added file: http://bugs.python.org/file25851/python-py3k-20120607-MINGW.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 6, 2012, 3:08 PM

Post #8 of 10 (108 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Roumen Petrov <bugtrack [at] roumenpetrov> added the comment:

Correction: Use of relict alarm function is not excluded even failure in one of tests - the test is run if exist alarm function but require in addition SIGALARM attribute.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 6, 2012, 3:24 PM

Post #9 of 10 (108 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Roumen Petrov <bugtrack [at] roumenpetrov> added the comment:

Ray , about python cygwin/mingw compiler classes exists other requests - use cygwin class instead unix compiler, remove relict checks : nocygwin and etc. but without progress.

About merge of getpath sources - issue is 9654.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 7, 2012, 12:54 AM

Post #10 of 10 (104 views)
Permalink
[issue3871] cross and native build of python for mingw32 with packaging [In reply to]

Ray Donnelly <mingw.android [at] gmail> added the comment:

Thanks for the details. I've got more fixes but I want to get the whole thing building (at least) before I post them.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue3871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.