Merge lp:~mandel/ubuntuone-dev-tools/give-me-batch into lp:ubuntuone-dev-tools

Proposed by Manuel de la Peña
Status: Merged
Approved by: Roberto Alsina
Approved revision: 57
Merged at revision: 54
Proposed branch: lp:~mandel/ubuntuone-dev-tools/give-me-batch
Merge into: lp:ubuntuone-dev-tools
Diff against target: 86 lines (+45/-4)
4 files modified
bin/u1lint.bat (+17/-0)
bin/u1trial.bat (+17/-0)
run-tests (+1/-1)
setup.py (+10/-3)
To merge this branch: bzr merge lp:~mandel/ubuntuone-dev-tools/give-me-batch
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Diego Sarmentero (community) Approve
Review via email: mp+88342@code.launchpad.net

Commit message

This branch provides the batch scripts that allow to execute u1trial and u1lint without the need of calling python as long as the C:\Python27\Scripts has been added to the search path.

Description of the change

This branch provides the batch scripts that allow to execute u1trial and u1lint without the need of calling python as long as the C:\Python27\Scripts has been added to the search path.

This makes the executing from being:

python C:\Python27\Scripts\u1trial path_to_tests

to

u1trial path_to_tests.

To post a comment you must log in.
55. By Manuel de la Peña

Added the missing scripts.

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

== Python Lint Notices ==

bin/u1lint:
    237: [W0511] XXX Testing that W0511 does not cause a failure
    237: [W0511] XXX Testing that W0511 does not cause a failure

setup.py:
    47: [C0322] Operator not preceded by a space
           ^
             'bin/u1trial',]
    47: [C0103] Invalid name "scripts" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)

review: Needs Fixing
56. By Manuel de la Peña

Fixed the style issues.

57. By Manuel de la Peña

Cleaned style issues and ensure that .bat files are not checked for style.

Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1
Tests OK, Test it IRL ok.

Great! :D

review: Approve
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1 nice!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'bin/u1lint.bat'
2--- bin/u1lint.bat 1970-01-01 00:00:00 +0000
3+++ bin/u1lint.bat 2012-01-12 12:16:05 +0000
4@@ -0,0 +1,17 @@
5+::
6+:: Copyright 2012 Canonical Ltd.
7+::
8+:: This program is free software: you can redistribute it and/or modify it
9+:: under the terms of the GNU General Public License version 3, as published
10+:: by the Free Software Foundation.
11+::
12+:: This program is distributed in the hope that it will be useful, but
13+:: WITHOUT ANY WARRANTY; without even the implied warranties of
14+:: MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15+:: PURPOSE. See the GNU General Public License for more details.
16+::
17+:: You should have received a copy of the GNU General Public License along
18+:: with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+:: Use python to execute the script having the same name as this batch
21+python "%~dpn0" %*
22
23=== added file 'bin/u1trial.bat'
24--- bin/u1trial.bat 1970-01-01 00:00:00 +0000
25+++ bin/u1trial.bat 2012-01-12 12:16:05 +0000
26@@ -0,0 +1,17 @@
27+::
28+:: Copyright 2012 Canonical Ltd.
29+::
30+:: This program is free software: you can redistribute it and/or modify it
31+:: under the terms of the GNU General Public License version 3, as published
32+:: by the Free Software Foundation.
33+::
34+:: This program is distributed in the hope that it will be useful, but
35+:: WITHOUT ANY WARRANTY; without even the implied warranties of
36+:: MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
37+:: PURPOSE. See the GNU General Public License for more details.
38+::
39+:: You should have received a copy of the GNU General Public License along
40+:: with this program. If not, see <http://www.gnu.org/licenses/>.
41+
42+:: Use python to execute the script having the same name as this batch
43+python "%~dpn0" %*
44
45=== modified file 'run-tests'
46--- run-tests 2011-11-29 17:42:55 +0000
47+++ run-tests 2012-01-12 12:16:05 +0000
48@@ -20,6 +20,6 @@
49 bin/u1trial --reactor=twisted ubuntuone
50 echo "Running style checks..."
51 bin/u1lint
52-pep8 --repeat . bin/*
53+pep8 --repeat . bin/* --exclude=*.bat
54 rm -rf _trial_temp
55 rm -rf .coverage
56
57=== modified file 'setup.py'
58--- setup.py 2012-01-09 21:03:29 +0000
59+++ setup.py 2012-01-12 12:16:05 +0000
60@@ -44,6 +44,15 @@
61 if retcode != 0:
62 sys.exit(retcode)
63
64+# pylint: disable=C0103
65+scripts = ['bin/u1lint',
66+ 'bin/u1trial']
67+# pylint: enable=C0103
68+
69+if sys.platform == 'win32':
70+ # lets add the .bat so that windows users are happy
71+ scripts.extend(['bin/u1lint.bat', 'bin/u1trial.bat'])
72+
73 setup(name=PACKAGE,
74 version=VERSION,
75 description='Ubuntu One development tools and utilities',
76@@ -55,9 +64,7 @@
77 'ubuntuone.devtools.testing',
78 'ubuntuone.devtools.testcases'],
79 extra_path='ubuntuone-dev-tools',
80- scripts=['bin/u1lint',
81- 'bin/u1trial',
82- ],
83+ scripts=scripts,
84 data_files=[('share/%s' % PACKAGE,
85 ['pylintrc',
86 'data/dbus-session.conf.in',

Subscribers

People subscribed via source and target branches

to all changes: