summaryrefslogtreecommitdiff
path: root/docs/user_guide.rst
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2018-07-16 21:04:35 +0300
committerAlex Grönholm <alex.gronholm@nextday.fi>2018-07-17 15:02:50 +0300
commit59976ab294e1b118f42cab404d95df66ed55f7e4 (patch)
treeb74f50d731fb5c89e5520bd5ae3f7509d0ce46ee /docs/user_guide.rst
parent61f1aac7a445d4bc0314795c3fb3eee83092fb30 (diff)
downloadwheel-git-59976ab294e1b118f42cab404d95df66ed55f7e4.tar.gz
Added the license_files option and deprecated license_file
Fixes #138.
Diffstat (limited to 'docs/user_guide.rst')
-rw-r--r--docs/user_guide.rst34
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/user_guide.rst b/docs/user_guide.rst
index 7e3e999..aafb64f 100644
--- a/docs/user_guide.rst
+++ b/docs/user_guide.rst
@@ -22,6 +22,40 @@ adding this to your ``setup.cfg`` file:
.. _setuptools: https://pypi.org/project/setuptools/
+Including license files in the generated wheel file
+---------------------------------------------------
+
+Several open source licenses require the license text to be included in every
+distributable artifact of the project. By default, ``wheel`` conveniently
+includes files matching the following glob_ patterns in the ``.dist-info``
+directory:
+
+* ``LICEN[CS]E*``
+* ``COPYING``
+* ``NOTICE``
+
+This can be overridden by setting the ``license_files`` option in the
+``[metadata]`` section of the project's ``setup.cfg``. For example:
+
+.. code-block:: cfg
+
+ [metadata]
+ license_files =
+ license.txt
+ 3rdparty/*.txt
+
+No matter the path, all the matching license files are written in the wheel in
+the ``.dist-info`` directory based on their file name only.
+
+By specifying an empty ``license_files`` option, you can disable this
+functionality entirely.
+
+.. note:: There used to be an option called ``license_file`` (singular).
+ As of wheel v1.0, this option has been deprecated in favor of the more
+ versatile ``license_files`` option.
+
+.. _glob: https://docs.python.org/library/glob.html
+
Converting Eggs to Wheels
-------------------------