Building problems

30 views
Skip to first unread message

Mariano Mara

unread,
Sep 30, 2010, 12:41:13 AM9/30/10
to tokyo-python
Hi there. First of all I hope I'm posting to the right place (my
problem does not seem to be a bug).
I'm more or less in the same situation as Pradeep in
http://code.google.com/p/tokyo-python/issues/detail?id=5 but so far I
cannot make it work.

I have successfully compiled cabinet and dystopia from source and
installed them in non standard dirs. I ran ldconfig and I modified
setup.py to add my non standard locations as Pradeep did in his
example but python-tokio complains it cannot find cabinet.
Here's a full example of my problem:

1- first excerpts from my setup.py
...
cabinet_ext = TokyoPythonExt(True, "tokyocabinet", "Tokyo Cabinet",
"1.4.45",
"tcversion", "http://fallabs.com/
tokyocabinet/",
"tokyo.cabinet", ["src/cabinet.c"],
library_dirs =\
["/home/mariano/Code/vimail/tokyocompiled/
tokyocabinet/lib"],
libraries=["tokyocabinet", "z", "bz2",
"pthread",
"m", "c"])

tyrant_ext = TokyoPythonExt(False, "tokyotyrant", "Tokyo Tyrant",
"1.1.40",
"ttversion", "http://fallabs.com/
tokyotyrant/",
"tokyo.tyrant", ["src/tyrant.c"],
libraries=["tokyotyrant", "tokyocabinet",
"z", "bz2",
"resolv", "nsl", "dl",
"pthread", "m", "c"])

dystopia_ext = TokyoPythonExt(False, "tokyodystopia", "Tokyo
Dystopia", "0.9.14",
"tdversion", "http://fallabs.com/
tokyodystopia/",
"tokyo.dystopia", ["src/dystopia.c"],
library_dirs =\
["/home/mariano/Code/vimail/tokyocompiled/
tokyodystopia/lib"],
libraries=["tokyodystopia",
"tokyocabinet", "z",
"bz2", "pthread", "m", "c"])

...
setup(
name="tokyo-python",
version="0.7.1",
url="http://packages.python.org/tokyo-python/",
download_url="http://pypi.python.org/pypi/tokyo-python/",
description="Tokyo libraries Python interface.",
long_description=open("README.txt", "r").read(),
author="Malek Hadj-Ali",
author_email="lekm...@gmail.com",
platforms=["POSIX"],
license="GNU General Public License (GPL)",
packages = ["tokyo"],
include_dirs =\
['/home/mariano/Code/vimail/tokyocompiled/tokyocabinet/include',
'/home/mariano/Code/vimail/tokyocompiled/tokyodystopia/include'],
cmdclass={"build_ext": build_ext},
ext_modules=[cabinet_ext.c_ext],
...
)

2- and then the full example of building python-tokyo

$ echo $LD_LIBRARY_PATH
/usr/lib:/home/mariano/Sandbox/instantclient_11_2:/home/mariano/Code/
vimail/tokyocompiled/tokyocabinet/lib:/home/mariano/Code/vimail/
tokyocompiled/tokyodystopia/lib
$ python setup.py build
running build
running build_py
copying tokyo/dbm.py -> build/lib.linux-i686-2.7/tokyo
copying tokyo/__init__.py -> build/lib.linux-i686-2.7/tokyo
running build_ext
Aborted: tokyo-python requires Tokyo Cabinet >= 1.4.45 to be
installed.
See http://fallabs.com/tokyocabinet/ for more information.

Of course I'm sure I'm making a silly mistake somewhere but I'm unable
to find out how to fix. Hope you can help me out.

TIA,
Mariano
Reply all
Reply to author
Forward
0 new messages