deluge/setup.py

108 lines
3.2 KiB
Python
Raw Normal View History

2007-07-04 08:24:30 +00:00
# setup.py
#
# Copyright (c) 2007 Andrew Resch ('andar') <andrewresch@gmail.com>
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the OpenSSL
# library.
# You must obey the GNU General Public License in all respects for all of
# the code used other than OpenSSL. If you modify file(s) with this
# exception, you may extend this exception to your version of the file(s),
# but you are not obligated to do so. If you do not wish to do so, delete
# this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here.
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages, Extension
import platform
import glob
python_version = platform.python_version()[0:3]
# The libtorrent extension
_extra_compile_args = [
2007-07-04 08:24:30 +00:00
"-Wno-missing-braces",
"-DHAVE_INCLUDE_LIBTORRENT_ASIO____ASIO_HPP=1",
"-DHAVE_INCLUDE_LIBTORRENT_ASIO_SSL_STREAM_HPP=1",
"-DHAVE_INCLUDE_LIBTORRENT_ASIO_IP_TCP_HPP=1",
"-DHAVE_PTHREAD=1",
"-DTORRENT_USE_OPENSSL=1",
"-DHAVE_SSL=1"
]
_include_dirs = [
2007-07-04 08:24:30 +00:00
'./libtorrent',
'./libtorrent/include',
'./libtorrent/include/libtorrent',
'/usr/include/python' + python_version
]
_libraries = [
2007-07-04 08:24:30 +00:00
'boost_filesystem',
'boost_date_time',
'boost_thread',
2007-07-09 02:50:20 +00:00
'boost_python',
2007-07-04 08:24:30 +00:00
'z',
'pthread',
'ssl'
]
2007-07-09 02:50:20 +00:00
_sources = glob.glob("./libtorrent/src/*.cpp") + \
glob.glob("./libtorrent/src/kademlia/*.cpp") + \
glob.glob("./libtorrent/bindings/python/src/*.cpp")
2007-07-04 08:24:30 +00:00
# Remove file_win.cpp as it is only for Windows builds
for source in _sources:
2007-07-04 08:24:30 +00:00
if "file_win.cpp" in source:
_sources.remove(source)
2007-07-04 08:24:30 +00:00
break
libtorrent = Extension(
'libtorrent',
include_dirs = _include_dirs,
libraries = _libraries,
extra_compile_args = _extra_compile_args,
sources = _sources
2007-07-04 08:24:30 +00:00
)
# Main setup
2007-07-12 20:02:34 +00:00
2007-07-04 08:24:30 +00:00
setup(
name = "deluge",
fullname = "Deluge Bittorent Client",
version = "0.6",
author = "Zach Tibbitts, Alon Zakai, Marcos Pinto, Andrew Resch",
2007-07-09 02:50:20 +00:00
author_email = "zach@collegegeek.org, kripkensteiner@gmail.com, \
marcospinto@dipconsultants.com, andrewresch@gmail.com",
2007-07-04 08:24:30 +00:00
description = "GTK+ bittorrent client",
url = "http://deluge-torrent.org",
license = "GPLv2",
include_package_data = True,
ext_package = "deluge",
ext_modules = [libtorrent],
2007-07-12 20:02:34 +00:00
packages = find_packages(),
2007-07-04 08:24:30 +00:00
entry_points = """
[console_scripts]
deluge = deluge.main:main
"""
)