def _being_installed(): if os.environ.get('DONT_PATCH_SETUPTOOLS') is not None: return False if _buildout_marker(): # Installed by buildout, don't mess with a global setuptools. return False # easy_install marker if "--help" in sys.argv[1:] or "-h" in sys.argv[ 1:]: # Don't bother doing anything if they're just asking for help return False return 'install' in sys.argv[1:] or _easy_install_marker() if _being_installed(): from distribute_setup import _before_install _before_install() dist = setup( name="distribute", version=VERSION, description="Easily download, build, install, upgrade, and uninstall " "Python packages", author="The fellowship of the packaging", author_email="*****@*****.**", license="PSF or ZPL", long_description=open('README.txt').read() + open('CHANGES.txt').read(), keywords="CPAN PyPI distutils eggs package management", url="http://packages.python.org/distribute", test_suite='setuptools.tests', src_root=src_root, packages=find_packages(),
return 'buildout' in os.path.basename(command) def _being_installed(): if os.environ.get('DONT_PATCH_SETUPTOOLS') is not None: return False if _buildout_marker(): # Installed by buildout, don't mess with a global setuptools. return False # easy_install marker if "--help" in sys.argv[1:] or "-h" in sys.argv[1:]: # Don't bother doing anything if they're just asking for help return False return 'install' in sys.argv[1:] or _easy_install_marker() if _being_installed(): from distribute_setup import _before_install _before_install() # return contents of reStructureText file with linked issue references def _linkified(rst_path): bitroot = 'http://bitbucket.org/tarek/distribute' revision = re.compile(r'\b(issue\s*#?\d+)\b', re.M | re.I) rst_file = open(rst_path) rst_content = rst_file.read() rst_file.close() anchors = revision.findall(rst_content) # ['Issue #43', ...] anchors = sorted(set(anchors)) rst_content = revision.sub(r'`\1`_', rst_content) rst_content += "\n" for x in anchors: