From: Aaron M. Ucko Date: Fri, 26 Jul 2024 00:00:49 +0000 (-0400) Subject: Stop relying on 2to3 at build time. X-Git-Tag: archive/raspbian/2.16.0+ds-7+rpi1~1^2~46 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a9e68c3454d544b30501a9a43eeb111618bdff40;p=ncbi-blast%2B.git Stop relying on 2to3 at build time. * debian/control: Stop building against 2to3, which may not be around much longer. * debian/patches/allow_pcre2 (new): Allow use of PCRE2. * debian/rules: Drop build-time 2to3 invocation in favor of debian/patches/2to3. --- diff --git a/debian/changelog b/debian/changelog index 40679e78..ffb3c06f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,10 @@ ncbi-blast+ (2.15.0+ds-1) UNRELEASED; urgency=medium needed. - Build against autoconf2.69. - Build against libpcre2-dev, as enabled by debian/patches/allow_pcre2. + - Stop building against 2to3, which may not be around much longer. * debian/patches: Update for new release, mostly formally. + * debian/patches/2to3 (new): Cache 2to3 diff for + windowmasker_2.2.22_adapter. * debian/patches/allow_pcre2 (new): Allow use of PCRE2. * debian/patches/series: - Move system_mbedtls_only up in conjunction with incorporating part @@ -30,9 +33,10 @@ ncbi-blast+ (2.15.0+ds-1) UNRELEASED; urgency=medium dpkg-buildpackage's SOURCE_DATE_EPOCH injection should suffice. - Extend generated-sources cleanup to objtools/eutils (not entirely straightforward due to input format variation). + - Drop build-time 2to3 invocation in favor of debian/patches/2to3. * debian/source/lintian-overrides: No more rapidjson10 (just ...11). - -- Aaron M. Ucko Mon, 22 Jul 2024 23:16:26 -0400 + -- Aaron M. Ucko Thu, 25 Jul 2024 20:00:49 -0400 ncbi-blast+ (2.12.0+ds-4) unstable; urgency=medium diff --git a/debian/control b/debian/control index ef390972..5f960b93 100644 --- a/debian/control +++ b/debian/control @@ -7,8 +7,7 @@ Section: science Priority: optional Build-Depends: debhelper-compat (= 13), autoconf2.69 -Build-Depends-Arch: 2to3, - libboost-test-dev, +Build-Depends-Arch: libboost-test-dev, libbz2-dev, libc-dev-bin, libgnutls28-dev, diff --git a/debian/patches/2to3 b/debian/patches/2to3 new file mode 100644 index 00000000..18f1bd62 --- /dev/null +++ b/debian/patches/2to3 @@ -0,0 +1,48 @@ +--- a/c++/src/app/winmasker/windowmasker_2.2.22_adapter.py (original) ++++ b/c++/src/app/winmasker/windowmasker_2.2.22_adapter.py (refactored) +@@ -79,7 +79,7 @@ + while True: + if arg_pos >= len( sys.argv ): break + arg = sys.argv[arg_pos] +- if arg not in old_wm_opt_info.keys(): tmpres.append( arg ) ++ if arg not in list(old_wm_opt_info.keys()): tmpres.append( arg ) + else: + if arg == '-convert': + arg_pos += 1 +@@ -159,7 +159,7 @@ + elif state == 'copy': + result.append( arg ) + state = 'check' +- elif arg in old_wm_opt_info.keys(): ++ elif arg in list(old_wm_opt_info.keys()): + if arg in excludes[wm_mode]: + if not old_wm_opt_info[arg]: state = 'skip' + else: +@@ -172,13 +172,13 @@ + global HELP_STR + mode = 'exec' + if len( sys.argv ) <= 1: +- print HELP_STR ++ print(HELP_STR) + return + else: + if sys.argv[1] == '--print-only': + mode = 'print' + if len( sys.argv ) <= 2: +- print HELP_STR ++ print(HELP_STR) + return + else: + wm_name = sys.argv[2] +@@ -188,9 +188,9 @@ + start_idx = 1 + new_args = process( start_idx ) + result_str = wm_name + ' ' + ' '.join( new_args ) +- if mode == 'print': print result_str ++ if mode == 'print': print(result_str) + else: +- print 'running "' + result_str + '"' ++ print('running "' + result_str + '"') + os.system( result_str ) + + if __name__ == '__main__': diff --git a/debian/patches/series b/debian/patches/series index 434ae332..5e632f40 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -19,3 +19,4 @@ spelling support_gcc10 run_perl_directly tune_lmdb_defaults +2to3 diff --git a/debian/rules b/debian/rules index 42a4eb0b..30d50d9d 100755 --- a/debian/rules +++ b/debian/rules @@ -108,7 +108,6 @@ override_dh_install-arch: mv $(instroot)/bin/update_blastdb.pl $(instroot)/bin/update_blastdb sed -e '1s/$$/3/' $(instroot)/bin/windowmasker_2.2.22_adapter.py \ > $(instroot)/bin/windowmasker_2.2.22_adapter - 2to3 -w --nobackups $(instroot)/bin/windowmasker_2.2.22_adapter chmod +x $(instroot)/bin/windowmasker_2.2.22_adapter rm $(instroot)/bin/windowmasker_2.2.22_adapter.py* # Clean up tests, demos, and internal build tools