免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2758 | 回复: 0
打印 上一主题 下一主题

求助,请问有没有给python安装使用过"ming"的朋友? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-19 20:50 |只看该作者 |倒序浏览
以下所有的安装方法我都试过了,都不能正确给python安装上,我用的是mingw.
请问有没有朋友成功的安装过的,请教一下正确的安装方法,谢谢。
(Ming is a highly useful open-source Flash SWF )

这是ming的官方网站 http://ming.sourceforge.net/
有0.3,和0.4两个版本,我都试过了,都没成功
=================
1) Download and unzip the ming [2] sources
2) cd into src/ and do a "make static"
3) copy the following distutils setup.py file into py_ext/


#----------------8<----------------------------------------------------
from distutils.core import setup
from distutils.extension import Extension


setup ( name = "ming",
        version = "0.2a",
        description = "A library for creating Shockwave files.",
        py_modules = ["ming"],
        ext_modules = [Extension( name='mingc',
                                  sources=['ming_wrap.c'],
                                  include_dirs=[".."],
                                  library_dirs=["../src"],
                                  libraries=["ming"]
                                  )]
        )
#----------------8<----------------------------------------------------


4) cd into py_ext/ and issue "python setup.py build --compiler=mingw32"


5) if you want to create an installer, issue "python setup.py bdist_wininst"


Now you have a Windows installer for the Python ming wrapper under dist. The
whole thing took me about five minutes, but I confess this isn't the first
setup.py I hacked.
===================
第二种安装方法
1. Download & install Python 2.4 for Windows in e.g. c:/python
2. Download & install Cygwin in e.g. c:/cygwin. This provides you with a shell and other tools. When it comes to picking the modules and applications to use, add in autoconf, bison and flex. Do not install gcc or make - these are taken care of in the next step.
3. Download & install MinGW in e.g. c:/mingw. MinGW is not Ming - MinGW is an entirely different application takes care of the compilation.
4. Download the MinGW-zlib library. Copy the two .h files in usr/include/mingw to c:/mingw/include
5. Copy the file libpython24.a from c:/python/libs to c:/mingw/lib.
6. Download & install the Ming source code, in e.g. c:/ming
7. Download the source code for zlib. Copy the files zlib.h and zconf.h into c:/ming/src
8. Fire up Cygwin and go into the ming directory (e.g. cd /cygdrive/c/ming)
9. Type the following commands:

  $ autoconfig
  $ ./configure
  $ cd src
  $ mingw32-make static
  $ cd ..
  $ ls libming.a
10. A file called libming.a should now exist. Type cd py_ext and press ENTER.
11. In this folder, there should be a file setup.py. Open it, delete the existing code and replace it with:

from distutils.core import setup, Extension

setup(name = "mingc",
      version = "0.4",
      description = "A library for creating Flash files",
      py_modules = ['ming', 'mingc'],
      ext_modules = [Extension(name="_mingc",
                               sources=["ming_wrap.c"],
                               include_dirs=['/usr/local/include', '../src'],
                               library_dirs=['/usr/local/lib', '..'],
                               libraries=['ming'])])
12. Run the following command:

$ ../../python/python setup.py build --compiler=mingw32

按官方的安装方法也不可以啊。。。。。。。。麻烦熟悉编译的朋友给看一下。很想试一下这个能在python使用的ming module.

这是和它相关的几个站
http://www.opaque.net/wiki/index.php?Ming%20%26%20Python
http://www16.brinkster.com/gazb/ming/index.html


[ 本帖最后由 Blue.tooth 于 2006-11-19 21:11 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP