From e12fd3ff1d69fa197a30ba1ccf450e17874a6293 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 2 Jun 2019 16:01:44 -0400 Subject: [PATCH 1/4] LIC: restore LICENSE_PAINT The png writing code is derived from https://www.object-craft.com.au/projects/paint/ The original code came in via 6cc5c32cc76be3e35bab7aa74f8c87a6b10125f8 The license was added in 29dfcd2684c42ea0fa0634ead3878e911812ace9 The license was removed in e3a5f1dd9a2f62027d747c44b3e0c4e5ccf44ba5 The derived code is currently in `src/_png.cpp` --- LICENSE/LICENSE_PAINT | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 LICENSE/LICENSE_PAINT diff --git a/LICENSE/LICENSE_PAINT b/LICENSE/LICENSE_PAINT new file mode 100644 index 000000000000..42595fff18ba --- /dev/null +++ b/LICENSE/LICENSE_PAINT @@ -0,0 +1,20 @@ +Copyright 2000 by Object Craft P/L, Melbourne, Australia. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Object Craft +is not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +OBJECT CRAFT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL OBJECT CRAFT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. From 9c674e7f576569d4e4b97770d34fbe0e333a226a Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 2 Jun 2019 16:09:20 -0400 Subject: [PATCH 2/4] MNT: remove TODO about adding license --- src/_png.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_png.cpp b/src/_png.cpp index f40c009d3b1b..a58cf4258e1c 100644 --- a/src/_png.cpp +++ b/src/_png.cpp @@ -1,8 +1,8 @@ /* -*- mode: c++; c-basic-offset: 4 -*- */ // this code is heavily adapted from the paint license, which is in -// the file paint.license (BSD compatible) included in this -// distribution. TODO, add license file to MANIFEST.in and CVS +// the file LICENSE_PAINT (BSD compatible) included in this +// distribution. /* For linux, png.h must be imported before Python.h because png.h needs to be the one to define setjmp. From 968b467b2b2da77336535a1043dc27d504dc847e Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 2 Jun 2019 16:15:29 -0400 Subject: [PATCH 3/4] MNT: move comment about LICENSE_PAINT to write_png function again This was moved to the top of the file in ba4016014cb4fb4927e36ce8ea429fed47dcb787 but I think it still only applies to this function. --- src/_png.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/_png.cpp b/src/_png.cpp index a58cf4258e1c..e6478fdef16a 100644 --- a/src/_png.cpp +++ b/src/_png.cpp @@ -1,9 +1,5 @@ /* -*- mode: c++; c-basic-offset: 4 -*- */ -// this code is heavily adapted from the paint license, which is in -// the file LICENSE_PAINT (BSD compatible) included in this -// distribution. - /* For linux, png.h must be imported before Python.h because png.h needs to be the one to define setjmp. Undefining _POSIX_C_SOURCE and _XOPEN_SOURCE stops a couple @@ -139,6 +135,9 @@ const char *Py_write_png__doc__ = " Byte string containing the PNG content if None was passed in for\n" " file, otherwise None is returned.\n"; +// this code is heavily adapted from the paint license, which is in +// the file LICENSE_PAINT (BSD compatible) included in this +// distribution. static PyObject *Py_write_png(PyObject *self, PyObject *args, PyObject *kwds) { numpy::array_view buffer; From 5f37b9dba99b68f4d89392db4cf910e92627d270 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 2 Jun 2019 22:44:35 -0400 Subject: [PATCH 4/4] DOC: clarify comment about the source of the png writing code --- src/_png.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_png.cpp b/src/_png.cpp index e6478fdef16a..15ad9493c69f 100644 --- a/src/_png.cpp +++ b/src/_png.cpp @@ -135,9 +135,9 @@ const char *Py_write_png__doc__ = " Byte string containing the PNG content if None was passed in for\n" " file, otherwise None is returned.\n"; -// this code is heavily adapted from the paint license, which is in -// the file LICENSE_PAINT (BSD compatible) included in this -// distribution. +// this code is heavily adapted from +// https://www.object-craft.com.au/projects/paint/ which licensed under the +// (BSD compatible) LICENSE_PAINT which is included in this distribution. static PyObject *Py_write_png(PyObject *self, PyObject *args, PyObject *kwds) { numpy::array_view buffer;