[wwwsearch-commits] r19245 - wwwsearch/ClientCookie/trunk
jjlee at codespeak.net
jjlee at codespeak.net
Mon Oct 31 16:20:48 CET 2005
Author: jjlee
Date: Mon Oct 31 16:20:47 2005
New Revision: 19245
Modified:
wwwsearch/ClientCookie/trunk/ (props changed)
wwwsearch/ClientCookie/trunk/setup.py
Log:
setuptools-ify ClientCookie
Modified: wwwsearch/ClientCookie/trunk/setup.py
==============================================================================
--- wwwsearch/ClientCookie/trunk/setup.py (original)
+++ wwwsearch/ClientCookie/trunk/setup.py Mon Oct 31 16:20:47 2005
@@ -10,6 +10,10 @@
it easier to add new functionality to urllib2 (now part of urllib2, as
of Python 2.4). It has developed from a port of Gisle Aas' Perl
module HTTP::Cookies, from the libwww-perl library.
+
+SVN URL for Python Eggs:
+
+http://codespeak.net/svn/wwwsearch/ClientCookie/trunk#egg=ClientCookie-dev
"""
from ClientCookie import VERSION
@@ -17,6 +21,7 @@
PACKAGE = True
LICENSE = "BSD"
PLATFORMS = ["any"]
+ZIP_SAFE = True
CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
@@ -41,47 +46,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