Permalink
Browse files

installation related configuration

  • Loading branch information...
1 parent 9375e95 commit 80f90b17da17401ac45ea472ac9404f02baa5ce7 @mikahanninen mikahanninen committed Nov 28, 2012
Showing with 12 additions and 1 deletion.
  1. +7 −1 rfgen.py
  2. +5 −0 setup.py
View
@@ -284,7 +284,7 @@ def create_options_parser():
group1.add_option("-v", "--validity", dest="validity",help="Validity of test cases (1...0). To have ~80% passes give 0.8. [default: %default]", default=1)
group1.add_option("-e", "--testdepth", dest="testdepth", help="Average number of steps in a test case (2..) [default: %default]", default=3)
group2.add_option("-d", "--dir", dest="dir",help="Target directory for the test project [default: %default]", default="theproject")
- group2.add_option("-u", "--upgrade", help="Upgrade rfgen.py from the github", action="store_true", dest="upgrade", default=False)
+ group2.add_option("-u", "--upgrade", help="Upgrade rfgen.py from the github. Remember 'pip install with --upgrade' if you have pip installation.", action="store_true", dest="upgrade", default=False)
parser.add_option_group(group1)
parser.add_option_group(group2)
@@ -299,6 +299,11 @@ def main(options = None):
(options, args) = parser.parse_args()
if options.upgrade:
+ try:
+ with open('rfgen.py') as f: pass
+ except IOError as e:
+ print "You probably want to do 'pip install git+https://github.com/robotframework/Generator'"
+ sys.exit(0)
rfgen_url = "https://raw.github.com/robotframework/Generator/master/rfgen.py"
print "Updating rfgen.py from github."
f = open('rfgen.py','wb')
@@ -370,6 +375,7 @@ def format_help(self, formatter=None):
result.append(self.format_epilog(formatter))
return "".join(result)
+
# Global variables
start_time = None
end_time = None
View
@@ -11,4 +11,9 @@
license='LICENSE.txt',
description='Script which generates a test project containing test libraries, test suites and resources.',
long_description=open('README.md').read(),
+ entry_points = {
+ 'console_scripts': [
+ 'rfgen = rfgen:main_func'
+ ]
+ }
)

0 comments on commit 80f90b1

Please sign in to comment.