Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2019 12:47:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        python@FreeBSD.org
Subject:   [Bug 242997] games/oolite: Fix build for Python 3.x
Message-ID:  <bug-242997-21822-TqRIj2Uamw@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-242997-21822@https.bugs.freebsd.org/bugzilla/>
References:  <bug-242997-21822@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242997

lightside <lightside@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #210343|0                           |1
        is obsolete|                            |

--- Comment #3 from lightside <lightside@gmx.com> ---
Created attachment 210354
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D210354&action=
=3Dedit
Proposed patch (since 520894 revision)

- Cosmetic changes.

Hello, Kubilay Kocak.

(In reply to Kubilay Kocak from comment #2)
> Could you please:
>=20
>  - Submit this patch upstream as an issue or pull request, and include the
> issue/PR URL in the See Also field
Sorry, but I can't (or not interested). There is no patch. There are only
(temporary) dynamic changes with using 2to3 script, provided by Python
installation.
But if remove "--no-diffs" option for invocation of 2to3 script, it shows
changes for usage of print function:
-8<--
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored imacro_asm.py
--- imacro_asm.py       (original)
+++ imacro_asm.py       (refactored)
@@ -456,7 +456,7 @@
 if __name__ =3D=3D '__main__':
     import sys
     if len(sys.argv) !=3D 3:
-        print "usage: python imacro_asm.py infile.jsasm outfile.c.out"
+        print("usage: python imacro_asm.py infile.jsasm outfile.c.out")
         sys.exit(1)

     f =3D open(sys.argv[2], 'w')
RefactoringTool: Refactored build/cl.py
--- build/cl.py (original)
+++ build/cl.py (refactored)
@@ -51,7 +51,7 @@
             break

     if target =3D=3D None:
-        print >>sys.stderr, "No target set" and sys.exit(1)
+        print("No target set" and sys.exit(1), file=3Dsys.stderr)

     # The deps target lives here
     depstarget =3D os.path.basename(target) + ".pp"
@@ -90,7 +90,7 @@

     f =3D open(depstarget, "w")
     for dep in sorted(deps):
-        print >>f, "%s: %s" % (target, dep)
+        print("%s: %s" % (target, dep), file=3Df)

 if __name__ =3D=3D "__main__":
     InvokeClWithDependencyGeneration(sys.argv[1:])
RefactoringTool: Files that were modified:
RefactoringTool: imacro_asm.py
RefactoringTool: build/cl.py
-->8-

Also, the custom version of SpyderMonkey is just a external dependency for
OOlite, if looking for source code:
https://github.com/OoliteProject/oolite/tree/1.88/deps
https://github.com/OoliteProject/spidermonkey-ff4/blob/ca2fb5423fab4d72a3dc=
5fec911ce20bda01f223/README.txt

I guess, if developers may want to support Python 3.x version, they can do =
this
with using 2to3 script, if needed. There is no defect and it normally works
with using Python 2.x version. This is just a build dependency.

> - Confirm that this change passes QA (poudriere)
It passes build with using Python 3.x version:
-8<--
% make PYTHON_VERSION=3D3.6 clean check-plist
<..>
Configuring Javascript library...

mkdir -p deps/mozilla/js/src/build-release
<..>
checking for python2.7... (cached) /usr/local/bin/python3.6
<..>
checking for Python version >=3D 2.5... yes
<..>
=3D=3D=3D=3D> Compressing man pages (compress-man)
=3D=3D=3D=3D> Running Q/A tests (stage-qa)
=3D=3D=3D=3D> Checking for pkg-plist issues (check-plist)
=3D=3D=3D> Parsing plist
=3D=3D=3D> Checking for items in STAGEDIR missing from pkg-plist
=3D=3D=3D> Checking for items in pkg-plist which are not in STAGEDIR
=3D=3D=3D> No pkg-plist issues found (check-plist)
-->8-

> Please include an update to the MAINTAINER line if you can
Thanks, but I interested in this PR only.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242997-21822-TqRIj2Uamw>