Date: Wed, 19 Oct 2022 00:07:11 +0200 From: Tomek CEDRO <tomek@cedro.info> To: FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>, freebsd-hackers@freebsd.org Subject: proper python3 interpreter invocation Message-ID: <CAFYkXjn2Nc8Kn%2BLxDZjhBOaz5%2BA2xy_E86asBJikJGoeQNx6Eg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello world :-) Is Python 3 part of the base? What would be the most valid way to invoke a Python 3 script? Two options are possible: 1. #!/usr/bin/env python 2. #!/usr/bin/env python3 I am working on a mobile application in Python + Kivy that can be then converted into Android and iOS application. It works fine here on FreeBSD even in bare console (DRM KMS). I would like to build Android application on FreeBSD (I know iOS version needs macOS+XCode). For that I need Android NDK that is officially only provided for Windows, macOS and Linux. I did a modification to make it work on FreeBSD using Linux binaries. The goal is to create a FreeBSD Port for Android NDK (no official support / releases will be provided for our platform). But the patches are rejected at the upstream :-( https://github.com/android/ndk/issues/1780 https://github.com/android/ndk/issues/1781 https://github.com/android/ndk/issues/1785 This one is interesting in particular: https://github.com/android/ndk/issues/1785 Some of their scripts use `#!/usr/bin/env python3` and some use `#!/usr/bin/env python`. The ones using `python` does not work out of the box on FreeBSD.. so I wanted to unify the interpreter to use `python3` (or `python` whatever is best if there was any kind of sensible discussion). I know that I can create a Python VirtualEnv where python == python3. Also I can create a symlink /usr/local/bin/python3 -> /usr/local/bin/python but that customization will make system incoherent with other standard installations. Maybe I should simply create local patches when creating that port? Google not only does not and will not provide releases for FreeBSD but also rejects patches to make things work here. We are doomed to a local fork on purpose :-( What would be the proper approach on FreeBSD? Where am I wrong? Any hints welcome :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFYkXjn2Nc8Kn%2BLxDZjhBOaz5%2BA2xy_E86asBJikJGoeQNx6Eg>