Patchwork [2,of,3] setup: move osutil_ldflags logic to before extmodules definition

login
register
mail settings
Submitter Adrian Buehlmann
Date May 14, 2015, 9:11 a.m.
Message ID <77937476f8856a189d98.1431594712@kork>
Download mbox | patch
Permalink /patch/9070/
State Accepted
Headers show

Comments

Adrian Buehlmann - May 14, 2015, 9:11 a.m.
# HG changeset patch
# User Adrian Buehlmann <adrian@cadifra.com>
# Date 1431594275 -7200
# Node ID 77937476f8856a189d98a894efc7d8a51ce2d651
# Parent  528f2c892eed77ed7d750efaa5a6f654d82f6a2b
setup: move osutil_ldflags logic to before extmodules definition

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -484,6 +484,11 @@ 
 
 common_depends = ['mercurial/util.h']
 
+osutil_ldflags = []
+
+if sys.platform == 'darwin':
+    osutil_ldflags += ['-framework', 'ApplicationServices']
+
 extmodules = [
     Extension('mercurial.base85', ['mercurial/base85.c'],
               depends=common_depends),
@@ -500,11 +505,6 @@ 
               depends=common_depends),
     ]
 
-osutil_ldflags = []
-
-if sys.platform == 'darwin':
-    osutil_ldflags += ['-framework', 'ApplicationServices']
-
 extmodules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'],
                             extra_link_args=osutil_ldflags,
                             depends=common_depends))