File: setup.py

package info (click to toggle)
pyblosxom 1.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 452 kB
  • ctags: 237
  • sloc: python: 1,688; makefile: 16
file content (127 lines) | stat: -rw-r--r-- 3,948 bytes parent folder | download
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/usr/bin/env python

import os.path, sys, os
from distutils.core import setup

# this affects the names of all the directories we do stuff with
sys.path.insert(0, "./")
from Pyblosxom import pyblosxom

VER = pyblosxom.VERSION
PVER = "pyblosxom-" + VER

def Walk(root='.'):
    """
    A really really scaled down version of what we have in tools.py.
    """
    # initialize
    result = []

    # must have at least root folder
    try:
        names = os.listdir(root)
    except os.error:
        return result

    # check each file
    for name in names:
        if name == "CVS":
            continue
        fullname = os.path.normpath(os.path.join(root, name))

        # recursively scan other folders, appending results
        if os.path.isdir(fullname) and not os.path.islink(fullname):
            result.append(fullname)
            result = result + Walk(fullname)
                
    return result

doc_files = ["INSTALL", "LICENSE", 
             os.path.normpath("docs/README.plugins"), 
             os.path.normpath("docs/ReadMeForPlugins.py")]

# FIXME - this doesn't account for a variety of platforms
platform = sys.platform
matrix = { "win32": "win32",
           "linux": "nix",
           "cygwin": "nix",
           "netbsd": "nix",
           "openbsd": "nix",
           "darwin": "nix",
           "freebsd": "nix" }

for mem in matrix.keys():
    if platform.startswith(mem):
        platform = matrix[mem]
        break

if platform == "win32":
    pydf = []
    root = "c:\\Program Files\\" + PVER + "\\"

elif platform == "nix":
    pydf = []

    # we want to move the web script files as well, so we sneak them
    # in here.
    pydf.append( [os.path.join('share', PVER, 'web'),
                  [os.path.normpath("web/pyblosxom.cgi"), 
                   os.path.normpath("web/pyblosxom.tac"), 
                   os.path.normpath("web/pyblosxom_wsgi.cgi"), 
                   os.path.normpath("web/wsgi_app.py"), 
                   os.path.normpath("web/config.py")]])

else:
    # we don't know what platform they have, so we print out
    # this message and hope they tell us.  it'd be nice if i
    # could find a listing of the possible platforms, but i suck.
    # (wbg 7/31/2003)
    pydf = []
    print """
NOTE: We want to install documentation and the web scripts to some 
central location where you can access them.  However, we don't know 
where to put it for your platform.  If you could send an email to 
<pyblosxom-users@lists.sourceforge.net> with the following information:

  Dear Pyblosxom Users,
  I have platform '""" + sys.platform + """' and you told me to send you
  an email with this information!
  Sincerely,
  <your name>

Thanks!

In the meantime, you'll have to put the docs and web scripts where you 
want them on your own.  They're in subdirectories of this one: web/ 
and docs/ .  Sorry for the inconvenience.
"""


if sys.version < '2.2.3':
    from distutils.dist import DistributionMetadata
    DistributionMetadata.classifiers = None
    DistributionMetadata.download_url = None

setup(name="pyblosxom",
    version=VER,
    description="pyblosxom weblog engine",
    author="Wari Wahab",
    author_email="pyblosxom-devel@lists.sourceforge.net",
    url="http://roughingit.subtlehints.net/pyblosxom",
    packages=['Pyblosxom', 'Pyblosxom.cache', 'Pyblosxom.entries', 'Pyblosxom.renderers'],
    license = 'MIT',
    long_description =
"""Pyblosxom is a weblog engine that uses the filesystem as the database of
your entries.
""",
    data_files=pydf,
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Environment :: Console (Text Based), Web Environment",
        "Intended Audience :: End Users/Desktop",
        "License :: OSI Approved :: MIT/X Consortium License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Internet :: WWW/HTTP :: Dynamic Content"
        ],
    )