##// END OF EJS Templates
setup: test setproctitle before building osutil...
Jun Wu -
r30408:ce9a3033 default
parent child Browse files
Show More
@@ -67,6 +67,7 b" if 'FORCE_SETUPTOOLS' in os.environ:"
67 67 from setuptools import setup
68 68 else:
69 69 from distutils.core import setup
70 from distutils.ccompiler import new_compiler
70 71 from distutils.core import Command, Extension
71 72 from distutils.dist import Distribution
72 73 from distutils.command.build import build
@@ -553,8 +554,14 b" common_depends = ['mercurial/bitmanipula"
553 554 'mercurial/compat.h',
554 555 'mercurial/util.h']
555 556
557 osutil_cflags = []
556 558 osutil_ldflags = []
557 559
560 # platform specific macros: HAVE_SETPROCTITLE
561 for plat, func in [(re.compile('freebsd'), 'setproctitle')]:
562 if plat.search(sys.platform) and hasfunction(new_compiler(), func):
563 osutil_cflags.append('-DHAVE_%s' % func.upper())
564
558 565 if sys.platform == 'darwin':
559 566 osutil_ldflags += ['-framework', 'ApplicationServices']
560 567
@@ -575,6 +582,7 b' extmodules = ['
575 582 'mercurial/pathencode.c'],
576 583 depends=common_depends),
577 584 Extension('mercurial.osutil', ['mercurial/osutil.c'],
585 extra_compile_args=osutil_cflags,
578 586 extra_link_args=osutil_ldflags,
579 587 depends=common_depends),
580 588 Extension('hgext.fsmonitor.pywatchman.bser',
General Comments 0
You need to be logged in to leave comments. Login now