diff -r f2bc95a71091 setup.py
--- a/setup.py	Wed Jun 24 17:21:48 2009 -0700
+++ b/setup.py	Sun Aug 16 14:15:53 2009 -0600
@@ -48,21 +48,43 @@
 
         'packages': ["foolscap", "foolscap/slicers", "foolscap/logging",
                      "foolscap/appserver", "foolscap/test"],
-        'scripts': ["bin/flogtool", "bin/flappserver", "bin/flappclient"],
 }
 
+use_console_scripts = None
+
 try:
     # If setuptools is installed, then we'll add setuptools-specific
     # arguments to the setup args.
     import setuptools
 except ImportError:
-    pass
+    use_console_scripts = False
 else:
     setup_args['install_requires'] = ['twisted >= 2.4.0']
     setup_args['extras_require'] = { 'secure_connections' : ["pyOpenSSL"] }
     # note that pyOpenSSL-0.7 and recent Twisted causes unit test failures,
     # see bug #62
 
+    # Now if setuptools is < 0.6c8 then we might be on an old Linux
+    # distribution where packages have had their .egg-info files stripped out.
+    # (Hardy and Lenny don't have this problem, and they each have
+    # setuptools-0.6c8.)
+    import pkg_resources # comes with setuptools
+    pv = pkg_resources.parse_version
+    if pv(setuptools.__version__) < pv("0.6c8"):
+        # Don't use the console_scripts feature -- it interacts badly with old
+        # Linux distributions that have stripped out the .egg-info files.
+        use_console_scripts = False
+    else:
+        use_console_scripts = True
+
+if use_console_scripts:
+    setup_args['entry_points'] = { 'console_scripts': [
+        'flogtool = foolscap.logging.cli:run_flogtool',
+        'flappserver = foolscap.appserver.cli:run_flappserver',
+        'flappclient = foolscap.appserver.client:run_flappclient',
+        ] }
+else:
+    setup_args['scripts'] = ["bin/flogtool", "bin/flappserver", "bin/flappclient"]
+
 if __name__ == '__main__':
     setup(**setup_args)
-
