kivy/doc/sources/guide/licensing.rst

160 lines
6.0 KiB
ReStructuredText

Package licensing
=================
.. warning:: This is not a legally authoratative guide! The Kivy organisation,
authors and contributors take no responsibility for any lack of knowledge,
information or advice presented here. The guide is merely informative and is
meant to protect inexperienced users.
Your code alone may not require including licensing information or copyright
notices of other included software, but binaries are something else. When a
binary (.exe, .app, .apk, ...) is created, it includes Kivy, its dependencies
and other packages that your application uses.
Some of them are licensed in a way that requires including a copyright notice
somewhere in your app (or more). Before
distributing any of the binaries, please **check all the created files** that
don't belong to your source (.dll, .pyd, .so, ...) and include the appropriate
copyright notices if required by the license the files belong to. This way you
may satisfy licensing requirements of the Kivy deps.
Dependencies
------------
All of the dependencies will be used at least partially on each platform Kivy
supports. You therefore need to comply to their licenses, which mostly requires
only pasting a copyright notice in your app and not pretending you wrote the
code.
.. |mixer| replace:: SDL_mixer has them
.. _mixer: http://hg.libsdl.org/SDL_mixer/file/default/VisualC/external/lib/x86
.. |dcutil| replace:: docutils
.. _dcutil: https://sf.net/p/docutils/code/HEAD/tree/trunk/docutils/COPYING.txt
* |dcutil|_
* `pygments <https://bitbucket.org/birkenfeld/pygments-main/src/tip/LICENSE>`_
* `sdl2 <https://www.libsdl.org/license.php>`_
* `glew <http://glew.sourceforge.net/glew.txt>`_
* `gstreamer <https://github.com/GStreamer/gstreamer/blob/master/COPYING>`_
(if used)
* image & audio libraries(e.g. |mixer|_)
You'll probably need to check image and audio libraries manually (most begin
with ``lib``). The ``LICENSE*`` files that belong to them should be included by
PyInstaller, but are not included by python-for-android and you need to find
them.
Windows (PyInstaller)
---------------------
.. |win32| replace:: pypiwin32
.. _win32: https://pypi.python.org/pypi/pypiwin32
To access some Windows API features, Kivy uses the |win32|_ package. This
package is released under the
`PSF license <https://opensource.org/licenses/Python-2.0>`_.
Visual Studio Redistributables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. |py2crt| replace:: Py2 CRT license
.. _py2crt: https://hg.python.org/sandbox/2.7/file/tip/Tools/msi/crtlicense.txt
.. |py3crt| replace:: Py3 CRT license
.. _py3crt: https://hg.python.org/cpython/file/tip/Tools/msi/exe/crtlicense.txt
.. |redist| replace:: List of redistributables
.. _redist: https://msdn.microsoft.com/en-us/library/8kche8ah(v=vs.90).aspx
Python compiled with Visual Studio (official) includes files from Microsoft and
you are only allowed to redistribute them under specific conditions listed in
the CRTlicense. You need to include the names of the files and a reworded
version of |py2crt|_ or |py3crt|_ (depending which interpreter you use) and
present these to the end-user of your application in order to satisfy their
requirements.
* |redist|_
Other libraries
~~~~~~~~~~~~~~~
* `zlib <https://github.com/madler/zlib/blob/master/README>`_
.. note:: Please add the attributions for other libraries that you
*don't use directly* but are present after packaging with e.g. PyInstaller
on Windows.
Linux
-----
.. |badsit| replace:: situation bad for your user
.. _badsit: avoid_
Linux has many distributions which means there's no correct guide for all of
the distributions. This applies to the RPi too. However, it can be
simplified in two ways depending on how you create a package (also with
PyInstaller): with or without including binaries.
If the binaries are included, you should check every file (e.g. `.so`) that's
not your source and find the license it belongs to. According to that license,
you'll probably need to put an attribution into your application or possibly
more, depending on the requirements of that license.
If the binaries are not included (which allows packaging your app as e.g. a
`.deb` package), there's a |badsit|_. It's up to you to decide whether you
satisfy the conditions of other licenses and, for example, include copyright
attributions into your app or not.
Android
-------
As APK is just an archive of files: you can extract files from it and (as in
Windows redistributables) check all the files.
``APK/assets/private.mp3/private.mp3/`` contains all the included files. Most
of them are related to Kivy, Python or your source, but those that aren't need
checking.
Known packages:
* `pygame <https://bitbucket.org/pygame/pygame/src/tip/LGPL>`_
(if old_toolchain is used)
* `sqlite3 <https://github.com/ghaering/pysqlite/blob/master/LICENSE>`_
* `six <https://bitbucket.org/gutworth/six/src/tip/LICENSE>`_
There are other included libraries, included either by Kivy directly or through
Pygame/SDL2, that are located in ``APK/lib/armeabi/``. Most of them are related
to dependencies or are produced by python-for-android and are part of its source
(and licensing).
* libapplication.so
Mac
---
Missing.
iOS
---
Missing.
.. _avoid:
Avoiding binaries
-----------------
.. |cons| replace:: consequences
.. _cons: http://programmers.stackexchange.com/a/234295
There might be a way how to avoid this licensing process by avoiding creating
a distribution with third-party stuff completely. With Python you can create
a module, which is only your code with ``__main__.py`` + ``setup.py`` that only
lists required dependencies.
This way, you can still distribute your app - your *code* - and you might not
need to care about other licenses. The combination of your code and the
dependencies could be specified as a "usage" rather than a "distribution". The
responsibility of satisfying licenses, however, most likely transfers to your
user, who needs to assemble the environment to even run the module. If you care
about your users, you might want to slow down a little and read more about the
|cons|_.