Default python is 3.6?
Steve Kargl
sgk at troutmask.apl.washington.edu
Fri Apr 12 21:58:27 UTC 2019
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
More information about the freebsd-ports
mailing list