[PATCH eac] [pkg] Distribute documentation

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Apr 11 15:01:40 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1491910648 -7200
#      Tue Apr 11 13:37:28 2017 +0200
# Node ID af89b7536ed07c6a8338c5620a0ceffd600a1df3
# Parent  a1817189cc29d197072e79c6e4fddc796996fdc0
[pkg] Distribute documentation

so it's accessible through pkg_resources. I didn't find a proper way to declare
non-package data file from the setuptools documentation, the only way I found
was to make 'doc' subdirectory appears as a sub-package.

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -68,11 +68,12 @@ setup(
     long_description=long_description,
     author=author,
     author_email=author_email,
     url=web,
     classifiers=classifiers,
-    packages=find_packages(exclude=['test']),
+    packages=find_packages(exclude=['test']) + ['cubicweb_eac.doc'],
+    package_dir={'cubicweb_eac.doc': 'doc'},
     install_requires=install_requires,
     include_package_data=True,
     entry_points={
         'cubicweb.cubes': [
             'eac=cubicweb_eac',


More information about the saem-devel mailing list