From nobody Tue Oct 18 22:07:11 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MsSdp05XPz4fwM6 for ; Tue, 18 Oct 2022 22:07:26 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MsSdn0LWMz44hC for ; Tue, 18 Oct 2022 22:07:24 +0000 (UTC) (envelope-from tomek@cedro.info) Received: by mail-qt1-x836.google.com with SMTP id g11so10623465qts.1 for ; Tue, 18 Oct 2022 15:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=jc6OfSYqD1RTzerqJjYOzzqZTI/A1jHwdyMAEYuptV0=; b=R4KV6cGZkB9s5IQj7gG8eti1+O2tRuZA6yfyKIw8A8Gkgn9ORaRgJXV7vmhcZCTQEc w2WvxaKePlNZVcjw25CXsWdDBjSgdtJsqnFIKKNhw1Kn58tEcUNAepI+5jMJfQeIHB4z TwAMWsgAvvAuuEJwQxh9G1xoRDSt8O4pLEWbVy5jsdm0mrIwS7RGCUDEGXp91/XPRB8r xwySkWQn9AlwDALYHQ/yM6mz6krb8CdYCFGIFFHLFt1jX/D0w+jdSn/FwXXlaGX1zECt A76s3X3na+vB67kysbWwyCx4YiGCttrEHz+g+eyEj9rqwbabeVeby+sM2sqF7YcAupTT +F8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jc6OfSYqD1RTzerqJjYOzzqZTI/A1jHwdyMAEYuptV0=; b=ym9Ct8oHtSjqUb5svH7m7Z1IW9YcvloQOoJnuMqBiWedN5ABCNm6zfBzuKCmFCGWra S56k/YBfSOrsP4ijjcf8AdKJhEtyUDaVR/T5WDUuXiV6Uu1b6Ea8PYidfccnyIQ/knI5 ZzBFauRRNv43rdoitXuY/1l9rem4hl803mvq23RFSozopcEfsTyCsU9zmNdo3a3HvZtk bMNeYMMeM5lMcLAdy9Yv8ONabQE9hlmElnm4ypKDnGOYAiOJA2NsidFqMetpUGt02YfD KdflkwdBWosbjCU+VpiDM3OGCb5Mjkfw31ScnOrp5aWrY+a+4ioMRluwZ3KgfVHmJXXJ 7VJA== X-Gm-Message-State: ACrzQf2xyrcGlyyCLutoEqAlSOmRJDxoZI0423Nm+RLbgpIxodFzwwV8 OKdua+Rh2h3DtZFRr4iAiHXYYw== X-Google-Smtp-Source: AMsMyM4Mv+VswQk9QviHStuE8m3QBOtPWQZJjSrqcw31jmQVs2RG8xW5EaBQPgVGzPaWKEe7Kgqllg== X-Received: by 2002:ac8:59c8:0:b0:39c:fb43:45ea with SMTP id f8-20020ac859c8000000b0039cfb4345eamr826497qtf.361.1666130843916; Tue, 18 Oct 2022 15:07:23 -0700 (PDT) Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com. [209.85.219.180]) by smtp.gmail.com with ESMTPSA id y9-20020a05620a25c900b006ed61f18651sm3437101qko.16.2022.10.18.15.07.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Oct 2022 15:07:23 -0700 (PDT) Received: by mail-yb1-f180.google.com with SMTP id j7so18642342ybb.8; Tue, 18 Oct 2022 15:07:22 -0700 (PDT) X-Received: by 2002:a25:8b11:0:b0:6bc:fdf:ecef with SMTP id i17-20020a258b11000000b006bc0fdfecefmr3888666ybl.367.1666130842544; Tue, 18 Oct 2022 15:07:22 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 From: Tomek CEDRO Date: Wed, 19 Oct 2022 00:07:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: proper python3 interpreter invocation To: FreeBSD Questions Mailing List , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4MsSdn0LWMz44hC X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=R4KV6cGZ; dmarc=none; spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2607:f8b0:4864:20::836) smtp.mailfrom=tomek@cedro.info X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::836:from,209.85.219.180:received]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[cedro.info:+]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[cedro.info]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-ThisMailContainsUnwantedMimeParts: N 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