1 from setuptools
import setup
, find_packages
, Extension
2 from setuptools
import setup
, find_packages
, Extension
4 #from distutils.core import setup, Extension
10 python_version
= platform
.python_version()[0:3]
12 # The libtorrent extension
13 _extra_compile_args
= [
14 "-Wno-missing-braces",
15 "-DHAVE_INCLUDE_LIBTORRENT_ASIO____ASIO_HPP",
16 "-DHAVE_INCLUDE_LIBTORRENT_ASIO_SSL_STREAM_HPP",
17 "-DHAVE_INCLUDE_LIBTORRENT_ASIO_IP_TCP_HPP",
18 "-DTORRENT_LINKING_SHARED",
19 "-DTORRENT_BUILDING_SHARED",
22 "-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION",
23 "-DBOOST_THREAD_USE_LIB",
24 "-D_FILE_OFFSET_BITS=64",
26 "-DTORRENT_USE_OPENSSL",
28 "-DTORRENT_DISABLE_GEO_IP",
33 './libtorrent/include',
34 './libtorrent/include/libtorrent',
35 '/usr/include/python' + python_version
,
40 'boost_filesystem-mt',
52 _sources
= glob
.glob("./libtorrent/src/*.cpp") + \
53 glob
.glob("./libtorrent/src/kademlia/*.cpp") + \
54 glob
.glob("./libtorrent/bindings/python/src/*.cpp")
56 for source
in _sources
:
57 if "file_win.cpp" in source
:
58 _sources
.remove(source
)
61 libtorrent
= Extension(
63 include_dirs
= _include_dirs
,
64 library_dirs
= ["/opt/local/lib/"],
65 libraries
= _libraries
,
66 extra_compile_args
= _extra_compile_args
,
73 sources
= glob
.glob("./pytx/*.c"),
74 libraries
= ['ncurses', 'panel'],
75 extra_compile_args
= ['-g']
80 fullname
= "Tore: client/daemon bittorrent software shipped with a NCurses client",
82 author
= "Josh Davis",
83 author_email
= "sivad77@gmail.com",
84 include_package_data
= True,
85 description
= "Curses bittorrent client/daemon",
86 ext_modules
= [pytx
, libtorrent
],