用setup.py构建东西 [英] Building things with setup.py

查看:66
本文介绍了用setup.py构建东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


这很烦人。我现在正在尝试构建scipy但是每个.so

文件需要我添加-lpython2.5 -lpthread -lm -lutil -ldl -shared

到ld标志。


主要问题:使用setup.py进行构建时,我在哪里可以包含此

信息,所以我没有用手链接每个.so文件?


另外,为什么这不会被scipy和numpy的开发者抓住?

需要什么因素指定库并手动正确链接

..so文件?当然,恩惠并没有忘记测试

构建过程,为什么我的机器在这方面会特别?


我正在运行Linux FC4采用双Intel p4(~3.2 GHz),在非标准位置提供各种

库。这个非标准的部分是什么'b
杀了我?


詹姆斯


-

James Stroud

加州大学洛杉矶分校基因组学和蛋白质组学研究所

专栏951570

洛杉矶,CA 90095
http://www.jamesstroud.com/

Hello All,

This is annoying. I am trying to build scipy right now but every .so
file requires my adding "-lpython2.5 -lpthread -lm -lutil -ldl -shared"
to the ld flags.

Main Question: When building with "setup.py", where can I include this
information so I don''t have to link every .so file by hand?

Also, why would this not be caught by the developers of scipy and numpy?
What factors go into needing to specify libraries and to properly link
..so files manually? Certainly the enthought didn''t forget to test the
build process, so why would my machine be special in this regard?

I''m running Linux FC4 on a dual intel p4 (~3.2 GHz) with sundry
libraries in non-standard places. Is this non-standard part what''s
killing me?

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/

推荐答案

James Stroud写道:
James Stroud wrote:

Hello All,


这很烦人。我现在正在尝试构建scipy但是每个.so

文件需要我添加-lpython2.5 -lpthread -lm -lutil -ldl -shared

到ld标志。


主要问题:使用setup.py进行构建时,我在哪里可以包含此

信息,所以我没有用手链接每个.so文件?


另外,为什么这不会被scipy和numpy的开发者抓住?

需要什么因素指定库并手动正确链接

.so文件?当然,恩惠并没有忘记测试

构建过程,为什么我的机器在这方面会特别?


我正在运行Linux FC4采用双Intel p4(~3.2 GHz),在非标准位置提供各种

库。这个非标准的部分是什么'b
杀了我?


James
Hello All,

This is annoying. I am trying to build scipy right now but every .so
file requires my adding "-lpython2.5 -lpthread -lm -lutil -ldl -shared"
to the ld flags.

Main Question: When building with "setup.py", where can I include this
information so I don''t have to link every .so file by hand?

Also, why would this not be caught by the developers of scipy and numpy?
What factors go into needing to specify libraries and to properly link
.so files manually? Certainly the enthought didn''t forget to test the
build process, so why would my machine be special in this regard?

I''m running Linux FC4 on a dual intel p4 (~3.2 GHz) with sundry
libraries in non-standard places. Is this non-standard part what''s
killing me?

James



好吧,我将这些参数添加到

Well I added those arguments to


LDFLAGS,但它看起来像是一个非常糟糕的黑客,特别是-shared。部分。


我仍​​然很好奇如何使第三方setup.py正常工作。


James


-

James Stroud

加州大学洛杉矶分校基因组学和蛋白质组学研究所

专栏951570

洛杉矶,CA 90095

http://www.jamesstroud .com /
LDFLAGS, but it seemed like a pretty
miserable hack, especially the "-shared" part.

I''m still curious how to make a 3rd party setup.py work correctly.

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/


James Stroud写道:
James Stroud wrote:

Hello All,


这很烦人。我现在正在尝试构建scipy但是每个.so

文件需要我添加-lpython2.5 -lpthread -lm -lutil -ldl -shared

到ld标志。


主要问题:使用setup.py进行构建时,我在哪里可以包含此

信息,所以我没有手动链接每个.so文件?
Hello All,

This is annoying. I am trying to build scipy right now but every .so
file requires my adding "-lpython2.5 -lpthread -lm -lutil -ldl -shared"
to the ld flags.

Main Question: When building with "setup.py", where can I include this
information so I don''t have to link every .so file by hand?



如果确实有必要,


python setup.py build_ext -lmylib

If it''s actually necessary,

python setup.py build_ext -lmylib


另外,为什么这不会被scipy和numpy的开发者捕获?
Also, why would this not be caught by the developers of scipy and numpy?



因为我们以前从未见过它。没有理由你需要手动添加这些库。你可以发布你的构建日志(失败者)

到scipy-dev吗?

http://www.scipy.org/Mailing_Lists


需要指定库的因素有哪些并手动正确链接

.so文件?当然,恩惠并没有忘记测试

构建过程,为什么我的机器在这方面会特别?


我正在运行Linux FC4采用双Intel p4(~3.2 GHz),在非标准位置提供各种

库。这个非标准的部分是什么?b $ b杀了我?
What factors go into needing to specify libraries and to properly link
.so files manually? Certainly the enthought didn''t forget to test the
build process, so why would my machine be special in this regard?

I''m running Linux FC4 on a dual intel p4 (~3.2 GHz) with sundry
libraries in non-standard places. Is this non-standard part what''s
killing me?



可能。在看到构建日志之前不会知道更多。


-

Robert Kern


" ;我已经开始相信整个世界都是一个谜,一个无害的谜团,因为我们疯狂地试图解释它,好像它有一个很糟糕的谜团。潜在的事实。

- Umberto Eco

Possibly. Won''t know more until I see the build log.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco


这篇关于用setup.py构建东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆