From 7cf36252adf2eb3d6299d6e38885832b043c8b16 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 4 May 2020 11:20:41 +0200 Subject: [PATCH] Add copyright header in python/c++ files. This also change the license from gplv3 to gplv3+. --- libzim/examples.py | 19 +++++++++++++++++++ libzim/lib.cxx | 24 +++++++++++++++++++++++- libzim/lib.h | 21 ++++++++++++++++++++- libzim/libzim.pxd | 19 +++++++++++++++++++ libzim/libzim.pyx | 21 ++++++++++++++++++++- setup.py | 2 +- tests/test_libzim.py | 20 +++++++++++++++++++- 7 files changed, 121 insertions(+), 5 deletions(-) diff --git a/libzim/examples.py b/libzim/examples.py index 9c81386a..132c7dd9 100644 --- a/libzim/examples.py +++ b/libzim/examples.py @@ -1,3 +1,22 @@ +# This file is part of python-libzim +# (see https://github.com/libzim/python-libzim) +# +# Copyright (c) 2020 Juan Diego Caballero +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + from libzim import ZimArticle, ZimBlob, ZimCreator class ZimTestArticle(ZimArticle): diff --git a/libzim/lib.cxx b/libzim/lib.cxx index 12b5afd0..387f3bf1 100644 --- a/libzim/lib.cxx +++ b/libzim/lib.cxx @@ -1,3 +1,25 @@ +/* + * This file is part of python-libzim + * (see https://github.com/libzim/python-libzim) + * + * Copyright (c) 2020 Juan Diego Caballero + * Copyright (c) 2020 Matthieu Gautier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + #include #include "lib.h" @@ -241,4 +263,4 @@ void ZimCreatorWrapper::setMainUrl(std::string newUrl) zim::writer::Url ZimCreatorWrapper::getMainUrl() { return _creator->getMainUrl(); -} \ No newline at end of file +} diff --git a/libzim/lib.h b/libzim/lib.h index 2543348c..fa56cbc1 100644 --- a/libzim/lib.h +++ b/libzim/lib.h @@ -1,4 +1,23 @@ // -*- c++ -*- +/* + * This file is part of python-libzim + * (see https://github.com/libzim/python-libzim) + * + * Copyright (c) 2020 Juan Diego Caballero . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #ifndef libzim_LIB_H #define libzim_LIB_H 1 @@ -58,4 +77,4 @@ class ZimCreatorWrapper zim::writer::Url getMainUrl(); }; -#endif // !libzim_LIB_H \ No newline at end of file +#endif // !libzim_LIB_H diff --git a/libzim/libzim.pxd b/libzim/libzim.pxd index e9ef8c14..0e1bf2bc 100644 --- a/libzim/libzim.pxd +++ b/libzim/libzim.pxd @@ -1,3 +1,22 @@ +# This file is part of python-libzim +# (see https://github.com/libzim/python-libzim) +# +# Copyright (c) 2020 Juan Diego Caballero +# Copyright (c) 2020 Matthieu Gautier +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + from libcpp.string cimport string from libc.stdint cimport uint32_t, uint64_t from libcpp cimport bool diff --git a/libzim/libzim.pyx b/libzim/libzim.pyx index baf84b13..37f6bdb7 100644 --- a/libzim/libzim.pyx +++ b/libzim/libzim.pyx @@ -1,3 +1,22 @@ +# This file is part of python-libzim +# (see https://github.com/libzim/python-libzim) +# +# Copyright (c) 2020 Juan Diego Caballero +# Copyright (c) 2020 Matthieu Gautier +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + cimport libzim cimport cpython.ref as cpy_ref from cython.operator import dereference @@ -345,4 +364,4 @@ cdef class ZimCreator: self._finalized = True def __repr__(self): - return f"{self.__class__.__name__}(filename={self.filename})" \ No newline at end of file + return f"{self.__class__.__name__}(filename={self.filename})" diff --git a/setup.py b/setup.py index 3651ade8..eb4a7df5 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ def read(fname): author = "Monadical SAS", author_email = "hello@monadical.com", description = ("A python-facing API for creating and interacting with ZIM files"), - license = "GPLv3", + license = "GPLv3+", long_description=read('README.md'), ext_modules = cythonize([ Extension("libzim", ["libzim/*.pyx","libzim/lib.cxx"], diff --git a/tests/test_libzim.py b/tests/test_libzim.py index b6d45d2b..d2967dca 100644 --- a/tests/test_libzim.py +++ b/tests/test_libzim.py @@ -1,3 +1,21 @@ +# This file is part of python-libzim +# (see https://github.com/libzim/python-libzim) +# +i# Copyright (c) 2020 Juan Diego Caballero +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import unittest import os,sys,inspect @@ -115,4 +133,4 @@ def test_check_mandatory_metadata(self): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main()