[med-svn] [Git][med-team/obitools][master] Fix str-bytes issue

Andreas Tille gitlab at salsa.debian.org
Sun Jan 12 17:13:08 GMT 2020



Andreas Tille pushed to branch master at Debian Med / obitools


Commits:
1063deef by Andreas Tille at 2020-01-12T18:08:45+01:00
Fix str-bytes issue

- - - - -


1 changed file:

- debian/patches/2to3.patch


Changes:

=====================================
debian/patches/2to3.patch
=====================================
@@ -184,6 +184,30 @@ src/obitools/options/_bioseqfilter.pyx:31:19: undeclared name not builtin: reduc
  
 --- a/distutils.ext/obidistutils/command/build_scripts.py
 +++ b/distutils.ext/obidistutils/command/build_scripts.py
+@@ -43,7 +43,7 @@ class build_scripts(ori_build_scripts):
+             # that way, we'll get accurate feedback if we can read the
+             # script.
+             try:
+-                f = open(script, "r")
++                f = open(script, "rb")
+             except IOError:
+                 if not self.dry_run:
+                     raise
+@@ -67,11 +67,11 @@ class build_scripts(ori_build_scripts):
+                 log.info("copying and adjusting %s -> %s", script,
+                          self.build_dir)
+                 if not self.dry_run:
+-                    outf = open(outfile, "w")
++                    outf = open(outfile, "wb")
+                     if not sysconfig.python_build:
+-                        outf.write("#!%s%s\n" %
++                        outf.write(("#!%s%s\n" %
+                                    (self.executable,
+-                                    post_interp))
++                                    post_interp)).encode())
+                     else:
+                         outf.write("#!%s%s\n" %
+                                    (os.path.join(
 @@ -93,8 +93,8 @@ class build_scripts(ori_build_scripts):
                  if self.dry_run:
                      log.info("changing mode of %s", F)



View it on GitLab: https://salsa.debian.org/med-team/obitools/commit/1063deef2e2497623724af43775683dd1b015af7

-- 
View it on GitLab: https://salsa.debian.org/med-team/obitools/commit/1063deef2e2497623724af43775683dd1b015af7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200112/b94040a7/attachment-0001.html>


More information about the debian-med-commit mailing list