summaryrefslogtreecommitdiffstats
path: root/python/which/setup.py
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /python/which/setup.py
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'python/which/setup.py')
-rw-r--r--python/which/setup.py70
1 files changed, 70 insertions, 0 deletions
diff --git a/python/which/setup.py b/python/which/setup.py
new file mode 100644
index 000000000..3f6d1072c
--- /dev/null
+++ b/python/which/setup.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+# Copyright (c) 2002-2005 ActiveState Corp.
+# Author: Trent Mick (TrentM@ActiveState.com)
+
+"""Distutils setup script for 'which'."""
+
+import sys
+import os
+import shutil
+from distutils.core import setup
+
+
+#---- support routines
+
+def _getVersion():
+ import which
+ return which.__version__
+
+def _getBinDir():
+ """Return the current Python's bindir."""
+ if sys.platform.startswith("win"):
+ bindir = sys.prefix
+ else:
+ bindir = os.path.join(sys.prefix, "bin")
+ return bindir
+
+
+#---- setup mainline
+
+if sys.platform == "win32":
+ scripts = []
+ binFiles = ["which.exe", "which.py"]
+else:
+ #XXX Disable installing which as a script on non-Windows platforms.
+ # It can get in the way of the system which.
+ #
+ #if os.path.exists("which"):
+ # os.remove("which")
+ #shutil.copy2("which.py", "which")
+ #scripts = ["which"]
+ binFiles = []
+ scripts = []
+
+setup(name="which",
+ version=_getVersion(),
+ description="a portable GNU which replacement",
+ author="Trent Mick",
+ author_email="TrentM@ActiveState.com",
+ url="http://trentm.com/projects/which/",
+ license="MIT License",
+ platforms=["Windows", "Linux", "Mac OS X", "Unix"],
+ long_description="""\
+This is a GNU which replacement with the following features:
+ - it is portable (Windows, Linux);
+ - it understands PATHEXT on Windows;
+ - it can print <em>all</em> matches on the PATH;
+ - it can note "near misses" on the PATH (e.g. files that match but
+ may not, say, have execute permissions; and
+ - it can be used as a Python module.
+""",
+ keywords=["which", "find", "path", "where"],
+
+ py_modules=['which'],
+ scripts=scripts,
+ # Install the Windows script/executable bits as data files with
+ # distutils chosen scripts install dir on Windows,
+ # "<prefix>/Scripts", is just wrong.
+ data_files=[ (_getBinDir(), binFiles) ],
+ )
+