aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint14
1 files changed, 13 insertions, 1 deletions
diff --git a/sbolint b/sbolint
index fd761ae..9062969 100755
--- a/sbolint
+++ b/sbolint
@@ -1195,7 +1195,7 @@ sub check_script {
my $lineno = 0;
my ($prgnam, $version, $build, $tag, $need_doinst, $slackdesc, $makepkg, $install);
my ($cdpkg, $codestart, $lint_enabled, $print_pkg_name, $pkg_type, $arch_lineno);
- my ($old_arch, $old_flags);
+ my ($old_arch, $old_flags, $have_py2, $have_py3);
$lint_enabled = 1;
for(@lines) {
@@ -1340,6 +1340,14 @@ sub check_script {
if(/^[^#]*\bpython\b/) {
log_note("$file:$lineno: suggest replacing 'python' with 'python2' for future-proofing");
}
+
+ if(/^[^#]*\bpython2?\b/) {
+ $have_py2 = $lineno;
+ }
+
+ if(/^[^#]*\bpython3?\b/) {
+ $have_py3 = $lineno;
+ }
}
if(not defined($prgnam)) {
@@ -1416,6 +1424,10 @@ sub check_script {
} elsif($old_flags) {
log_error("$file:$old_flags: archaic -march= compiler flag (we support i586 and up)");
}
+
+ if($have_py2 && $have_py3) {
+ log_note("$file: it looks like this build includes both python2 and python3 code. consider splitting it into separate python2- and python3- builds.");
+ }
}
sub findem {