[Python.NET] Several patches to improve compilation with Mono

Philip Lorenz lorenzph at googlemail.com
Wed May 4 13:04:24 CEST 2011


Hi,

after trying to compile Python for .NET on ArchLinux x86_64 I have run
into several issues which the attached patches fix:

1. Enable Mono config file loading. Otherwise a Python build with UCS4
Unicode strings does not work as the Mono.Posix module cannot find
msvcrt (which is mapped to libc in Mono's config files).
2. Python.Runtime.dll.config is missing mappings for Python 2.7
3. The architecture detection code in the Makefile did not work
correctly (checking for the 86 substring is true for both x86 as well as
x86_64 targets).
4. I have renamed the clrmodule.il target in the Makefile to
clrmodule_make.il. Otherwise a fresh SVN checkout would not build as
clrmodule.il is already included.
5. Adapt the clrmod Makefile to support Mono 2.8 pkgconfig change.
Additionally, retrieve Glib 2 options from its pkgconfig and compile
the x86_64 build with -fPIC.
6. Support the standard DESTDIR parameter for the install target.
Additionally, install Python.Runtime.dll and Python.Runtime.dll.config
to the site-packages folder so it is found by the clr module.

If you have any comments or if there are any issues with these patches
please let me know.

Philip
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Enable-Mono-config-loading.-This-fixes-an-issue-when.patch
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20110504/0eada531/attachment-0006.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-Add-mappings-for-Python-2.7-to-Mono-config.patch
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20110504/0eada531/attachment-0007.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0003-Fix-architecture-detection.-The-old-code-did-not-det.patch
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20110504/0eada531/attachment-0008.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0004-Rename-clrmodule.il-in-the-Makefile-build-to-clrmodu.patch
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20110504/0eada531/attachment-0009.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0005-Pass-ARCH-to-monoclr-Makefile-and-change-monoclr-Mak.patch
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20110504/0eada531/attachment-0010.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0006-Support-DESTDIR-parameter-when-installing-and-instal.patch
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20110504/0eada531/attachment-0011.ksh>


More information about the PythonDotNet mailing list