Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
180
Issues
180
List
Boards
Labels
Milestones
Merge Requests
53
Merge Requests
53
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
75fef513
Commit
75fef513
authored
Jun 28, 2017
by
Laurent Bachelier
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: Factorize Python detection code
parent
ad9382f4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
96 deletions
+32
-96
tools/common.sh
tools/common.sh
+17
-0
tools/local_install.sh
tools/local_install.sh
+1
-17
tools/local_run.sh
tools/local_run.sh
+1
-17
tools/make_man.sh
tools/make_man.sh
+1
-17
tools/run_tests.sh
tools/run_tests.sh
+11
-28
tools/weboob_lint.sh
tools/weboob_lint.sh
+1
-17
No files found.
tools/common.sh
0 → 100644
View file @
75fef513
VER
=
2
if
[
"
$1
"
=
-3
]
;
then
VER
=
3
shift
fi
if
[
-z
"
${
PYTHON
}
"
]
;
then
which python
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
)
which python
$VER
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
$VER
)
if
[
$VER
-eq
2
]
;
then
which python2.7
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python2.7
)
else
which python3.4
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.4
)
which python3.5
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.5
)
which python3.6
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.6
)
fi
fi
tools/local_install.sh
View file @
75fef513
#!/bin/sh
set
-e
VER
=
2
if
[
"
$1
"
=
-3
]
;
then
VER
=
3
shift
fi
if
[
-z
"
${
PYTHON
}
"
]
;
then
which python
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
)
which python
$VER
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
$VER
)
if
[
$VER
-eq
2
]
;
then
which python2.7
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python2.7
)
else
which python3.4
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.4
)
which python3.5
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.5
)
which python3.6
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.6
)
fi
fi
.
"
$(
dirname
$0
)
/common.sh"
$PYTHON
"
$(
dirname
$0
)
/stale_pyc.py"
...
...
tools/local_run.sh
View file @
75fef513
#!/bin/sh
set
-e
VER
=
2
if
[
"
$1
"
=
-3
]
;
then
VER
=
3
shift
fi
if
[
-z
"
${
PYTHON
}
"
]
;
then
which python
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
)
which python
$VER
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
$VER
)
if
[
$VER
-eq
2
]
;
then
which python2.7
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python2.7
)
else
which python3.4
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.4
)
which python3.5
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.5
)
which python3.6
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.6
)
fi
fi
.
"
$(
dirname
$0
)
/common.sh"
$PYTHON
"
$(
dirname
$0
)
/stale_pyc.py"
...
...
tools/make_man.sh
View file @
75fef513
...
...
@@ -3,23 +3,7 @@
# stop on failure
set
-e
VER
=
2
if
[
"
$1
"
=
-3
]
;
then
VER
=
3
shift
fi
if
[
-z
"
${
PYTHON
}
"
]
;
then
which python
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
)
which python
$VER
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
$VER
)
if
[
$VER
-eq
2
]
;
then
which python2.7
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python2.7
)
else
which python3.4
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.4
)
which python3.5
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.5
)
which python3.6
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.6
)
fi
fi
.
"
$(
dirname
$0
)
/common.sh"
# Use C local to avoid local dates in headers
export
LANG
=
en_US.utf8
...
...
tools/run_tests.sh
View file @
75fef513
...
...
@@ -10,12 +10,19 @@
# stop on failure
set
-e
VER
=
2
if
[
"
$1
"
=
-3
]
;
then
VER
=
3
shift
.
"
$(
dirname
$0
)
/common.sh"
if
[
-z
"
${
PYTHON
}
"
]
;
then
echo
"Python required"
exit
1
fi
if
!
$PYTHON
-c
"import nose"
2>/dev/null
;
then
echo
"python-nose required"
exit
1
fi
# path to sources
WEBOOB_DIR
=
$(
cd
$(
dirname
$0
)
/..
&&
pwd
-P
)
...
...
@@ -61,30 +68,6 @@ else
WEBOOB_CI_TARGET
=
""
fi
# find executables
if
[
-z
"
${
PYTHON
}
"
]
;
then
which python
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
)
which python
$VER
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
$VER
)
if
[
$VER
-eq
2
]
;
then
which python2.7
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python2.7
)
else
which python3.4
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.4
)
which python3.5
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.5
)
which python3.6
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.6
)
fi
fi
if
[
-z
"
${
PYTHON
}
"
]
;
then
echo
"Python required"
exit
1
fi
if
!
$PYTHON
-c
"import nose"
2>/dev/null
;
then
echo
"python-nose required"
exit
1
fi
# do not allow undefined variables anymore
set
-u
if
[
-f
"
${
WEBOOB_BACKENDS
}
"
]
;
then
...
...
tools/weboob_lint.sh
View file @
75fef513
...
...
@@ -3,23 +3,7 @@
# stop on failure
set
-e
VER
=
2
if
[
"
$1
"
=
-3
]
;
then
VER
=
3
shift
fi
if
[
-z
"
${
PYTHON
}
"
]
;
then
which python
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
)
which python
$VER
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python
$VER
)
if
[
$VER
-eq
2
]
;
then
which python2.7
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python2.7
)
else
which python3.4
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.4
)
which python3.5
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.5
)
which python3.6
>
/dev/null 2>&1
&&
PYTHON
=
$(
which python3.6
)
fi
fi
.
"
$(
dirname
$0
)
/common.sh"
[
-z
"
${
TMPDIR
}
"
]
&&
TMPDIR
=
"/tmp"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment