1 | diff -r 7a10069855c4 setup.py |
---|
2 | --- a/setup.py Thu Jul 30 17:17:53 2009 -0700 |
---|
3 | +++ b/setup.py Fri Sep 04 20:49:04 2009 -0600 |
---|
4 | @@ -48,21 +48,39 @@ object reference system, and a capabilit |
---|
5 | |
---|
6 | 'packages': ["foolscap", "foolscap/slicers", "foolscap/logging", |
---|
7 | "foolscap/appserver", "foolscap/test"], |
---|
8 | - 'scripts': ["bin/flogtool", "bin/flappserver", "bin/flappclient"], |
---|
9 | } |
---|
10 | + |
---|
11 | +use_console_scripts = None |
---|
12 | |
---|
13 | try: |
---|
14 | # If setuptools is installed, then we'll add setuptools-specific |
---|
15 | # arguments to the setup args. |
---|
16 | import setuptools |
---|
17 | except ImportError: |
---|
18 | - pass |
---|
19 | + use_console_scripts = False |
---|
20 | else: |
---|
21 | setup_args['install_requires'] = ['twisted >= 2.4.0'] |
---|
22 | setup_args['extras_require'] = { 'secure_connections' : ["pyOpenSSL"] } |
---|
23 | # note that pyOpenSSL-0.7 and recent Twisted causes unit test failures, |
---|
24 | # see bug #62 |
---|
25 | |
---|
26 | + # Some old Linux distribution stripped the .egg-info files from |
---|
27 | + # some python packages. (Hardy and Lenny don't have this problem, nor |
---|
28 | + # does Fedora going back at least to Fedora 9.) |
---|
29 | + import platform |
---|
30 | + if platform.system() == 'Linux': |
---|
31 | + use_console_scripts = False |
---|
32 | + else: |
---|
33 | + use_console_scripts = True |
---|
34 | + |
---|
35 | +if use_console_scripts: |
---|
36 | + setup_args['entry_points'] = { 'console_scripts': [ |
---|
37 | + 'flogtool = foolscap.logging.cli:run_flogtool', |
---|
38 | + 'flappserver = foolscap.appserver.cli:run_flappserver', |
---|
39 | + 'flappclient = foolscap.appserver.client:run_flappclient', |
---|
40 | + ] } |
---|
41 | +else: |
---|
42 | + setup_args['scripts'] = ["bin/flogtool", "bin/flappserver", "bin/flappclient"] |
---|
43 | + |
---|
44 | if __name__ == '__main__': |
---|
45 | setup(**setup_args) |
---|
46 | - |
---|