"Fossies" - the Fresh Open Source Software Archive 
Member "getmail-5.16/setup.py" (31 Oct 2021, 4249 Bytes) of package /linux/misc/getmail-5.16.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "setup.py" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
5.15_vs_5.16.
1 #!/usr/bin/env python2
2
3 import sys
4 if sys.hexversion < 0x2030300:
5 raise ImportError('getmail version 4 requires Python version 2.3.3 or later')
6
7 import os.path
8 from distutils.core import setup
9 import distutils.sysconfig
10
11 from getmailcore import __version__
12
13 #
14 # distutils doesn't seem to handle documentation files specially; they're
15 # just "data" files. The problem is, there's no easy way to say "install
16 # the doc files under <prefix>/doc/<package>-<version>/ (obeying any
17 # --home=<althome> or --prefix=<altprefix>, which would be "normal".
18 # This hacks around this limitation.
19 #
20 prefix = distutils.sysconfig.get_config_var('prefix')
21 datadir = None
22 args = sys.argv[1:]
23 for (pos, arg) in enumerate(args):
24 # hack hack hack
25 if arg.startswith('--prefix='):
26 # hack hack hack hack hack
27 prefix = arg.split('=', 1)[1]
28 elif arg == '--prefix':
29 # hack hack hack hack hack hack hack
30 prefix = args[pos + 1]
31 elif arg.startswith('--install-data='):
32 # hack hack hack hack hack
33 datadir = arg.split('=', 1)[1]
34 elif arg == '--install-data':
35 # hack hack hack hack hack hack hack
36 datadir = args[pos + 1]
37
38 GETMAILDOCDIR = os.path.join(
39 datadir or prefix,
40 'share',
41 'doc',
42 'getmail-%s' % __version__
43 )
44
45 GETMAILMANDIR = os.path.join(
46 datadir or prefix,
47 'share',
48 'man',
49 'man1'
50 )
51
52 if '--show-default-install-dirs' in args:
53 print 'Default installation directories:'
54 print ' scripts : %s' % distutils.sysconfig.get_config_var('BINDIR')
55 print ' Python modules : %s' % os.path.join(distutils.sysconfig.get_config_var('LIBP'), 'site-packages')
56 print ' documentation : %s' % GETMAILDOCDIR
57 print ' man(1) pages : %s' % GETMAILMANDIR
58 raise SystemExit()
59
60 setup(
61 name='getmail',
62 version=__version__,
63 description='a mail retrieval, sorting, and delivering system',
64 long_description=('getmail is a multi-protocol mail retrieval system with'
65 'support for simple and domain POP3 and IMAP4 mailboxes, domain SDPS '
66 'mailboxes, POP3-over-SSL and IMAP-over-SSL, mail sorting, message '
67 'filtering, and delivery to Maildirs, Mboxrd files, external MDAs, and '
68 'other advanced features.'),
69 author='Charles Cazabon',
70 author_email='charlesc-getmail@pyropus.ca',
71 license='GNU GPL version 2',
72 url='http://pyropus.ca/software/getmail/',
73 download_url='http://pyropus.ca/software/getmail/#download',
74 classifiers=[
75 'Development Status :: 4 - Beta',
76 'Environment :: Console',
77 'Intended Audience :: End Users/Desktop',
78 'Intended Audience :: System Administrators',
79 'License :: OSI Approved :: GNU General Public License (GPL)',
80 'Natural Language :: English',
81 'Operating System :: OS Independent',
82 'Operating System :: POSIX',
83 'Programming Language :: Python',
84 'Topic :: Communications :: Email',
85 'Topic :: Communications :: Email :: Filters',
86 'Topic :: Communications :: Email :: Post-Office :: IMAP',
87 'Topic :: Communications :: Email :: Post-Office :: POP3',
88 'Topic :: Software Development :: Libraries :: Python Modules',
89 'Topic :: Utilities',
90 ],
91 packages=[
92 'getmailcore'
93 ],
94 scripts=[
95 'getmail',
96 'getmail_fetch',
97 'getmail_maildir',
98 'getmail_mbox',
99 'getmail-gmail-xoauth-tokens',
100 ],
101 data_files=[
102 (GETMAILDOCDIR, [
103 './README',
104 './getmail.spec',
105 'docs/BUGS',
106 'docs/COPYING',
107 'docs/CHANGELOG',
108 'docs/TODO',
109 'docs/THANKS',
110 'docs/configuration.html',
111 'docs/configuration.txt',
112 'docs/documentation.html',
113 'docs/documentation.txt',
114 'docs/faq.html',
115 'docs/faq.txt',
116 'docs/getmaildocs.css',
117 'docs/getmailrc-examples',
118 'docs/troubleshooting.html',
119 'docs/troubleshooting.txt',
120 ]),
121 (GETMAILMANDIR, [
122 'docs/getmail.1',
123 'docs/getmail_fetch.1',
124 'docs/getmail_maildir.1',
125 'docs/getmail_mbox.1',
126 ]),
127 ],
128 )