Mercurial > p > roundup > code
annotate setup.py @ 4089:eddb82d0964c
Add compatibility package to allow us to deal with Python versions 2.3..2.6.
Outstanding issues noted in roundup/anypy/TODO.txt
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 12 Mar 2009 02:52:56 +0000 |
| parents | a6fdaaa3a8bd |
| children | ab542607f2fb |
| rev | line source |
|---|---|
|
85
fe0b33370244
Made setup.py executable, added id and log.
Richard Jones <richard@users.sourceforge.net>
parents:
78
diff
changeset
|
1 #! /usr/bin/env python |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
2 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
3 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
4 # This module is free software, and you may redistribute it and/or modify |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
5 # under the same terms as Python, so long as this copyright message and |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
6 # disclaimer are retained in their original form. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
7 # |
| 214 | 8 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
9 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
10 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
11 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
12 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
13 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
210
diff
changeset
|
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
|
2300
e98bb674cb7d
binary distribution includes compiled message catalogs
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2253
diff
changeset
|
18 # |
|
85
fe0b33370244
Made setup.py executable, added id and log.
Richard Jones <richard@users.sourceforge.net>
parents:
78
diff
changeset
|
19 |
|
4033
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
20 |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
21 from roundup.dist.command.build_doc import build_doc |
| 4068 | 22 from roundup.dist.command.build_scripts import build_scripts |
| 23 from roundup.dist.command.build_py import build_py | |
| 24 from roundup.dist.command.build import build, list_message_files | |
| 25 from roundup.dist.command.bdist_rpm import bdist_rpm | |
| 26 from distutils.core import setup | |
|
78
edcca72de643
first cut at setup.py - installs the package, but not the bin/cgi-bin yet
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
27 |
| 4068 | 28 import sys, os |
|
78
edcca72de643
first cut at setup.py - installs the package, but not the bin/cgi-bin yet
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
29 from glob import glob |
|
593
2256f81293c1
Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
580
diff
changeset
|
30 |
|
1320
3758a5af985f
Lots of little fixes in this update:
Richard Jones <richard@users.sourceforge.net>
parents:
1287
diff
changeset
|
31 # patch distutils if it can't cope with the "classifiers" keyword |
|
1673
85cb3f524bba
make distutils less whiney
Richard Jones <richard@users.sourceforge.net>
parents:
1662
diff
changeset
|
32 from distutils.dist import DistributionMetadata |
|
85cb3f524bba
make distutils less whiney
Richard Jones <richard@users.sourceforge.net>
parents:
1662
diff
changeset
|
33 if not hasattr(DistributionMetadata, 'classifiers'): |
|
1320
3758a5af985f
Lots of little fixes in this update:
Richard Jones <richard@users.sourceforge.net>
parents:
1287
diff
changeset
|
34 DistributionMetadata.classifiers = None |
|
1461
c0673f1739c3
oops, handle older pythons w.r.t. download_url
Richard Jones <richard@users.sourceforge.net>
parents:
1458
diff
changeset
|
35 DistributionMetadata.download_url = None |
|
1320
3758a5af985f
Lots of little fixes in this update:
Richard Jones <richard@users.sourceforge.net>
parents:
1287
diff
changeset
|
36 |
|
4033
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
37 def include(d, e): |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
38 """Generate a pair of (directory, file-list) for installation. |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
39 |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
40 'd' -- A directory |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
41 |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
42 'e' -- A glob pattern""" |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
43 |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
44 return (d, [f for f in glob('%s/%s'%(d, e)) if os.path.isfile(f)]) |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
45 |
|
593
2256f81293c1
Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
580
diff
changeset
|
46 def scriptname(path): |
|
2256f81293c1
Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
580
diff
changeset
|
47 """ Helper for building a list of script names from a list of |
|
2256f81293c1
Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
580
diff
changeset
|
48 module files. |
|
2256f81293c1
Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
580
diff
changeset
|
49 """ |
|
2256f81293c1
Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
580
diff
changeset
|
50 script = os.path.splitext(os.path.basename(path))[0] |
| 4068 | 51 script = script.replace('_', '-') |
|
593
2256f81293c1
Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
580
diff
changeset
|
52 return script |
|
2256f81293c1
Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
580
diff
changeset
|
53 |
|
1576
80519db85eac
More tweaks to the licensing to make the Debian folks happy :)
Richard Jones <richard@users.sourceforge.net>
parents:
1461
diff
changeset
|
54 def main(): |
|
753
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
55 # build list of scripts from their implementation modules |
|
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
56 roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) |
|
437
a1e778940f92
Install html template files to share/roundup/templates
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
402
diff
changeset
|
57 |
|
753
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
58 # template munching |
|
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
59 packagelist = [ |
|
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
60 'roundup', |
|
4089
eddb82d0964c
Add compatibility package to allow us to deal with Python versions 2.3..2.6.
Richard Jones <richard@users.sourceforge.net>
parents:
4069
diff
changeset
|
61 'roundup.anypy', |
|
1059
3f20880c2a7e
additional packages
Richard Jones <richard@users.sourceforge.net>
parents:
937
diff
changeset
|
62 'roundup.cgi', |
|
3f20880c2a7e
additional packages
Richard Jones <richard@users.sourceforge.net>
parents:
937
diff
changeset
|
63 'roundup.cgi.PageTemplates', |
|
3f20880c2a7e
additional packages
Richard Jones <richard@users.sourceforge.net>
parents:
937
diff
changeset
|
64 'roundup.cgi.TAL', |
|
3f20880c2a7e
additional packages
Richard Jones <richard@users.sourceforge.net>
parents:
937
diff
changeset
|
65 'roundup.cgi.ZTUtils', |
|
753
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
66 'roundup.backends', |
|
2776
10e96f3ee658
install demo.py as a module in roundup package.
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2684
diff
changeset
|
67 'roundup.scripts', |
|
753
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
68 ] |
|
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
69 installdatafiles = [ |
|
3749
8d474f7ae1c0
setup.py had broken reference to roundup.cgi [SF#1593573]
Richard Jones <richard@users.sourceforge.net>
parents:
3748
diff
changeset
|
70 ('share/roundup/cgi-bin', ['frontends/roundup.cgi']), |
|
2300
e98bb674cb7d
binary distribution includes compiled message catalogs
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2253
diff
changeset
|
71 ] |
|
2776
10e96f3ee658
install demo.py as a module in roundup package.
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2684
diff
changeset
|
72 py_modules = ['roundup.demo',] |
|
437
a1e778940f92
Install html template files to share/roundup/templates
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
402
diff
changeset
|
73 |
|
1419
c717b8d63a7e
included UN*X manual pages from Bastian Kleineidam
Richard Jones <richard@users.sourceforge.net>
parents:
1320
diff
changeset
|
74 # install man pages on POSIX platforms |
|
c717b8d63a7e
included UN*X manual pages from Bastian Kleineidam
Richard Jones <richard@users.sourceforge.net>
parents:
1320
diff
changeset
|
75 if os.name == 'posix': |
|
c717b8d63a7e
included UN*X manual pages from Bastian Kleineidam
Richard Jones <richard@users.sourceforge.net>
parents:
1320
diff
changeset
|
76 installdatafiles.append(('man/man1', ['doc/roundup-admin.1', |
|
2846
fdad30b046e2
install roundup-demo man page
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2776
diff
changeset
|
77 'doc/roundup-mailgw.1', 'doc/roundup-server.1', |
|
fdad30b046e2
install roundup-demo man page
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2776
diff
changeset
|
78 'doc/roundup-demo.1'])) |
|
1419
c717b8d63a7e
included UN*X manual pages from Bastian Kleineidam
Richard Jones <richard@users.sourceforge.net>
parents:
1320
diff
changeset
|
79 |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
80 # add the templates to the data files lists |
| 1918 | 81 from roundup.init import listTemplates |
|
4069
a6fdaaa3a8bd
Move templates/ to share/roundup/templates/
Stefan Seefeld <stefan@seefeld.name>
parents:
4068
diff
changeset
|
82 templates = [t['path'] for t in listTemplates(os.path.join('share','roundup','templates')).values()] |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
83 for tdir in templates: |
|
753
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
84 # scan for data files |
|
2684
94229a0832bd
install extensions directories in tracker templates.
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2448
diff
changeset
|
85 for idir in '. detectors extensions html'.split(): |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
86 idir = os.path.join(tdir, idir) |
|
2776
10e96f3ee658
install demo.py as a module in roundup package.
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2684
diff
changeset
|
87 if not os.path.isdir(idir): |
|
10e96f3ee658
install demo.py as a module in roundup package.
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2684
diff
changeset
|
88 continue |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
89 tfiles = [] |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
90 for f in os.listdir(idir): |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
91 if f.startswith('.'): |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
92 continue |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
93 ifile = os.path.join(idir, f) |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
94 if os.path.isfile(ifile): |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
95 tfiles.append(ifile) |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
96 installdatafiles.append( |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
97 (os.path.join('share', 'roundup', idir), tfiles) |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
1587
diff
changeset
|
98 ) |
|
78
edcca72de643
first cut at setup.py - installs the package, but not the bin/cgi-bin yet
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
99 |
|
2300
e98bb674cb7d
binary distribution includes compiled message catalogs
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2253
diff
changeset
|
100 # add message files |
|
2332
804c5c735bf1
don't compile message catalogs...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2316
diff
changeset
|
101 for (_dist_file, _mo_file) in list_message_files(): |
|
2303
bf3d44f6b91e
reorganized locale sources:
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2300
diff
changeset
|
102 installdatafiles.append((os.path.dirname(_mo_file), |
|
bf3d44f6b91e
reorganized locale sources:
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2300
diff
changeset
|
103 [os.path.join("build", _mo_file)])) |
|
2300
e98bb674cb7d
binary distribution includes compiled message catalogs
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2253
diff
changeset
|
104 |
|
4033
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
105 # add docs |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
106 installdatafiles.append(include(os.path.join('share', 'doc', 'roundup', 'html'), '*')) |
|
bca7c59ac400
Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents:
4012
diff
changeset
|
107 |
|
753
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
675
diff
changeset
|
108 # perform the setup action |
|
773
6e6c63a57df9
[SF#569415] {version]]
Richard Jones <richard@users.sourceforge.net>
parents:
753
diff
changeset
|
109 from roundup import __version__ |
| 4068 | 110 |
| 111 setup(name='roundup', | |
| 112 version=__version__, | |
| 113 author="Richard Jones", | |
| 114 author_email="richard@users.sourceforge.net", | |
| 115 description='Issue-tracking System.', | |
| 116 long_description="""Roundup is a simple-to-use and -install issue-tracking system | |
| 117 with command-line, web and e-mail interfaces. Highly customisable.""", | |
| 118 url='http://www.roundup-tracker.org', | |
| 119 download_url='http://pypi.python.org/pypi/roundup', | |
| 120 classifiers=['Development Status :: 5 - Production/Stable', | |
| 121 'Environment :: Console', | |
| 122 'Environment :: Web Environment', | |
| 123 'Intended Audience :: End Users/Desktop', | |
| 124 'Intended Audience :: Developers', | |
| 125 'Intended Audience :: System Administrators', | |
| 126 'License :: OSI Approved :: Python Software Foundation License', | |
| 127 'Operating System :: MacOS :: MacOS X', | |
| 128 'Operating System :: Microsoft :: Windows', | |
| 129 'Operating System :: POSIX', | |
| 130 'Programming Language :: Python', | |
| 131 'Topic :: Communications :: Email', | |
| 132 'Topic :: Office/Business', | |
| 133 'Topic :: Software Development :: Bug Tracking', | |
| 134 ], | |
|
3719
a8835786ecf7
*** empty log message ***
Richard Jones <richard@users.sourceforge.net>
parents:
3588
diff
changeset
|
135 |
| 4068 | 136 # Override certain command classes with our own ones |
| 137 cmdclass= {'build_doc': build_doc, | |
| 138 'build_scripts': build_scripts, | |
| 139 'build_py': build_py, | |
| 140 'build': build, | |
| 141 'bdist_rpm': bdist_rpm, | |
| 142 }, | |
| 143 packages=packagelist, | |
| 144 py_modules=py_modules, | |
| 145 scripts=roundup_scripts, | |
| 146 data_files=installdatafiles) | |
|
78
edcca72de643
first cut at setup.py - installs the package, but not the bin/cgi-bin yet
Anthony Baxter <anthonybaxter@users.sourceforge.net>
parents:
diff
changeset
|
147 |
|
1576
80519db85eac
More tweaks to the licensing to make the Debian folks happy :)
Richard Jones <richard@users.sourceforge.net>
parents:
1461
diff
changeset
|
148 if __name__ == '__main__': |
|
1640
d0b29215aa44
pre-release stuff
Richard Jones <richard@users.sourceforge.net>
parents:
1619
diff
changeset
|
149 main() |
|
1576
80519db85eac
More tweaks to the licensing to make the Debian folks happy :)
Richard Jones <richard@users.sourceforge.net>
parents:
1461
diff
changeset
|
150 |
|
2684
94229a0832bd
install extensions directories in tracker templates.
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2448
diff
changeset
|
151 # vim: set filetype=python sts=4 sw=4 et si : |
