##// END OF EJS Templates
setup: cleanup coding style
Martin Geisler -
r10000:16f49d67 default
parent child Browse files
Show More
@@ -44,7 +44,7 b" if os.name == 'nt':"
44
44
45 # simplified version of distutils.ccompiler.CCompiler.has_function
45 # simplified version of distutils.ccompiler.CCompiler.has_function
46 # that actually removes its temporary files.
46 # that actually removes its temporary files.
47 def has_function(cc, funcname):
47 def hasfunction(cc, funcname):
48 tmpdir = tempfile.mkdtemp(prefix='hg-install-')
48 tmpdir = tempfile.mkdtemp(prefix='hg-install-')
49 devnull = oldstderr = None
49 devnull = oldstderr = None
50 try:
50 try:
@@ -165,7 +165,7 b' try:'
165 except ImportError:
165 except ImportError:
166 version = 'unknown'
166 version = 'unknown'
167
167
168 class build_mo(build):
168 class hgbuildmo(build):
169
169
170 description = "build translations (.mo files)"
170 description = "build translations (.mo files)"
171
171
@@ -195,7 +195,7 b' class build_mo(build):'
195 self.mkpath(join('mercurial', modir))
195 self.mkpath(join('mercurial', modir))
196 self.make_file([pofile], mobuildfile, spawn, (cmd,))
196 self.make_file([pofile], mobuildfile, spawn, (cmd,))
197
197
198 # Insert build_mo first so that files in mercurial/locale/ are found
198 # Insert hgbuildmo first so that files in mercurial/locale/ are found
199 # when build_py is run next.
199 # when build_py is run next.
200 build.sub_commands.insert(0, ('build_mo', None))
200 build.sub_commands.insert(0, ('build_mo', None))
201
201
@@ -203,7 +203,7 b' Distribution.pure = 0'
203 Distribution.global_options.append(('pure', None, "use pure (slow) Python "
203 Distribution.global_options.append(('pure', None, "use pure (slow) Python "
204 "code instead of C extensions"))
204 "code instead of C extensions"))
205
205
206 class hg_build_py(build_py):
206 class hgbuildpy(build_py):
207
207
208 def finalize_options(self):
208 def finalize_options(self):
209 build_py.finalize_options(self)
209 build_py.finalize_options(self)
@@ -225,10 +225,10 b' class hg_build_py(build_py):'
225 else:
225 else:
226 yield module
226 yield module
227
227
228 cmdclass = {'build_mo': build_mo,
228 cmdclass = {'build_mo': hgbuildmo,
229 'build_py': hg_build_py}
229 'build_py': hgbuildpy}
230
230
231 ext_modules=[
231 extmodules = [
232 Extension('mercurial.base85', ['mercurial/base85.c']),
232 Extension('mercurial.base85', ['mercurial/base85.c']),
233 Extension('mercurial.bdiff', ['mercurial/bdiff.c']),
233 Extension('mercurial.bdiff', ['mercurial/bdiff.c']),
234 Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c']),
234 Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c']),
@@ -244,8 +244,8 b" if sys.platform == 'linux2' and os.uname"
244 # The inotify extension is only usable with Linux 2.6 kernels.
244 # The inotify extension is only usable with Linux 2.6 kernels.
245 # You also need a reasonably recent C library.
245 # You also need a reasonably recent C library.
246 cc = new_compiler()
246 cc = new_compiler()
247 if has_function(cc, 'inotify_add_watch'):
247 if hasfunction(cc, 'inotify_add_watch'):
248 ext_modules.append(Extension('hgext.inotify.linux._inotify',
248 extmodules.append(Extension('hgext.inotify.linux._inotify',
249 ['hgext/inotify/linux/_inotify.c']))
249 ['hgext/inotify/linux/_inotify.c']))
250 packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
250 packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
251
251
@@ -274,7 +274,7 b" setup(name='mercurial',"
274 license='GNU GPL',
274 license='GNU GPL',
275 scripts=scripts,
275 scripts=scripts,
276 packages=packages,
276 packages=packages,
277 ext_modules=ext_modules,
277 ext_modules=extmodules,
278 data_files=datafiles,
278 data_files=datafiles,
279 package_data=packagedata,
279 package_data=packagedata,
280 cmdclass=cmdclass,
280 cmdclass=cmdclass,
General Comments 0
You need to be logged in to leave comments. Login now