##// END OF EJS Templates
Pager extension: switch it off if --debugger is set...
Pager extension: switch it off if --debugger is set The pager is preventing the debugger prompt and much of the debugger output to be refreshed. Moreover the pager does not make sense when debugging line by line. (This supersedes the similar ui.debugflag patch. Disabling the pager for debug output doesn't make that much sense, as this is actually when the pager might be useful.)

File last commit:

r6389:0231f763 default
r6456:db5324d3 default
Show More
setup.py
133 lines | 4.4 KiB | text/x-python | PythonLexer
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 #!/usr/bin/env python
mpm@selenic.com
More whitespace cleanups...
r575 #
# This is the mercurial setup script.
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0 #
Christian Ebert
setup.py not executable: change instructions at beginning of file
r4816 # 'python setup.py install', or
# 'python setup.py --help' for more options
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0
Thomas Arendsen Hein
Added check for minimal python version to setup.py
r1873 import sys
Thomas Arendsen Hein
Check for at least having a final release of python 2.3.0 in setup.py...
r3590 if not hasattr(sys, 'version_info') or sys.version_info < (2, 3, 0, 'final'):
Thomas Arendsen Hein
Added check for minimal python version to setup.py
r1873 raise SystemExit, "Mercurial requires python 2.3 or later."
Thomas Arendsen Hein
Install all files/subdirectories below templates....
r3239 import os
Alexis S. L. Carvalho
setup.py: use a simplified custom version of CCompiler.has_function...
r6251 import shutil
import tempfile
mpm@selenic.com
Add an O(m + nlog n) patching extension
r72 from distutils.core import setup, Extension
mpm@selenic.com
Install the templates where they can be found by hgweb.py...
r157 from distutils.command.install_data import install_data
Alexis S. L. Carvalho
setup.py: skip inotify if there's no inotify_add_watch...
r6245 from distutils.ccompiler import new_compiler
mpm@selenic.com
Install the templates where they can be found by hgweb.py...
r157
Thomas Arendsen Hein
Support for 'hg --version'. setup.py stores version from hg repository....
r423 import mercurial.version
Matt Mackall
Fix setup.py warning
r3893 extra = {}
Alexis S. L. Carvalho
setup.py: use a simplified custom version of CCompiler.has_function...
r6251 # simplified version of distutils.ccompiler.CCompiler.has_function
# that actually removes its temporary files.
def has_function(cc, funcname):
tmpdir = tempfile.mkdtemp(prefix='hg-install-')
Alexis S. L. Carvalho
setup.py: hide compiler error messages while searching for inotify
r6373 devnull = oldstderr = None
Alexis S. L. Carvalho
setup.py: use a simplified custom version of CCompiler.has_function...
r6251 try:
try:
Alexis S. L. Carvalho
setup.py: hide compiler error messages while searching for inotify
r6373 fname = os.path.join(tmpdir, 'funcname.c')
f = open(fname, 'w')
f.write('int main(void) {\n')
f.write(' %s();\n' % funcname)
f.write('}\n')
f.close()
# Redirect stderr to /dev/null to hide any error messages
# from the compiler.
# This will have to be changed if we ever have to check
# for a function on Windows.
devnull = open('/dev/null', 'w')
oldstderr = os.dup(sys.stderr.fileno())
os.dup2(devnull.fileno(), sys.stderr.fileno())
Alexis S. L. Carvalho
setup.py: use a simplified custom version of CCompiler.has_function...
r6251 objects = cc.compile([fname])
cc.link_executable(objects, os.path.join(tmpdir, "a.out"))
except:
return False
return True
finally:
Alexis S. L. Carvalho
setup.py: hide compiler error messages while searching for inotify
r6373 if oldstderr is not None:
os.dup2(oldstderr, sys.stderr.fileno())
if devnull is not None:
devnull.close()
Alexis S. L. Carvalho
setup.py: use a simplified custom version of CCompiler.has_function...
r6251 shutil.rmtree(tmpdir)
Volker.Kleinfeld@gmx.de
Support for the distutils extention 'py2exe' added....
r1283 # py2exe needs to be installed to work
try:
Bryan O'Sullivan
Clean up whitespace damage.
r1294 import py2exe
Volker.Kleinfeld@gmx.de
Support for the distutils extention 'py2exe' added....
r1283
Volker Kleinfeld
py2exe is not able to handle win32com.shell...
r1422 # Help py2exe to find win32com.shell
try:
import modulefinder
import win32com
for p in win32com.__path__[1:]: # Take the path to win32comext
modulefinder.AddPackagePath("win32com", p)
pn = "win32com.shell"
__import__(pn)
m = sys.modules[pn]
for p in m.__path__[1:]:
modulefinder.AddPackagePath(pn, p)
except ImportError:
pass
Matt Mackall
Fix setup.py warning
r3893 extra['console'] = ['hg']
Bryan O'Sullivan
Fix Volker's modifications to setup.py for non-Windows systems.
r1284 except ImportError:
Matt Mackall
Fix demandload bits of setup.py py2exe support
r3890 pass
Volker.Kleinfeld@gmx.de
Support for the distutils extention 'py2exe' added....
r1283
Thomas Arendsen Hein
Make it possible to specify a version number in setup.py....
r427 # specify version string, otherwise 'hg identify' will be used:
version = ''
mpm@selenic.com
Install the templates where they can be found by hgweb.py...
r157 class install_package_data(install_data):
def finalize_options(self):
self.set_undefined_options('install',
('install_lib', 'install_dir'))
install_data.finalize_options(self)
mpm@selenic.com
Add back links from file revisions to changeset revisions...
r0
Thomas Arendsen Hein
Don't forget version at the end of setup.py, write it only if changed....
r1977 mercurial.version.remember_version(version)
cmdclass = {'install_data': install_package_data}
Thomas Arendsen Hein
Applied coding style to setup.py
r3238
Bryan O'Sullivan
Add osutil module, containing a listdir function....
r5396 ext_modules=[
Extension('mercurial.mpatch', ['mercurial/mpatch.c']),
Extension('mercurial.bdiff', ['mercurial/bdiff.c']),
Extension('mercurial.base85', ['mercurial/base85.c']),
Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c'])
]
Bryan O'Sullivan
Add inotify extension
r6239 packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert']
Bryan O'Sullivan
Add osutil module, containing a listdir function....
r5396 try:
import posix
ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c']))
Bryan O'Sullivan
setup.py: os.uname is not available on Windows
r6241
if sys.platform == 'linux2' and os.uname()[2] > '2.6':
Alexis S. L. Carvalho
setup.py: skip inotify if there's no inotify_add_watch...
r6245 # The inotify extension is only usable with Linux 2.6 kernels.
# You also need a reasonably recent C library.
cc = new_compiler()
Alexis S. L. Carvalho
setup.py: use a simplified custom version of CCompiler.has_function...
r6251 if has_function(cc, 'inotify_add_watch'):
Alexis S. L. Carvalho
setup.py: skip inotify if there's no inotify_add_watch...
r6245 ext_modules.append(Extension('hgext.inotify.linux._inotify',
['hgext/inotify/linux/_inotify.c']))
packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
Bryan O'Sullivan
Add osutil module, containing a listdir function....
r5396 except ImportError:
pass
Thomas Arendsen Hein
Don't forget version at the end of setup.py, write it only if changed....
r1977 setup(name='mercurial',
Thomas Arendsen Hein
Applied coding style to setup.py
r3238 version=mercurial.version.get_version(),
author='Matt Mackall',
author_email='mpm@selenic.com',
url='http://selenic.com/mercurial',
description='Scalable distributed SCM',
license='GNU GPL',
Matt Mackall
filemerge: remove the hgmerge script...
r6009 scripts=['hg'],
Bryan O'Sullivan
Add inotify extension
r6239 packages=packages,
Bryan O'Sullivan
Add osutil module, containing a listdir function....
r5396 ext_modules=ext_modules,
Thomas Arendsen Hein
Install all files/subdirectories below templates....
r3239 data_files=[(os.path.join('mercurial', root),
[os.path.join(root, file_) for file_ in files])
for root, dirs, files in os.walk('templates')],
Thomas Arendsen Hein
Applied coding style to setup.py
r3238 cmdclass=cmdclass,
Lee Cantey
Fix for including hgext in Windows compiled version....
r4628 options=dict(py2exe=dict(packages=['hgext']),
bdist_mpkg=dict(zipdist=True,
Thomas Arendsen Hein
Applied coding style to setup.py
r3238 license='COPYING',
readme='contrib/macosx/Readme.html',
welcome='contrib/macosx/Welcome.html')),
Matt Mackall
Fix setup.py warning
r3893 **extra)