##// 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 if 'FORCE_SETUPTOOLS' in os.environ:
67 from setuptools import setup
67 from setuptools import setup
68 else:
68 else:
69 from distutils.core import setup
69 from distutils.core import setup
70 from distutils.ccompiler import new_compiler
70 from distutils.core import Command, Extension
71 from distutils.core import Command, Extension
71 from distutils.dist import Distribution
72 from distutils.dist import Distribution
72 from distutils.command.build import build
73 from distutils.command.build import build
@@ -553,8 +554,14 common_depends = ['mercurial/bitmanipula
553 'mercurial/compat.h',
554 'mercurial/compat.h',
554 'mercurial/util.h']
555 'mercurial/util.h']
555
556
557 osutil_cflags = []
556 osutil_ldflags = []
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 if sys.platform == 'darwin':
565 if sys.platform == 'darwin':
559 osutil_ldflags += ['-framework', 'ApplicationServices']
566 osutil_ldflags += ['-framework', 'ApplicationServices']
560
567
@@ -575,6 +582,7 extmodules = [
575 'mercurial/pathencode.c'],
582 'mercurial/pathencode.c'],
576 depends=common_depends),
583 depends=common_depends),
577 Extension('mercurial.osutil', ['mercurial/osutil.c'],
584 Extension('mercurial.osutil', ['mercurial/osutil.c'],
585 extra_compile_args=osutil_cflags,
578 extra_link_args=osutil_ldflags,
586 extra_link_args=osutil_ldflags,
579 depends=common_depends),
587 depends=common_depends),
580 Extension('hgext.fsmonitor.pywatchman.bser',
588 Extension('hgext.fsmonitor.pywatchman.bser',
General Comments 0
You need to be logged in to leave comments. Login now