[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lilypond Python on Windows
From: |
Jan Nieuwenhuizen |
Subject: |
Re: Lilypond Python on Windows |
Date: |
Thu, 17 Nov 2005 09:49:04 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Sven Axelsson writes:
> found. Testing with
> import cPickle, datetime, math, md5, struct;
> all fails with ImportError: No module named XXXX.
>
> The midi module, which is in usr/bin works, however.
>
> And this is because - all the modules are present in usr/bin as well,
> but named XXX.so.exe. Renaming them to XXX.dll gets them working
> again.
Thanks! I'm afraid that Han-Wen, who just produced the first
succesful windows installer, forgot to apply the patch below (part of
my python cross build and mingw patch) to his python installation
in /usr/lib/python2.4). Probably because I forgot to mention it.
> Ideally, Lilypond wouldn't change the file associations at all
[snip]
> Then we could have .bat files that does the same under Windows.
Until now, no-one has managed to produce .BAT files for us that work
on all versions of windows. I have put considerable effort in that,
but had to conclude that it is impossible. See the list archives.
Jan.
=== modified file 'Lib/distutils/command/build_ext.py'
--- Lib/distutils/command/build_ext.py
+++ Lib/distutils/command/build_ext.py
@@ -666,7 +666,7 @@
# don't extend ext.libraries, it may be shared with other
# extensions, it is a reference to the original list
return ext.libraries + [pythonlib]
- elif sys.platform[:6] == "cygwin":
+ elif sys.platform[:6] == "cygwin" or sys.platform[:5] == "mingw":
template = "python%d.%d"
pythonlib = (template %
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
=== modified file 'Lib/distutils/command/build_ext.py'
--- Lib/distutils/command/build_ext.py
+++ Lib/distutils/command/build_ext.py
@@ -612,6 +612,8 @@
ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8]
# extensions in debug_mode are named 'module_d.pyd' under windows
so_ext = get_config_var('SO')
+ if os.environ.get('CROSS_COMPILING') == 'yes':
+ so_ext = os.environ.get('SO')
if os.name == 'nt' and self.debug:
return apply(os.path.join, ext_path) + '_d' + so_ext
return apply(os.path.join, ext_path) + so_ext
=== modified file 'Include/pyport.h'
--- Include/pyport.h
+++ Include/pyport.h
@@ -478,31 +478,31 @@
BeOS and cygwin are the only other autoconf platform requiring special
linkage handling and both of these use __declspec().
*/
-#if defined(__CYGWIN__) || defined(__BEOS__)
+#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BEOS__)
# define HAVE_DECLSPEC_DLL
#endif
/* only get special linkage if built as shared or platform is Cygwin */
-#if defined(Py_ENABLE_SHARED) || defined(__CYGWIN__)
+#if defined(Py_ENABLE_SHARED) || defined(__CYGWIN__) || defined(__MINGW32__)
# if defined(HAVE_DECLSPEC_DLL)
# ifdef Py_BUILD_CORE
# define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE
# define PyAPI_DATA(RTYPE) extern __declspec(dllexport)
RTYPE
/* module init functions inside the core need no
external linkage */
/* except for Cygwin to handle embedding (FIXME: BeOS
too?) */
-# if defined(__CYGWIN__)
+# if defined(__CYGWIN__) || defined(__MINGW32__)
# define PyMODINIT_FUNC __declspec(dllexport) void
-# else /* __CYGWIN__ */
+# else /* __CYGWIN__ || __MINGW32__ */
# define PyMODINIT_FUNC void
-# endif /* __CYGWIN__ */
+# endif /* __CYGWIN__ || __MINGW32__ */
# else /* Py_BUILD_CORE */
/* Building an extension module, or an embedded
situation */
/* public Python functions and data are imported */
/* Under Cygwin, auto-import functions to prevent
compilation */
/* failures similar to
http://python.org/doc/FAQ.html#3.24 */
-# if !defined(__CYGWIN__)
+# if !defined(__CYGWIN__) && !defined(__MINGW32__)
# define PyAPI_FUNC(RTYPE) __declspec(dllimport)
RTYPE
-# endif /* !__CYGWIN__ */
+# endif /* !__CYGWIN__ && ! __MINGW32__ */
# define PyAPI_DATA(RTYPE) extern __declspec(dllimport)
RTYPE
/* module init functions outside the core must be
exported */
# if defined(__cplusplus)
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
- Lilypond Python on Windows, Sven Axelsson, 2005/11/16
- Re: Lilypond Python on Windows, Jan Nieuwenhuizen, 2005/11/17
- Re: Lilypond Python on Windows, Sven Axelsson, 2005/11/17
- Re: Lilypond Python on Windows,
Jan Nieuwenhuizen <=
- Re: Lilypond Python on Windows, Sven Axelsson, 2005/11/17
- Re: Lilypond Python on Windows, Han-Wen Nienhuys, 2005/11/17
- Re: Lilypond Python on Windows, Sven Axelsson, 2005/11/17
- Re: Lilypond Python on Windows, Han-Wen Nienhuys, 2005/11/17
- Re: Lilypond Python on Windows, Jan Nieuwenhuizen, 2005/11/17
- Re: Lilypond Python on Windows, Sven Axelsson, 2005/11/17
- Re: Lilypond Python on Windows, Jan Nieuwenhuizen, 2005/11/17