1 from setuptools
import setup
, find_packages
, Extension
2 from setuptools
import setup
, find_packages
, Extension
7 python_version
= platform
.python_version()[0:3]
9 # The libtorrent extension
10 _extra_compile_args
= [
11 "-Wno-missing-braces",
12 "-DHAVE_INCLUDE_LIBTORRENT_ASIO____ASIO_HPP",
13 "-DHAVE_INCLUDE_LIBTORRENT_ASIO_SSL_STREAM_HPP",
14 "-DHAVE_INCLUDE_LIBTORRENT_ASIO_IP_TCP_HPP",
15 "-DTORRENT_LINKING_SHARED",
16 "-DTORRENT_BUILDING_SHARED",
19 "-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION",
20 "-DBOOST_THREAD_USE_LIB",
21 "-D_FILE_OFFSET_BITS=64",
23 "-DTORRENT_USE_OPENSSL",
25 "-DTORRENT_DISABLE_GEO_IP",
30 './libtorrent/include',
31 './libtorrent/include/libtorrent',
32 '/usr/include/python' + python_version
,
37 'boost_filesystem-mt',
49 _sources
= glob
.glob("./libtorrent/src/*.cpp") + \
50 glob
.glob("./libtorrent/src/kademlia/*.cpp") + \
51 glob
.glob("./libtorrent/bindings/python/src/*.cpp")
53 for source
in _sources
:
54 if "file_win.cpp" in source
:
55 _sources
.remove(source
)
58 libtorrent
= Extension(
60 include_dirs
= _include_dirs
,
61 library_dirs
= ["/opt/local/lib/"],
62 libraries
= _libraries
,
63 extra_compile_args
= _extra_compile_args
,
70 sources
= glob
.glob("./pytx/*.c"),
71 libraries
= ['ncurses', 'panel'],
76 fullname
= "Tore: client/daemon bittorrent software shipped with a NCurses client",
78 author
= "Josh Davis",
79 author_email
= "sivad77@gmail.com",
80 include_package_data
= True,
81 description
= "Curses bittorrent client/daemon",
82 ext_modules
= [pytx
, libtorrent
],