Line 0
Link Here
|
|
|
1 |
--- setup.py.orig 2019-12-19 00:51:16 UTC |
2 |
+++ setup.py |
3 |
@@ -160,22 +160,25 @@ else: |
4 |
src_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "src")) |
5 |
source_list = [os.path.join(src_dir, s) for s in os.listdir(src_dir) if s.endswith(".cpp")] |
6 |
|
7 |
- if extra_cmd: |
8 |
- flags = flags_parser() |
9 |
+ flags = flags_parser() |
10 |
+ ext_extra = {} |
11 |
+ |
12 |
+ if ldflags: |
13 |
# ldflags parsed first to ensure the correct library search path order |
14 |
- extra_link = flags.parse(ldflags) |
15 |
- extra_compile = flags.parse(extra_cmd) |
16 |
+ ext_extra["extra_link_args"] = flags.parse(ldflags) + arch() |
17 |
|
18 |
- ext = [Extension( |
19 |
- 'libtorrent', |
20 |
- sources=sorted(source_list), |
21 |
- language='c++', |
22 |
- include_dirs=flags.include_dirs, |
23 |
- library_dirs=flags.library_dirs, |
24 |
- extra_link_args=extra_link + arch(), |
25 |
- extra_compile_args=extra_compile + arch() + target_specific(), |
26 |
- libraries=['torrent-rasterbar'] + flags.libraries) |
27 |
- ] |
28 |
+ if extra_cmd: |
29 |
+ ext_extra["extra_compile_args"] = flags.parse(extra_cmd) + arch() + target_specific() |
30 |
+ |
31 |
+ ext = [Extension( |
32 |
+ 'libtorrent', |
33 |
+ sources=sorted(source_list), |
34 |
+ language='c++', |
35 |
+ include_dirs=flags.include_dirs, |
36 |
+ library_dirs=flags.library_dirs, |
37 |
+ libraries=['torrent-rasterbar'] + flags.libraries, |
38 |
+ **ext_extra) |
39 |
+ ] |
40 |
|
41 |
setup( |
42 |
name='python-libtorrent', |