mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-11 02:48:39 +00:00
updated installation script
This commit is contained in:
parent
c4641d77d2
commit
4bc640db18
1 changed files with 17 additions and 10 deletions
27
setup.py
27
setup.py
|
@ -18,6 +18,8 @@
|
||||||
# 51 Franklin Street, Fifth Floor
|
# 51 Franklin Street, Fifth Floor
|
||||||
# Boston, MA 02110-1301, USA.
|
# Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
import platform, os, glob
|
||||||
|
from distutils.core import setup, Extension
|
||||||
|
|
||||||
## Modify the build arguments
|
## Modify the build arguments
|
||||||
from distutils import sysconfig
|
from distutils import sysconfig
|
||||||
|
@ -25,17 +27,19 @@ from distutils import sysconfig
|
||||||
removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
|
removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
|
||||||
additions = ['-DNDEBUG', '-O2']
|
additions = ['-DNDEBUG', '-O2']
|
||||||
|
|
||||||
cv = sysconfig.get_config_vars()
|
cv_opt = sysconfig.get_config_vars()["OPT"]
|
||||||
for removal in removals:
|
|
||||||
cv["OPT"] = cv["OPT"].replace(" " + removal + " ", " ")
|
for removal in removals:
|
||||||
for addition in additions:
|
cv_opt = cv_opt.replace(removal, " ")
|
||||||
cv["OPT"] = cv["OPT"] + " " + addition
|
for addition in additions:
|
||||||
|
cv_opt = cv_opt + " " + addition
|
||||||
|
|
||||||
|
sysconfig.get_config_vars()["OPT"] = ' '.join(cv_opt.split())
|
||||||
|
|
||||||
|
|
||||||
import platform, os
|
|
||||||
|
|
||||||
pythonVersion = platform.python_version()[0:3]
|
pythonVersion = platform.python_version()[0:3]
|
||||||
|
|
||||||
from distutils.core import setup, Extension
|
|
||||||
|
|
||||||
deluge_core = Extension('deluge_core',
|
deluge_core = Extension('deluge_core',
|
||||||
include_dirs = ['./libtorrent', './libtorrent/include', './libtorrent/include/libtorrent',
|
include_dirs = ['./libtorrent', './libtorrent/include', './libtorrent/include/libtorrent',
|
||||||
|
@ -78,6 +82,11 @@ deluge_core = Extension('deluge_core',
|
||||||
'libtorrent/src/kademlia/rpc_manager.cpp',
|
'libtorrent/src/kademlia/rpc_manager.cpp',
|
||||||
'libtorrent/src/kademlia/traversal_algorithm.cpp'])
|
'libtorrent/src/kademlia/traversal_algorithm.cpp'])
|
||||||
|
|
||||||
|
data = [('share/deluge/glade', glob.glob('glade/*.glade')),
|
||||||
|
('share/deluge/pixmaps', glob.glob('pixmaps/*.png'))]
|
||||||
|
|
||||||
|
for plugin in glob.glob('plugins/*'):
|
||||||
|
data.append( ('share/deluge/' + plugin, glob.glob(plugin + '/*')) )
|
||||||
|
|
||||||
setup(name="deluge", fullname="Deluge BitTorrent Client", version="0.5.0",
|
setup(name="deluge", fullname="Deluge BitTorrent Client", version="0.5.0",
|
||||||
author="Zach Tibbitts, Alon Zakai",
|
author="Zach Tibbitts, Alon Zakai",
|
||||||
|
@ -88,9 +97,7 @@ setup(name="deluge", fullname="Deluge BitTorrent Client", version="0.5.0",
|
||||||
scripts=["scripts/deluge"],
|
scripts=["scripts/deluge"],
|
||||||
packages=['deluge'],
|
packages=['deluge'],
|
||||||
package_dir = {'deluge': 'src'},
|
package_dir = {'deluge': 'src'},
|
||||||
data_files=[("share/deluge/glade", ["glade/delugegtk.glade", "glade/dgtkpopups.glade", "glade/dgtkpref.glade"]),
|
data_files=data,
|
||||||
("share/deluge/pixmaps", ["pixmaps/deluge32.png",
|
|
||||||
"pixmaps/deluge128.png", "pixmaps/deluge256.png"])],
|
|
||||||
ext_package='deluge',
|
ext_package='deluge',
|
||||||
ext_modules=[deluge_core]
|
ext_modules=[deluge_core]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue