summaryrefslogtreecommitdiff
path: root/setup.py
blob: 4571da5700572e626dafa58e56d7d3efb35a3bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from distutils.core import setup
from distutils import sysconfig
import warnings
warnings.filterwarnings("ignore", "Unknown distribution option")

import sys
# patch distutils if it can't cope with the "classifiers" keyword
if sys.version < '2.2.3':
    from distutils.dist import DistributionMetadata
    DistributionMetadata.classifiers = None
    DistributionMetadata.download_url = None

import os

BASEDIR = os.path.split(os.path.abspath(__file__))[0]

def get_data_files(path, files = []):
    l = []
    for name in os.listdir(path):
        if name[0] == ".":
            continue
        relpath = os.path.join(path, name)
        f = os.path.join(BASEDIR, relpath)
        if os.path.isdir(f):
            get_data_files(relpath, files)
        elif os.path.isfile(f):
            l.append(f)
    pref = sysconfig.get_python_lib()[len(sysconfig.PREFIX) + 1:] 
    files.append((os.path.join(pref, path), l)) 
    return files

setup(name="Paste",
      version="0.1",
      description="Tools for use with a Web Server Gateway Interface stack",
      long_description="""\
These provide several pieces of "middleware" that can be nested to build
web applications.  Each piece of middleware uses the WSGI (`PEP 333`_)
interface, and should be compatible with other middleware based on those
interfaces.

.. _PEP 333: http://www.python.org/peps/pep-0333.html

As an example (and a working implementation), a version Webware
(http://webwareforpython.org) is included, built from these tools with
wrappers to provide the Webware API on top of the middleware
functionality.
""",
      classifiers=["Development Status :: 3 - Alpha",
                   "Intended Audience :: Developers",
                   "License :: OSI Approved :: Python Software Foundation License",
                   "Programming Language :: Python",
                   "Topic :: Internet :: WWW/HTTP",
                   "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
                   "Topic :: Software Development :: Libraries :: Python Modules",
                   ],
      author="Ian Bicking",
      author_email="ianb@colorstudy.com",
      url="http://webwareforpython.org",
      license="PSF",
      packages=["paste", "paste.exceptions",
                "paste.util",
                "paste.webkit",
                "paste.webkit.FakeWebware",
                "paste.webkit.FakeWebware.WebKit",
                "paste.webkit.FakeWebware.WebUtils",
                "paste.webkit.FakeWebware.MiscUtils"],
      scripts=['scripts/paste-server', 'scripts/paste-setup'],
      download_url="",
      data_files=get_data_files(os.path.join("paste","app_templates")) +
          [(os.path.join(sysconfig.get_python_lib()[len(sysconfig.PREFIX) + 1:], "paste"), [os.path.join("paste", "default_config.conf")])]
      )

# Send announce to:
#   web-sig@python.org
#   python-announce@python.org
#   python-list@python.org