[wwwsearch-commits] r19246 - wwwsearch/pullparser/trunk
jjlee at codespeak.net
jjlee at codespeak.net
Mon Oct 31 16:21:37 CET 2005
Author: jjlee
Date: Mon Oct 31 16:21:37 2005
New Revision: 19246
Modified:
wwwsearch/pullparser/trunk/ (props changed)
wwwsearch/pullparser/trunk/setup.py
Log:
setuptools-ify pullparser
Modified: wwwsearch/pullparser/trunk/setup.py
==============================================================================
--- wwwsearch/pullparser/trunk/setup.py (original)
+++ wwwsearch/pullparser/trunk/setup.py Mon Oct 31 16:21:37 2005
@@ -5,6 +5,10 @@
Many simple HTML parsing tasks are simpler this way than with the
HTMLParser module. pullparser.PullParser is a subclass of
HTMLParser.HTMLParser.
+
+SVN URL for Python Eggs:
+
+http://codespeak.net/svn/wwwsearch/pullparser/trunk#egg=pullparser-dev
"""
from pullparser import __version__
@@ -24,6 +28,7 @@
PACKAGE = False
LICENSE = "BSD"
PLATFORMS = ["any"]
+ZIP_SAFE = True
CLASSIFIERS = """\
Development Status :: 4 - Beta
Intended Audience :: Developers
@@ -49,47 +54,33 @@
#-------------------------------------------------------
# the rest is constant for most of my released packages:
-import sys, string
-from distutils.core import setup
+import ez_setup
+ez_setup.use_setuptools()
-_setup = setup
-def setup(**kwargs):
- if not hasattr(sys, "version_info") or sys.version_info < (2, 3):
- # Python version compatibility
- # XXX probably download_url came in earlier than 2.3
- for key in ["classifiers", "download_url"]:
- if kwargs.has_key(key):
- del kwargs[key]
- # Only want packages keyword if this is a package,
- # only want py_modules keyword if this is a single-file module,
- # so get rid of packages or py_modules keyword as appropriate.
- if kwargs["packages"] is None:
- del kwargs["packages"]
- else:
- del kwargs["py_modules"]
- apply(_setup, (), kwargs)
+import setuptools
if PACKAGE:
- packages = [NAME]
- py_modules = None
+ packages, py_modules = [NAME], None
else:
- py_modules = [NAME]
- packages = None
+ packages, py_modules = None, [NAME]
-doclines = string.split(__doc__, "\n")
+doclines = __doc__.split("\n")
-setup(name = NAME,
- version = VERSION,
- license = LICENSE,
- platforms = PLATFORMS,
- classifiers = filter(None, string.split(CLASSIFIERS, "\n")),
- author = "John J. Lee",
- author_email = "jjl at pobox.com",
- description = doclines[0],
- url = "http://wwwsearch.sourceforge.net/%s/" % NAME,
- download_url = ("http://wwwsearch.sourceforge.net/%s/src/"
- "%s-%s.tar.gz" % (NAME, NAME, VERSION)),
- long_description = string.join(doclines[2:], "\n"),
- py_modules = py_modules,
- packages = packages,
- )
+setuptools.setup(
+ name = NAME,
+ version = VERSION,
+ license = LICENSE,
+ platforms = PLATFORMS,
+ classifiers = filter(None, string.split(CLASSIFIERS, "\n")),
+ zip_safe = ZIP_SAFE,
+ test_suite = "test",
+ author = "John J. Lee",
+ author_email = "jjl at pobox.com",
+ description = doclines[0],
+ url = "http://wwwsearch.sourceforge.net/%s/" % NAME,
+ download_url = ("http://wwwsearch.sourceforge.net/%s/src/"
+ "%s-%s.tar.gz" % (NAME, NAME, VERSION)),
+ long_description = string.join(doclines[2:], "\n"),
+ py_modules = py_modules,
+ packages = packages,
+ )
More information about the wwwsearch-commits
mailing list