Skip to content

Commit 7cf3625

Browse files
committed
Add copyright header in python/c++ files.
This also change the license from gplv3 to gplv3+.
1 parent cac931d commit 7cf3625

File tree

7 files changed

+121
-5
lines changed

7 files changed

+121
-5
lines changed

libzim/examples.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# This file is part of python-libzim
2+
# (see https://github.com/libzim/python-libzim)
3+
#
4+
# Copyright (c) 2020 Juan Diego Caballero <[email protected]>
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
120
from libzim import ZimArticle, ZimBlob, ZimCreator
221

322
class ZimTestArticle(ZimArticle):

libzim/lib.cxx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
/*
2+
* This file is part of python-libzim
3+
* (see https://github.com/libzim/python-libzim)
4+
*
5+
* Copyright (c) 2020 Juan Diego Caballero <[email protected]>
6+
* Copyright (c) 2020 Matthieu Gautier <[email protected]>
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20+
*/
21+
22+
123
#include <Python.h>
224
#include "lib.h"
325

@@ -241,4 +263,4 @@ void ZimCreatorWrapper::setMainUrl(std::string newUrl)
241263
zim::writer::Url ZimCreatorWrapper::getMainUrl()
242264
{
243265
return _creator->getMainUrl();
244-
}
266+
}

libzim/lib.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
// -*- c++ -*-
2+
/*
3+
* This file is part of python-libzim
4+
* (see https://github.com/libzim/python-libzim)
5+
*
6+
* Copyright (c) 2020 Juan Diego Caballero <[email protected]>.
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20+
*/
221
#ifndef libzim_LIB_H
322
#define libzim_LIB_H 1
423

@@ -58,4 +77,4 @@ class ZimCreatorWrapper
5877
zim::writer::Url getMainUrl();
5978
};
6079

61-
#endif // !libzim_LIB_H
80+
#endif // !libzim_LIB_H

libzim/libzim.pxd

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# This file is part of python-libzim
2+
# (see https://github.com/libzim/python-libzim)
3+
#
4+
# Copyright (c) 2020 Juan Diego Caballero <[email protected]>
5+
# Copyright (c) 2020 Matthieu Gautier <[email protected]>
6+
#
7+
# This program is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
120
from libcpp.string cimport string
221
from libc.stdint cimport uint32_t, uint64_t
322
from libcpp cimport bool

libzim/libzim.pyx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# This file is part of python-libzim
2+
# (see https://github.com/libzim/python-libzim)
3+
#
4+
# Copyright (c) 2020 Juan Diego Caballero <[email protected]>
5+
# Copyright (c) 2020 Matthieu Gautier <[email protected]>
6+
#
7+
# This program is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License
18+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
120
cimport libzim
221
cimport cpython.ref as cpy_ref
322
from cython.operator import dereference
@@ -345,4 +364,4 @@ cdef class ZimCreator:
345364
self._finalized = True
346365

347366
def __repr__(self):
348-
return f"{self.__class__.__name__}(filename={self.filename})"
367+
return f"{self.__class__.__name__}(filename={self.filename})"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def read(fname):
1616
author = "Monadical SAS",
1717
author_email = "[email protected]",
1818
description = ("A python-facing API for creating and interacting with ZIM files"),
19-
license = "GPLv3",
19+
license = "GPLv3+",
2020
long_description=read('README.md'),
2121
ext_modules = cythonize([
2222
Extension("libzim", ["libzim/*.pyx","libzim/lib.cxx"],

tests/test_libzim.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# This file is part of python-libzim
2+
# (see https://github.com/libzim/python-libzim)
3+
#
4+
i# Copyright (c) 2020 Juan Diego Caballero <[email protected]>
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
119
import unittest
220
import os,sys,inspect
321

@@ -115,4 +133,4 @@ def test_check_mandatory_metadata(self):
115133

116134

117135
if __name__ == '__main__':
118-
unittest.main()
136+
unittest.main()

0 commit comments

Comments
 (0)