summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchipx86 <chipx86@5efc13c4-1f27-0410-8691-ff2d1f55687e>2009-07-18 21:55:11 +0000
committerchipx86 <chipx86@5efc13c4-1f27-0410-8691-ff2d1f55687e>2009-07-18 21:55:11 +0000
commitb431db585ae7a132bc9764b64770f86a61569ddf (patch)
treef18a11250fe5482ec8542cd350e2ccae50dd213f
parent800a8edf576c2b4fa59c5796ee7aa74cc0da5c4d (diff)
Install post-review as a Python module, with a generated post-review (or
post-review.exe) wrapping it. The official way to install post-review now is by installing RBTools. Reviewed at http://reviews.review-board.org/r/916/
-rw-r--r--rbtools/__init__.py0
-rwxr-xr-xrbtools/postreview.py (renamed from scripts/post-review)6
-rwxr-xr-xsetup.py11
3 files changed, 10 insertions, 7 deletions
diff --git a/rbtools/__init__.py b/rbtools/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/rbtools/__init__.py
diff --git a/scripts/post-review b/rbtools/postreview.py
index fb65e41..f266378 100755
--- a/scripts/post-review
+++ b/rbtools/postreview.py
@@ -2423,7 +2423,7 @@ def determine_client():
return (repository_info, tool)
-def main(args):
+def main():
if 'USERPROFILE' in os.environ:
homepath = os.path.join(os.environ["USERPROFILE"], "Local Settings",
"Application Data")
@@ -2437,7 +2437,7 @@ def main(args):
load_config_file(os.path.join(homepath, ".reviewboardrc"))
cookie_file = os.path.join(homepath, ".post-review-cookies.txt")
- args = parse_options(args)
+ args = parse_options(sys.argv[1:])
repository_info, tool = determine_client()
@@ -2494,4 +2494,4 @@ def main(args):
if __name__ == "__main__":
- main(sys.argv[1:])
+ main()
diff --git a/setup.py b/setup.py
index ec6d1d8..d848d23 100755
--- a/setup.py
+++ b/setup.py
@@ -40,14 +40,17 @@ else:
setup(name="RBTools",
version=VERSION,
license="MIT",
- description="Command line applications for use with Review Board",
- scripts=[
- "scripts/post-review",
- ],
+ description="Command line tools for use with Review Board",
+ entry_points = {
+ 'console_scripts': [
+ 'post-review = rbtools.postreview:main',
+ ],
+ },
install_requires=['simplejson'],
dependency_links = [
download_url,
],
+ packages=find_packages(),
include_package_data=True,
maintainer="Christian Hammond",
maintainer_email="chipx86@chipx86.com",