From owner-freebsd-ports@freebsd.org Fri Apr 12 21:58:27 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E5201587589 for ; Fri, 12 Apr 2019 21:58:27 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D62EA8F1DE for ; Fri, 12 Apr 2019 21:58:24 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id x3CLwMeD010175 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 12 Apr 2019 14:58:22 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id x3CLwMgm010174; Fri, 12 Apr 2019 14:58:22 -0700 (PDT) (envelope-from sgk) Date: Fri, 12 Apr 2019 14:58:22 -0700 From: Steve Kargl To: Dima Pasechnik Cc: FreeBSD Ports Subject: Re: Default python is 3.6? Message-ID: <20190412215822.GA84920@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20190412161112.GA5963@troutmask.apl.washington.edu> <20190412161742.GA21349@troutmask.apl.washington.edu> <20190412162810.GA24821@troutmask.apl.washington.edu> <20190412195655.GA59279@troutmask.apl.washington.edu> <20190412202951.GA12942@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: D62EA8F1DE X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [1.86 / 15.00]; HAS_REPLYTO(0.00)[sgk@troutmask.apl.washington.edu]; IP_SCORE(0.01)[ip: (0.08), ipnet: 128.95.0.0/16(0.08), asn: 73(-0.05), country: US(-0.06)]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[21.76.95.128.list.dnswl.org : 127.0.11.2]; MX_GOOD(-0.01)[cached: troutmask.apl.washington.edu]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.79)[-0.790,0]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.20)[0.205,0]; TAGGED_RCPT(0.00)[freebsd]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[washington.edu]; AUTH_NA(1.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.75)[0.751,0]; R_SPF_NA(0.00)[]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2019 21:58:27 -0000 On Fri, Apr 12, 2019 at 11:18:50PM +0200, Dima Pasechnik wrote: > > So there is more "software bureaucracy" here than just applying one patch. > % cd /usr/ports/lang % svn status A python27/files/patch-Modules___mathmodule.c A python35/files/patch-Modules___mathmodule.c A python36/files/patch-Modules___mathmodule.c % svn diff python27/files/patch-Modules___mathmodule.c \ python35/files/patch-Modules___mathmodule.c \ python36/files/patch-Modules___mathmodule.c > py.diff % cat py.diff Index: python27/files/patch-Modules___mathmodule.c =================================================================== --- python27/files/patch-Modules___mathmodule.c (nonexistent) +++ python27/files/patch-Modules___mathmodule.c (working copy) @@ -0,0 +1,38 @@ +--- ./Modules/mathmodule.c.orig 2019-04-12 10:00:28.518460000 -0700 ++++ ./Modules/mathmodule.c 2019-04-12 10:01:24.846412000 -0700 +@@ -71,7 +71,7 @@ + static const double sqrtpi = 1.772453850905516027298167483341145182798; + + static double +-sinpi(double x) ++_freebsd_ports_are_broken_sinpi(double x) + { + double y, r; + int n; +@@ -270,7 +270,7 @@ + integer. */ + if (absx > 200.0) { + if (x < 0.0) { +- return 0.0/sinpi(x); ++ return 0.0/_freebsd_ports_are_broken_sinpi(x); + } + else { + errno = ERANGE; +@@ -294,7 +294,7 @@ + } + z = z * lanczos_g / y; + if (x < 0.0) { +- r = -pi / sinpi(absx) / absx * exp(y) / lanczos_sum(absx); ++ r = -pi / _freebsd_ports_are_broken_sinpi(absx) / absx * exp(y) / lanczos_sum(absx); + r -= z * r; + if (absx < 140.0) { + r /= pow(y, absx - 0.5); +@@ -366,7 +366,7 @@ + (x-0.5)*(log(x+lanczos_g-0.5)-1); + } + else { +- r = log(pi) - log(fabs(sinpi(absx))) - log(absx) - ++ r = log(pi) - log(fabs(_freebsd_ports_are_broken_sinpi(absx))) - log(absx) - + (log(lanczos_sum(absx)) - lanczos_g + + (absx-0.5)*(log(absx+lanczos_g-0.5)-1)); + } Index: python35/files/patch-Modules___mathmodule.c =================================================================== --- python35/files/patch-Modules___mathmodule.c (nonexistent) +++ python35/files/patch-Modules___mathmodule.c (working copy) @@ -0,0 +1,38 @@ +--- ./Modules/mathmodule.c.orig 2019-04-12 14:35:01.873406000 -0700 ++++ ./Modules/mathmodule.c 2019-04-12 14:35:42.751667000 -0700 +@@ -67,7 +67,7 @@ + static const double logpi = 1.144729885849400174143427351353058711647; + + static double +-sinpi(double x) ++_freebsd_ports_are_broken_sinpi(double x) + { + double y, r; + int n; +@@ -296,7 +296,7 @@ + integer. */ + if (absx > 200.0) { + if (x < 0.0) { +- return 0.0/sinpi(x); ++ return 0.0/_freebsd_ports_are_broken_sinpi(x); + } + else { + errno = ERANGE; +@@ -320,7 +320,7 @@ + } + z = z * lanczos_g / y; + if (x < 0.0) { +- r = -pi / sinpi(absx) / absx * exp(y) / lanczos_sum(absx); ++ r = -pi / _freebsd_ports_are_broken_sinpi(absx) / absx * exp(y) / lanczos_sum(absx); + r -= z * r; + if (absx < 140.0) { + r /= pow(y, absx - 0.5); +@@ -390,7 +390,7 @@ + r += (absx - 0.5) * (log(absx + lanczos_g - 0.5) - 1); + if (x < 0.0) + /* Use reflection formula to get value for negative x. */ +- r = logpi - log(fabs(sinpi(absx))) - log(absx) - r; ++ r = logpi - log(fabs(_freebsd_ports_are_broken_sinpi(absx))) - log(absx) - r; + if (Py_IS_INFINITY(r)) + errno = ERANGE; + return r; Index: python36/files/patch-Modules___mathmodule.c =================================================================== --- python36/files/patch-Modules___mathmodule.c (nonexistent) +++ python36/files/patch-Modules___mathmodule.c (working copy) @@ -0,0 +1,38 @@ +--- ./Modules/mathmodule.c.orig 2019-04-12 09:23:42.329350000 -0700 ++++ ./Modules/mathmodule.c 2019-04-12 09:24:37.977029000 -0700 +@@ -67,7 +67,7 @@ + static const double logpi = 1.144729885849400174143427351353058711647; + + static double +-sinpi(double x) ++_freebsd_port_are_broken_sinpi(double x) + { + double y, r; + int n; +@@ -296,7 +296,7 @@ + integer. */ + if (absx > 200.0) { + if (x < 0.0) { +- return 0.0/sinpi(x); ++ return 0.0/_freebsd_port_are_broken_sinpi(x); + } + else { + errno = ERANGE; +@@ -320,7 +320,7 @@ + } + z = z * lanczos_g / y; + if (x < 0.0) { +- r = -pi / sinpi(absx) / absx * exp(y) / lanczos_sum(absx); ++ r = -pi / _freebsd_port_are_broken_sinpi(absx) / absx * exp(y) / lanczos_sum(absx); + r -= z * r; + if (absx < 140.0) { + r /= pow(y, absx - 0.5); +@@ -390,7 +390,7 @@ + r += (absx - 0.5) * (log(absx + lanczos_g - 0.5) - 1); + if (x < 0.0) + /* Use reflection formula to get value for negative x. */ +- r = logpi - log(fabs(sinpi(absx))) - log(absx) - r; ++ r = logpi - log(fabs(_freebsd_port_are_broken_sinpi(absx))) - log(absx) - r; + if (Py_IS_INFINITY(r)) + errno = ERANGE; + return r; -- Steve