#!/usr/bin/env python # # Setup script for PythonDoc 2 # $Id: setup.py 2475 2005-06-18 15:56:52Z Fredrik $ # # Usage: python setup.py install # from string import find, replace from distutils.core import setup, Extension # # Installation sanity check. If reading the file in text mode returns # CRLF line endings, assume we're using a ZIP installation archive on # a non-Windows platform. This avoids confusing ": No such file or # directory" messages from the shell... repair = 0 for file in ["pythondoc.py"]: try: f = open(file, "r") script = f.read() f.close() if find(script, "\r\n") >= 0: if not repair: print "=== installation kit uses CRLF in scripts!" print "=== repairing", file f = open(file, "w") f.write(replace(script, "\r\n", "\n")) f.close() repair = repair + 1 except IOError: pass try: # add classifiers/download_url syntax to distutils from distutils.dist import DistributionMetadata DistributionMetadata.classifiers = None DistributionMetadata.download_url = None except: pass setup( name="pythondoc", version="2.1b4-20050618", # should match pythondoc.VERSION author="Fredrik Lundh", author_email="fredrik@pythonware.com", description="A Python documentation generator, inspired by JavaDoc.", url="http://www.effbot.org/zone/pythondoc.htm", download_url="http://www.effbot.org/downloads#pythondoc", scripts = ["pythondoc.py"], )