2007-01-08 17:23:21 +00:00
|
|
|
#!/usr/bin/env python
|
2006-12-01 23:03:00 +00:00
|
|
|
#
|
2007-01-08 04:18:24 +00:00
|
|
|
# Copyright (c) 2006 Zach Tibbitts ('zachtib') <zach@collegegeek.org>
|
2006-11-29 23:41:58 +00:00
|
|
|
#
|
2006-12-01 23:03:00 +00:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
# any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2007-01-08 19:38:19 +00:00
|
|
|
#
|
2006-12-01 23:03:00 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-01-08 19:38:19 +00:00
|
|
|
# along with this program. If not, write to:
|
|
|
|
# The Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor
|
|
|
|
# Boston, MA 02110-1301, USA.
|
2006-12-01 23:03:00 +00:00
|
|
|
|
2007-01-11 18:58:28 +00:00
|
|
|
|
|
|
|
## Modify the build arguments
|
|
|
|
from distutils import sysconfig
|
|
|
|
|
|
|
|
removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
|
|
|
|
additions = ['-DNDEBUG', '-O2']
|
|
|
|
|
|
|
|
cv = sysconfig.get_config_vars()
|
|
|
|
for removal in removals:
|
|
|
|
cv["OPT"] = cv["OPT"].replace(" " + removal + " ", " ")
|
|
|
|
for addition in additions:
|
|
|
|
cv["OPT"] = cv["OPT"] + " " + addition
|
|
|
|
|
2006-12-01 23:03:00 +00:00
|
|
|
import platform, os
|
|
|
|
|
|
|
|
pythonVersion = platform.python_version()[0:3]
|
2006-11-29 23:41:58 +00:00
|
|
|
|
|
|
|
from distutils.core import setup, Extension
|
|
|
|
|
2007-01-08 17:23:21 +00:00
|
|
|
deluge_core = Extension('deluge_core',
|
2007-02-08 20:33:23 +00:00
|
|
|
include_dirs = ['./libtorrent', './libtorrent/include', './libtorrent/include/libtorrent',
|
2007-01-07 22:50:26 +00:00
|
|
|
'/usr/include/python' + pythonVersion],
|
|
|
|
libraries = ['boost_filesystem', 'boost_date_time',
|
|
|
|
'boost_program_options', 'boost_regex',
|
|
|
|
'boost_serialization', 'boost_thread', 'z', 'pthread'],
|
|
|
|
extra_compile_args = ["-Wno-missing-braces"],
|
2007-02-08 18:42:01 +00:00
|
|
|
sources = ['src/deluge_core.cpp',
|
2007-02-08 20:33:23 +00:00
|
|
|
'libtorrent/src/alert.cpp',
|
|
|
|
'libtorrent/src/allocate_resources.cpp',
|
|
|
|
'libtorrent/src/bt_peer_connection.cpp',
|
|
|
|
'libtorrent/src/entry.cpp',
|
|
|
|
'libtorrent/src/escape_string.cpp',
|
|
|
|
'libtorrent/src/file.cpp',
|
|
|
|
'libtorrent/src/http_tracker_connection.cpp',
|
|
|
|
'libtorrent/src/identify_client.cpp',
|
|
|
|
'libtorrent/src/ip_filter.cpp',
|
|
|
|
'libtorrent/src/peer_connection.cpp',
|
|
|
|
'libtorrent/src/piece_picker.cpp',
|
|
|
|
'libtorrent/src/policy.cpp',
|
|
|
|
'libtorrent/src/session.cpp',
|
|
|
|
'libtorrent/src/session_impl.cpp',
|
|
|
|
'libtorrent/src/sha1.cpp',
|
|
|
|
'libtorrent/src/stat.cpp',
|
|
|
|
'libtorrent/src/storage.cpp',
|
|
|
|
'libtorrent/src/torrent.cpp',
|
|
|
|
'libtorrent/src/torrent_handle.cpp',
|
|
|
|
'libtorrent/src/torrent_info.cpp',
|
|
|
|
'libtorrent/src/tracker_manager.cpp',
|
|
|
|
'libtorrent/src/udp_tracker_connection.cpp',
|
|
|
|
'libtorrent/src/web_peer_connection.cpp',
|
|
|
|
'libtorrent/src/kademlia/closest_nodes.cpp',
|
|
|
|
'libtorrent/src/kademlia/dht_tracker.cpp',
|
|
|
|
'libtorrent/src/kademlia/find_data.cpp',
|
|
|
|
'libtorrent/src/kademlia/node.cpp',
|
|
|
|
'libtorrent/src/kademlia/node_id.cpp',
|
|
|
|
'libtorrent/src/kademlia/refresh.cpp',
|
|
|
|
'libtorrent/src/kademlia/routing_table.cpp',
|
|
|
|
'libtorrent/src/kademlia/rpc_manager.cpp',
|
|
|
|
'libtorrent/src/kademlia/traversal_algorithm.cpp'])
|
2007-01-07 22:50:26 +00:00
|
|
|
|
2006-12-01 23:03:00 +00:00
|
|
|
|
2007-02-06 22:53:26 +00:00
|
|
|
setup(name="deluge", fullname="Deluge BitTorrent Client", version="0.5.0",
|
2007-01-07 22:50:26 +00:00
|
|
|
author="Zach Tibbitts, Alon Zakai",
|
2007-01-08 19:38:19 +00:00
|
|
|
author_email="zach@collegegeek.org, kripkensteiner@gmail.com",
|
2006-11-29 23:41:58 +00:00
|
|
|
description="A bittorrent client written in PyGTK",
|
|
|
|
url="http://deluge-torrent.org",
|
|
|
|
license="GPLv2",
|
2007-01-07 22:50:26 +00:00
|
|
|
scripts=["scripts/deluge"],
|
2007-02-06 22:53:26 +00:00
|
|
|
packages=['deluge'],
|
|
|
|
package_dir = {'deluge': 'src'},
|
2007-02-08 00:31:18 +00:00
|
|
|
data_files=[("share/deluge/glade", ["glade/delugegtk.glade", "glade/dgtkpopups.glade", "glade/dgtkpref.glade"]),
|
2007-02-08 23:52:01 +00:00
|
|
|
("share/deluge/pixmaps", ["pixmaps/deluge32.png",
|
|
|
|
"pixmaps/deluge128.png", "pixmaps/deluge256.png"])],
|
2007-02-08 00:59:42 +00:00
|
|
|
ext_package='deluge',
|
2007-01-08 17:23:21 +00:00
|
|
|
ext_modules=[deluge_core]
|
2006-11-29 23:41:58 +00:00
|
|
|
)
|