summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw2007-07-18 22:55:07 -0400
committerBarry Warsaw2007-07-18 22:55:07 -0400
commit6b9a4a8a6549558127dd7b8bbb1fd4362716732c (patch)
tree9b5add16e1e6b0597c2e870ec97a2101b4c4441d
parent50d84950d1060129da8eb3c3c490a7395b0837e5 (diff)
downloadmailman-6b9a4a8a6549558127dd7b8bbb1fd4362716732c.tar.gz
mailman-6b9a4a8a6549558127dd7b8bbb1fd4362716732c.tar.zst
mailman-6b9a4a8a6549558127dd7b8bbb1fd4362716732c.zip
The Mailman/bin package's __all__ now contains the list of all command line
scripts, and setup will use this to create the console_scripts list. Put the scripts in their own bin directory so that the installation directory isn't all cluttered up. While the reduced clutter is great, the downside is that PYTHONPATH has to be specified, and 'bin' should really be configurable.
-rw-r--r--Mailman/bin/__init__.py59
-rw-r--r--setup.py6
2 files changed, 63 insertions, 2 deletions
diff --git a/Mailman/bin/__init__.py b/Mailman/bin/__init__.py
index e69de29bb..1b1ec6c71 100644
--- a/Mailman/bin/__init__.py
+++ b/Mailman/bin/__init__.py
@@ -0,0 +1,59 @@
+# Copyright (C) 2007 by the Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+
+__all__ = [
+ 'add_members',
+ 'arch',
+ 'bounces',
+ 'bumpdigests',
+ 'change_pw',
+ 'check_perms',
+ 'checkdbs',
+ 'config_list',
+ 'confirm',
+ 'disabled',
+ 'dumpdb',
+ 'export',
+ 'find_member',
+ 'gate_news',
+ 'genaliases',
+ 'import',
+ 'inject',
+ 'join',
+ 'leave',
+ 'list_lists',
+ 'list_members',
+ 'list_owners',
+ 'mailmanctl',
+ 'make_instance',
+ 'mmsitepass',
+ 'newlist',
+ 'nightly_gzip',
+ 'owner',
+ 'post',
+ 'qrunner',
+ 'request',
+ 'rmlist',
+ 'senddigests',
+ 'show_config',
+ 'show_qfiles',
+ 'testall',
+ 'unshunt',
+ 'update',
+ 'version',
+ 'withlist',
+ ]
diff --git a/setup.py b/setup.py
index 129d205a8..a5275da85 100644
--- a/setup.py
+++ b/setup.py
@@ -20,6 +20,7 @@ ez_setup.use_setuptools()
import sys
from string import Template
+import Mailman.bin
from Mailman.Version import VERSION as __version__
from setuptools import setup, find_packages
@@ -51,10 +52,11 @@ for dirpath, dirnames, filenames in os.walk(start_dir):
-template = Template('$script = Mailman.bin.$script:main')
+# XXX The 'bin/' prefix here should be configurable.
+template = Template('bin/$script = Mailman.bin.$script:main')
scripts = set(
template.substitute(script=os.path.splitext(script)[0])
- for script in os.listdir(os.path.join('Mailman', 'bin'))
+ for script in Mailman.bin.__all__
if not script.startswith('_')
)