~ubuntu-branches/ubuntu/maverick/libtorrent-rasterbar/maverick

« back to all changes in this revision

Viewing changes to bindings/python/setup.py

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2009-05-13 12:08:59 UTC
  • mfrom: (3.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090513120859-b5qqlwi43aai3pq3
Tags: 0.14.3-1
* New Upstream Version
  - new package libtorrent-rasterbar3 (bump up library soname).
* debian/control:
  - add Vcs-* stuff (switch to git-buildpackage) and bump up
    Standards-Version to 3.8.1 (no changes required);
  - build-depends on debhelper (>= 7.0.50) and use override_dh_command;
  - move -dbg package to the new 'debug' section;
  - build-depends on autotools-dev and overwrite config.{sub,guess} with a
    recent version in debian/rules.
  - build-depends on quilt and python-docutils:
    + debian/patches/fix_html_docs.patch: fix html documentation for offline
      browsing and add another missing doc file;
    + rebuild docs at build time in debian/rules;
* debian/example.makefile: install a simple makefile for example programs
  included in -doc package.
* debian/rules, debian/python-libtorrent.install: don't rely on hardcoded
  python version, use --install-layout=deb when building python bindings,
  and install to '*-packages' instead of 'site-packages' (this should
  prepare for python2.6 and minimize Ubuntu diff).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
2
 
 
3
from distutils import sysconfig
3
4
from distutils.core import setup, Extension
4
5
import os
5
6
import platform
29
30
if platform.system() == 'Windows':
30
31
# on windows, build using bjam and build an installer
31
32
        import shutil
32
 
        if os.system('bjam boost=source link=static boost-link=static release msvc-7.1 optimization=space') != 0:
 
33
        if os.system('bjam boost=source link=static geoip=static boost-link=static release msvc-7.1 optimization=space') != 0:
33
34
                print 'build failed'
34
35
                sys.exit(1)
35
36
        try: os.mkdir(r'build')
38
39
        except: pass
39
40
        try: os.mkdir(r'libtorrent')
40
41
        except: pass
41
 
        shutil.copyfile(r'bin\msvc-7.1\release\boost-source\link-static\optimization-space\threading-multi\libtorrent.pyd', r'.\build\lib\libtorrent.pyd')
 
42
        shutil.copyfile(r'bin\msvc-7.1\release\boost-source\geoip-static\link-static\optimization-space\threading-multi\libtorrent.pyd', r'.\build\lib\libtorrent.pyd')
42
43
        setup( name='python-libtorrent',
43
 
                version='0.14.2',
 
44
                version='0.14.3',
44
45
                author = 'Arvid Norberg',
45
 
                author_email='arvid@rasterbar.com',
 
46
                author_email='arvid@cs.umu.se',
46
47
                description = 'Python bindings for libtorrent-rasterbar',
47
48
                long_description = 'Python bindings for libtorrent-rasterbar',
48
49
                url = 'http://www.rasterbar.com/products/libtorrent/index.html',
52
53
        )
53
54
        sys.exit(0)
54
55
 
 
56
config_vars = sysconfig.get_config_vars()
 
57
if "CFLAGS" in config_vars and "-Wstrict-prototypes" in config_vars["CFLAGS"]:
 
58
        config_vars["CFLAGS"] = config_vars["CFLAGS"].replace("-Wstrict-prototypes", " ")
 
59
if "OPT" in config_vars and "-Wstrict-prototypes" in config_vars["OPT"]:
 
60
        config_vars["OPT"] = config_vars["OPT"].replace("-Wstrict-prototypes", " ")
 
61
 
55
62
source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src"))
56
63
source_list = [os.path.join("src", s) for s in source_list if s.endswith(".cpp")]
57
64
 
58
 
extra_cmd = '-DTORRENT_USE_OPENSSL -DTORRENT_LINKING_SHARED   -D_THREAD_SAFE  -pthread -I/opt/local/include   -lboost_filesystem-mt-1_35 -lboost_thread-mt-1_35    -lssl -lcrypto -lboost_system-mt-1_35 -L/opt/local/lib -L/opt/local/lib -L/usr/lib -I/opt/local/include/boost-1_35 -I/usr/include/python2.5 -I/usr/include/openssl -DHAVE_SSL'
 
65
extra_cmd = '-DTORRENT_USE_OPENSSL -DTORRENT_LINKING_SHARED   -pthread -I/opt/local/include  -lboost_filesystem-mt-1_35 -lboost_thread-mt-1_35  -lssl -lcrypto -lboost_system-mt-1_35 -L/usr/lib -I/usr/include/openssl -DHAVE_SSL'
59
66
 
60
67
setup( name='python-libtorrent',
61
 
        version='0.14.2',
 
68
        version='0.14.3',
62
69
        author = 'Arvid Norberg',
63
 
        author_email='arvid@rasterbar.com',
 
70
        author_email='arvid@cs.umu.se',
64
71
        description = 'Python bindings for libtorrent-rasterbar',
65
72
        long_description = 'Python bindings for libtorrent-rasterbar',
66
73
        url = 'http://www.rasterbar.com/products/libtorrent/index.html',