annotate setup.py @ 8513:d7d91e25a1c2

chore(build): bump anchore/scan-action from 7.2.3 to 7.3.0 pull #80
author John Rouillard <rouilj@ieee.org>
date Tue, 27 Jan 2026 21:41:37 -0500
parents 3648c5ae2c25
children 9c3ec0a5c7fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
4717
9dc50be521ee Make roundup play nice with setup tools (for using with virtualenv)
Pradip Caulagi <caulagi@gmail.com>
parents: 4693
diff changeset
2 # -*- coding: utf-8 -*-
213
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 210
diff changeset
3 #
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 210
diff changeset
4 # 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
5 # 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
6 # 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
7 # 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
8 #
214
18134bffab37 stupid typo
Richard Jones <richard@users.sourceforge.net>
parents: 213
diff changeset
9 # 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
10 # 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
11 # 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
12 # POSSIBILITY OF SUCH DAMAGE.
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 210
diff changeset
13 #
4950
16cb37d93ec6 Put back accidentally removed line from setup.py header
anatoly techtonik <techtonik@gmail.com>
parents: 4937
diff changeset
14 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
213
d45384bc6420 Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents: 210
diff changeset
15 # 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
16 # 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
17 # 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
18 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2300
e98bb674cb7d binary distribution includes compiled message catalogs
Alexander Smishlajev <a1s@users.sourceforge.net>
parents: 2253
diff changeset
19 #
85
fe0b33370244 Made setup.py executable, added id and log.
Richard Jones <richard@users.sourceforge.net>
parents: 78
diff changeset
20
7931
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
21 from __future__ import print_function
4033
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
22
7931
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
23 import os
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
24 import sys
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
25 from glob import glob
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
26 from sysconfig import get_path
4717
9dc50be521ee Make roundup play nice with setup tools (for using with virtualenv)
Pradip Caulagi <caulagi@gmail.com>
parents: 4693
diff changeset
27
6378
b57c3d50505b issue2550899 Migrate setup.py to setuptools
John Rouillard <rouilj@ieee.org>
parents: 6376
diff changeset
28 from setuptools 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
29
7931
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
30 from roundup.dist.command.bdist_rpm import bdist_rpm
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
31 from roundup.dist.command.build import build, list_message_files
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
32 from roundup.dist.command.build_doc import build_doc
bc45c3df770a chore(ruff): format setup.py imports.
John Rouillard <rouilj@ieee.org>
parents: 7930
diff changeset
33 from roundup.dist.command.install_lib import install_lib
593
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents: 580
diff changeset
34
1320
3758a5af985f Lots of little fixes in this update:
Richard Jones <richard@users.sourceforge.net>
parents: 1287
diff changeset
35
4033
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
36 def include(d, e):
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
37 """Generate a pair of (directory, file-list) for installation.
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
38
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
39 'd' -- A directory
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
40
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
41 'e' -- A glob pattern"""
4110
435cce827b40 additional fix to handle Unauthorised in file serving
Richard Jones <richard@users.sourceforge.net>
parents: 4105
diff changeset
42
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
43 return (d, [f for f in glob('%s/%s' % (d, e)) if os.path.isfile(f)])
4033
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
44
6378
b57c3d50505b issue2550899 Migrate setup.py to setuptools
John Rouillard <rouilj@ieee.org>
parents: 6376
diff changeset
45
b57c3d50505b issue2550899 Migrate setup.py to setuptools
John Rouillard <rouilj@ieee.org>
parents: 6376
diff changeset
46 def mapscript(path):
593
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 """
6378
b57c3d50505b issue2550899 Migrate setup.py to setuptools
John Rouillard <rouilj@ieee.org>
parents: 6376
diff changeset
50 module = os.path.splitext(os.path.basename(path))[0]
b57c3d50505b issue2550899 Migrate setup.py to setuptools
John Rouillard <rouilj@ieee.org>
parents: 6376
diff changeset
51 script = module.replace('_', '-')
b57c3d50505b issue2550899 Migrate setup.py to setuptools
John Rouillard <rouilj@ieee.org>
parents: 6376
diff changeset
52 return '%s = roundup.scripts.%s:run' % (script, module)
b57c3d50505b issue2550899 Migrate setup.py to setuptools
John Rouillard <rouilj@ieee.org>
parents: 6376
diff changeset
53
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
54
7933
8bf56686f763 fix: setup.py change again. Make data files relative.
John Rouillard <rouilj@ieee.org>
parents: 7932
diff changeset
55 def make_data_files_absolute(data_files, prefix, enable=False):
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
56 """Using setuptools data files are put under the egg install directory
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
57 if the datafiles are relative paths. We don't want this. Data files
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
58 like man pages, documentation, templates etc. should be installed
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
59 in a directory outside of the install directory. So we prefix
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
60 all datafiles making them absolute so man pages end up in places
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
61 like: /usr/local/share/man, docs in /usr/local/share/doc/roundup,
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
62 templates in /usr/local/share/roundup/templates.
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
63 """
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
64 new_data_files = [ (os.path.join(prefix,df[0]),df[1])
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
65 for df in data_files ]
7933
8bf56686f763 fix: setup.py change again. Make data files relative.
John Rouillard <rouilj@ieee.org>
parents: 7932
diff changeset
66 if enable:
8bf56686f763 fix: setup.py change again. Make data files relative.
John Rouillard <rouilj@ieee.org>
parents: 7932
diff changeset
67 return new_data_files
8bf56686f763 fix: setup.py change again. Make data files relative.
John Rouillard <rouilj@ieee.org>
parents: 7932
diff changeset
68 return data_files
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
69
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
70
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
71 def get_prefix():
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
72 """Get site specific prefix using --prefix, platform lib or
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
73 sys.prefix.
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
74 """
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
75 prefix_arg = False
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
76 prefix = ""
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
77 for a in sys.argv:
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
78 if prefix_arg:
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
79 prefix = a
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
80 break
8178
a73c88154a68 bug: handle case where argv[0] is invoked by setuptools-py2cfg
John Rouillard <rouilj@ieee.org>
parents: 8069
diff changeset
81
a73c88154a68 bug: handle case where argv[0] is invoked by setuptools-py2cfg
John Rouillard <rouilj@ieee.org>
parents: 8069
diff changeset
82 # argv[0] can be a PosixPath when setup.py
a73c88154a68 bug: handle case where argv[0] is invoked by setuptools-py2cfg
John Rouillard <rouilj@ieee.org>
parents: 8069
diff changeset
83 # is invoked by setuptools-py2cfg
a73c88154a68 bug: handle case where argv[0] is invoked by setuptools-py2cfg
John Rouillard <rouilj@ieee.org>
parents: 8069
diff changeset
84 if not isinstance(a, str):
a73c88154a68 bug: handle case where argv[0] is invoked by setuptools-py2cfg
John Rouillard <rouilj@ieee.org>
parents: 8069
diff changeset
85 continue
a73c88154a68 bug: handle case where argv[0] is invoked by setuptools-py2cfg
John Rouillard <rouilj@ieee.org>
parents: 8069
diff changeset
86
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
87 # is there a short form -p or something for this??
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
88 if a.startswith('--prefix'):
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
89 if a == '--prefix':
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
90 # next argument is prefix
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
91 prefix_arg = True
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
92 continue
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
93 # strip '--prefix='
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
94 prefix = a[9:]
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
95 if prefix:
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
96 return prefix
7695
2be7a8f66ea7 fix: windows install using pip mislocates share directory
John Rouillard <rouilj@ieee.org>
parents: 7651
diff changeset
97
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
98 if sys.platform.startswith('win'):
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
99 # on windows, using pip to install and
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
100 # prefixing data file paths with c:\path\a\b\...
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
101 # results in treatment as a relative path.
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
102 # The result is files are buried under:
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
103 # platlib\path\a\b\...\share\ and not findable by
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
104 # Roundup. So return no prefix which places the files at
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
105 # platlib\share\{doc,locale,roundup} where roundup can
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
106 # find templates/translations etc.
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
107 # sigh....
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
108 return ""
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
109
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
110 # start with the platform library
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
111 plp = get_path('platlib')
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
112 # nuke suffix that matches lib/* and return prefix
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
113 head, tail = os.path.split(plp)
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
114 old_head = None
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
115 while tail.lower() not in ['lib', 'lib64'] and head != old_head:
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
116 old_head = head
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
117 head, tail = os.path.split(head)
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
118 if head == old_head:
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
119 head = sys.prefix
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
120 return head
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
121
593
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents: 580
diff changeset
122
1576
80519db85eac More tweaks to the licensing to make the Debian folks happy :)
Richard Jones <richard@users.sourceforge.net>
parents: 1461
diff changeset
123 def main():
753
938edfdeac6e Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents: 675
diff changeset
124 # template munching
4096
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
125 packages = [
753
938edfdeac6e Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents: 675
diff changeset
126 '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
127 'roundup.anypy',
7651
d3d685dab459 build: add vendored package to setup.py.
John Rouillard <rouilj@ieee.org>
parents: 7633
diff changeset
128 'roundup.anypy.vendored',
1059
3f20880c2a7e additional packages
Richard Jones <richard@users.sourceforge.net>
parents: 937
diff changeset
129 'roundup.cgi',
3f20880c2a7e additional packages
Richard Jones <richard@users.sourceforge.net>
parents: 937
diff changeset
130 'roundup.cgi.PageTemplates',
3f20880c2a7e additional packages
Richard Jones <richard@users.sourceforge.net>
parents: 937
diff changeset
131 'roundup.cgi.TAL',
3f20880c2a7e additional packages
Richard Jones <richard@users.sourceforge.net>
parents: 937
diff changeset
132 'roundup.cgi.ZTUtils',
753
938edfdeac6e Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents: 675
diff changeset
133 'roundup.backends',
2776
10e96f3ee658 install demo.py as a module in roundup package.
Alexander Smishlajev <a1s@users.sourceforge.net>
parents: 2684
diff changeset
134 'roundup.scripts',
6376
4e48a6a40bfe Install roundup.test with setup.py
Ralf Schlatterbeck <rsc@runtux.com>
parents: 6285
diff changeset
135 'roundup.test',
753
938edfdeac6e Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents: 675
diff changeset
136 ]
437
a1e778940f92 Install html template files to share/roundup/templates
Jürgen Hermann <jhermann@users.sourceforge.net>
parents: 402
diff changeset
137
4096
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
138 # build list of scripts from their implementation modules
6378
b57c3d50505b issue2550899 Migrate setup.py to setuptools
John Rouillard <rouilj@ieee.org>
parents: 6376
diff changeset
139 scripts = [mapscript(f) for f in glob('roundup/scripts/[!_]*.py')]
4096
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
140
6745
3c198cd7c24e Install frontends as data files similar to roundup.cgi
John Rouillard <rouilj@ieee.org>
parents: 6736
diff changeset
141 # build list of zope files/directories
3c198cd7c24e Install frontends as data files similar to roundup.cgi
John Rouillard <rouilj@ieee.org>
parents: 6736
diff changeset
142 Zope = {}
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
143 Zope['module'] = list(glob('frontends/ZRoundup/*.py'))
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
144 Zope['module'].append('frontends/ZRoundup/refresh.txt')
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
145 Zope['icons'] = list(glob('frontends/ZRoundupscripts/*.gif'))
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
146 Zope['dtml'] = list(glob('frontends/ZRoundupscripts/*.dtml'))
6745
3c198cd7c24e Install frontends as data files similar to roundup.cgi
John Rouillard <rouilj@ieee.org>
parents: 6736
diff changeset
147
4096
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
148 data_files = [
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
149 ('share/roundup/cgi-bin', ['frontends/roundup.cgi']),
6745
3c198cd7c24e Install frontends as data files similar to roundup.cgi
John Rouillard <rouilj@ieee.org>
parents: 6736
diff changeset
150 ('share/roundup/frontends', ['frontends/wsgi.py']),
7309
577ffdb76754 Change name of installed frontends/Zope to frontends/Zroundup
John Rouillard <rouilj@ieee.org>
parents: 6787
diff changeset
151 ('share/roundup/frontends/ZRoundup', Zope['module']),
577ffdb76754 Change name of installed frontends/Zope to frontends/Zroundup
John Rouillard <rouilj@ieee.org>
parents: 6787
diff changeset
152 ('share/roundup/frontends/ZRoundup/icons', Zope['icons']),
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
153 ('share/roundup/frontends/ZRoundup/dtml', Zope['dtml']),
4096
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
154 ]
1419
c717b8d63a7e included UN*X manual pages from Bastian Kleineidam
Richard Jones <richard@users.sourceforge.net>
parents: 1320
diff changeset
155 # 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
156 if os.name == 'posix':
4096
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
157 data_files.append(include('share/man/man1', '*'))
1419
c717b8d63a7e included UN*X manual pages from Bastian Kleineidam
Richard Jones <richard@users.sourceforge.net>
parents: 1320
diff changeset
158
1591
21312a7564fd moving templates around
Richard Jones <richard@users.sourceforge.net>
parents: 1587
diff changeset
159 # add the templates to the data files lists
1918
Richard Jones <richard@users.sourceforge.net>
parents: 1873
diff changeset
160 from roundup.init import listTemplates
4099
3c0852dbcf39 Reformat to reduce line-length.
Stefan Seefeld <stefan@seefeld.name>
parents: 4096
diff changeset
161 templates = [t['path']
3c0852dbcf39 Reformat to reduce line-length.
Stefan Seefeld <stefan@seefeld.name>
parents: 4096
diff changeset
162 for t in listTemplates('share/roundup/templates').values()]
1591
21312a7564fd moving templates around
Richard Jones <richard@users.sourceforge.net>
parents: 1587
diff changeset
163 for tdir in templates:
4755
d2f58accb405 - Copy layout to the html directory
Pradip Caulagi <caulagi@gmail.com>
parents: 4717
diff changeset
164 for idir in '. detectors extensions html html/layout static'.split():
4096
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
165 data_files.append(include(os.path.join(tdir, idir), '*'))
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
166
2300
e98bb674cb7d binary distribution includes compiled message catalogs
Alexander Smishlajev <a1s@users.sourceforge.net>
parents: 2253
diff changeset
167 # add message files
2332
804c5c735bf1 don't compile message catalogs...
Alexander Smishlajev <a1s@users.sourceforge.net>
parents: 2316
diff changeset
168 for (_dist_file, _mo_file) in list_message_files():
4099
3c0852dbcf39 Reformat to reduce line-length.
Stefan Seefeld <stefan@seefeld.name>
parents: 4096
diff changeset
169 data_files.append((os.path.dirname(_mo_file),
3c0852dbcf39 Reformat to reduce line-length.
Stefan Seefeld <stefan@seefeld.name>
parents: 4096
diff changeset
170 [os.path.join("build", _mo_file)]))
2300
e98bb674cb7d binary distribution includes compiled message catalogs
Alexander Smishlajev <a1s@users.sourceforge.net>
parents: 2253
diff changeset
171
4033
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
172 # add docs
4100
26f840bce0c9 Further cleanup.
Stefan Seefeld <stefan@seefeld.name>
parents: 4099
diff changeset
173 data_files.append(include('share/doc/roundup/html', '*'))
4844
6ba2d471d76b setup.py now installs static files of the HTML documentation
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4796
diff changeset
174 data_files.append(include('share/doc/roundup/html/_images', '*'))
6ba2d471d76b setup.py now installs static files of the HTML documentation
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4796
diff changeset
175 data_files.append(include('share/doc/roundup/html/_sources', '*'))
6ba2d471d76b setup.py now installs static files of the HTML documentation
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4796
diff changeset
176 data_files.append(include('share/doc/roundup/html/_static', '*'))
4033
bca7c59ac400 Enhance documentation generation.
Stefan Seefeld <stefan@seefeld.name>
parents: 4012
diff changeset
177
6438
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
178 data_files = make_data_files_absolute(data_files, get_prefix())
b671ed2b49b2 2551143: Problem with installing external trackers ...
John Rouillard <rouilj@ieee.org>
parents: 6378
diff changeset
179
6573
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
180 # when running under python2, even if called from setup, it tries
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
181 # and fails to perform an egg easy install even though it shouldn't:
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
182 # https://issues.roundup-tracker.org/issue2551185
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
183 # Add this argument if we are an install to prevent this.
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
184 # This works right under python3.
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
185 # FIXME there has to be a better way than this
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
186 # https://issues.roundup-tracker.org/issue2551185
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
187
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
188 if sys.version_info[0] < 3:
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
189 for arg in sys.argv:
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
190 if arg == 'install':
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
191 sys.argv.append('--old-and-unmanageable')
4b627102b344 - issue2551185 - must set PYTHONPATH=... python2 setup.py install --prefix=/tmp/r2.
John Rouillard <rouilj@ieee.org>
parents: 6572
diff changeset
192
753
938edfdeac6e Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents: 675
diff changeset
193 # perform the setup action
773
6e6c63a57df9 [SF#569415] {version]]
Richard Jones <richard@users.sourceforge.net>
parents: 753
diff changeset
194 from roundup import __version__
4110
435cce827b40 additional fix to handle Unauthorised in file serving
Richard Jones <richard@users.sourceforge.net>
parents: 4105
diff changeset
195
4495
53e438d1ca19 fix long_description again:
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4492
diff changeset
196 # long_description may not contain non-ascii characters. Distutils
53e438d1ca19 fix long_description again:
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4492
diff changeset
197 # will produce an non-installable installer on linux *and* we can't
53e438d1ca19 fix long_description again:
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4492
diff changeset
198 # run the bdist_wininst on Linux if there are non-ascii characters
53e438d1ca19 fix long_description again:
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4492
diff changeset
199 # because the distutils installer will try to use the mbcs codec
53e438d1ca19 fix long_description again:
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4492
diff changeset
200 # which isn't available on non-windows platforms. See also
53e438d1ca19 fix long_description again:
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4492
diff changeset
201 # http://bugs.python.org/issue10945
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
202 with open('doc/announcement.txt') as announcement:
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
203 long_description = announcement.read()
4492
5d43b2a5eb69 test that announcement.txt is pure ASCII...
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4436
diff changeset
204 try:
5026
8853f422fb62 Preparing 1.5.1 steps 4/16
anatoly techtonik <techtonik@gmail.com>
parents: 5021
diff changeset
205 # attempt to interpret string as 'ascii'
5451
fe1bd8f12a9f fixed encoding for long_description
Christof Meerwald <cmeerw@cmeerw.org>
parents: 5376
diff changeset
206 long_description.encode('ascii')
5248
198b6e810c67 Use Python-3-compatible 'as' syntax for except statements
Eric S. Raymond <esr@thyrsus.com>
parents: 5027
diff changeset
207 except UnicodeEncodeError as cause:
5376
64b05e24dbd8 Python 3 preparation: convert print to a function.
Joseph Myers <jsm@polyomino.org.uk>
parents: 5351
diff changeset
208 print("doc/announcement.txt contains non-ascii: %s"
64b05e24dbd8 Python 3 preparation: convert print to a function.
Joseph Myers <jsm@polyomino.org.uk>
parents: 5351
diff changeset
209 % cause, file=sys.stderr)
4492
5d43b2a5eb69 test that announcement.txt is pure ASCII...
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4436
diff changeset
210 sys.exit(42)
5d43b2a5eb69 test that announcement.txt is pure ASCII...
Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
parents: 4436
diff changeset
211
4068
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
212 setup(name='roundup',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
213 author="Richard Jones",
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
214 author_email="richard@users.sourceforge.net",
8379
3648c5ae2c25 build: prep for release.
John Rouillard <rouilj@ieee.org>
parents: 8347
diff changeset
215 classifiers=['Development Status :: 5 - Production/Stable',
3648c5ae2c25 build: prep for release.
John Rouillard <rouilj@ieee.org>
parents: 8347
diff changeset
216 #'Development Status :: 4 - Beta',
6137
eb9d00db0923 Forgot to check in changed doc files for 2.0.0beta0
John Rouillard <rouilj@ieee.org>
parents: 5949
diff changeset
217 #'Development Status :: 3 - Alpha',
4068
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
218 'Environment :: Console',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
219 'Environment :: Web Environment',
5949
573b688fffeb RELEASE.txt changes checkin pre 2.0.0alpha0
John Rouillard <rouilj@ieee.org>
parents: 5832
diff changeset
220 'Intended Audience :: Customer Service',
573b688fffeb RELEASE.txt changes checkin pre 2.0.0alpha0
John Rouillard <rouilj@ieee.org>
parents: 5832
diff changeset
221 'Intended Audience :: Information Technology',
4068
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
222 'Intended Audience :: End Users/Desktop',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
223 'Intended Audience :: Developers',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
224 'Intended Audience :: System Administrators',
6736
0b10732e09ee Fix typos, complete license declaration.
John Rouillard <rouilj@ieee.org>
parents: 6703
diff changeset
225 'License :: OSI Approved',
4690
9ead86b4fe71 setup.py: Fix trove classifier. Roundup uses MIT license, not PSF.
anatoly techtonik <techtonik@gmail.com>
parents: 4516
diff changeset
226 'License :: OSI Approved :: MIT License',
6787
01a6725f8485 fix classifier
John Rouillard <rouilj@ieee.org>
parents: 6782
diff changeset
227 'License :: OSI Approved :: Zope Public License',
7633
a426b5523aba fix: update licenses, add license to PKG-INFO
John Rouillard <rouilj@ieee.org>
parents: 7607
diff changeset
228 'License :: OSI Approved :: Python Software Foundation License',
4068
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
229 'Operating System :: MacOS :: MacOS X',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
230 'Operating System :: Microsoft :: Windows',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
231 'Operating System :: POSIX',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
232 'Programming Language :: Python',
5526
df3f553fa414 Update documentation for Python 3 support (issue 2550968, issue 2550980).
Joseph Myers <jsm@polyomino.org.uk>
parents: 5451
diff changeset
233 'Programming Language :: Python :: 3',
5832
f5a0fdb56784 Add python 3.7 classification as we are running that in CI.
John Rouillard <rouilj@ieee.org>
parents: 5830
diff changeset
234 'Programming Language :: Python :: 3.7',
5949
573b688fffeb RELEASE.txt changes checkin pre 2.0.0alpha0
John Rouillard <rouilj@ieee.org>
parents: 5832
diff changeset
235 'Programming Language :: Python :: 3.8',
6285
4ba52f16276a Add python 3.9 to classifiers in setup.py.
John Rouillard <rouilj@ieee.org>
parents: 6264
diff changeset
236 'Programming Language :: Python :: 3.9',
6695
b3ba03d2b214 2.2.0b1 release changes
John Rouillard <rouilj@ieee.org>
parents: 6573
diff changeset
237 'Programming Language :: Python :: 3.10',
7442
623502678b97 2.3.0b1 release changes
John Rouillard <rouilj@ieee.org>
parents: 7309
diff changeset
238 'Programming Language :: Python :: 3.11',
623502678b97 2.3.0b1 release changes
John Rouillard <rouilj@ieee.org>
parents: 7309
diff changeset
239 'Programming Language :: Python :: 3.12',
8002
a377590eba34 changes for 2.4.0b0 release
John Rouillard <rouilj@ieee.org>
parents: 7933
diff changeset
240 'Programming Language :: Python :: 3.13',
7930
0127045f573b feat: allow pip install roundup[jinja2,extras,test,charting]
John Rouillard <rouilj@ieee.org>
parents: 7695
diff changeset
241 'Programming Language :: Python :: Implementation :: CPython',
4068
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
242 'Topic :: Communications :: Email',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
243 'Topic :: Office/Business',
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
244 'Topic :: Software Development :: Bug Tracking',
5949
573b688fffeb RELEASE.txt changes checkin pre 2.0.0alpha0
John Rouillard <rouilj@ieee.org>
parents: 5832
diff changeset
245 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
4068
e233d7a66343 Refactor setup.py.
Stefan Seefeld <stefan@seefeld.name>
parents: 4033
diff changeset
246 ],
8347
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
247 # Override certain command classes with our own ones
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
248 cmdclass={'build_doc': build_doc,
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
249 'build': build,
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
250 'bdist_rpm': bdist_rpm,
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
251 'install_lib': install_lib,
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
252 },
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
253 data_files=data_files,
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
254 description="A simple-to-use and -install issue-tracking system"
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
255 " with command-line, web and e-mail interfaces. Highly"
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
256 " customisable.",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
257 download_url='https://pypi.org/project/roundup',
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
258 entry_points={
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
259 'console_scripts': scripts,
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
260 },
7930
0127045f573b feat: allow pip install roundup[jinja2,extras,test,charting]
John Rouillard <rouilj@ieee.org>
parents: 7695
diff changeset
261 extras_require={
0127045f573b feat: allow pip install roundup[jinja2,extras,test,charting]
John Rouillard <rouilj@ieee.org>
parents: 7695
diff changeset
262 "charting": ['pygal'],
0127045f573b feat: allow pip install roundup[jinja2,extras,test,charting]
John Rouillard <rouilj@ieee.org>
parents: 7695
diff changeset
263 "jinja2": ['jinja2'],
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
264 "extras": ['brotli', 'pytz'],
7930
0127045f573b feat: allow pip install roundup[jinja2,extras,test,charting]
John Rouillard <rouilj@ieee.org>
parents: 7695
diff changeset
265 "test": ['pytest > 7.0.0'],
0127045f573b feat: allow pip install roundup[jinja2,extras,test,charting]
John Rouillard <rouilj@ieee.org>
parents: 7695
diff changeset
266 },
8347
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
267 license="OSI Approved: MIT License, Zope Public License,"
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
268 " Python Software Foundation License",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
269 long_description=long_description,
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
270 long_description_content_type='text/x-rst',
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
271 maintainer="Ralf Schlatterbeck",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
272 maintainer_email="rsc@runtux.com",
4096
ab542607f2fb Move man pages into 'share/man/man1' and simplify setup.py
Stefan Seefeld <stefan@seefeld.name>
parents: 4089
diff changeset
273 packages=packages,
8347
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
274 project_urls={
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
275 "Documentation": "https://roundup-tracker.org/docs.html",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
276 "Changelog": "https://sourceforge.net/p/roundup/code/ci/tip/tree/CHANGES.txt",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
277 "Contact": "https://roundup-tracker.org/contact.html",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
278 "IRC": "https://webchat.oftc.net/?randomnick=1&channels=roundup&prompt=1",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
279 "Issues": "https://issues.roundup-tracker.org/",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
280 "Licenses": "https://roundup-tracker.org/docs/license.html",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
281 "Wiki": "https://wiki.roundup-tracker.org/",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
282 },
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
283 python_requires=">=3.7",
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
284 url='https://www.roundup-tracker.org',
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
285 version=__version__,
e25a4e199568 build: prep for 2.5.0 - fix py versions, add links to pypi
John Rouillard <rouilj@ieee.org>
parents: 8328
diff changeset
286 )
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
287
7932
55229bfcdd8a chore(ruff): cleanup setup.py whitespace, comprehensions etc.
John Rouillard <rouilj@ieee.org>
parents: 7931
diff changeset
288
1576
80519db85eac More tweaks to the licensing to make the Debian folks happy :)
Richard Jones <richard@users.sourceforge.net>
parents: 1461
diff changeset
289 if __name__ == '__main__':
6524
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
290
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
291 # Prevent `pip install roundup` from building bdist_wheel.
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
292 # Man pages, templates, locales installed under site-packages not
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
293 # in normal system locations.
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
294 # https://stackoverflow.com/questions/36846260/can-python-setuptools-install-files-outside-dist-packages
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
295 '''
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
296 if 'bdist_wheel' in sys.argv:
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
297 raise RuntimeError("This setup.py does not support wheels")
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
298 '''
f961dbbc3573 issue2551167 roundup issues when using pip install
John Rouillard <rouilj@ieee.org>
parents: 6456
diff changeset
299
4896
756ff1c2ee41 Fix setting the working directory in setup.py
John Kristensen <john@jerrykan.com>
parents: 4894
diff changeset
300 os.chdir(os.path.dirname(__file__) or '.')
1640
d0b29215aa44 pre-release stuff
Richard Jones <richard@users.sourceforge.net>
parents: 1619
diff changeset
301 main()
1576
80519db85eac More tweaks to the licensing to make the Debian folks happy :)
Richard Jones <richard@users.sourceforge.net>
parents: 1461
diff changeset
302
2684
94229a0832bd install extensions directories in tracker templates.
Alexander Smishlajev <a1s@users.sourceforge.net>
parents: 2448
diff changeset
303 # vim: set filetype=python sts=4 sw=4 et si :

Roundup Issue Tracker: http://roundup-tracker.org/