title: Python Package Not Including Static Content When Installed
body: <p>I'm writing a Python package for creating architecture diagrams.  As part of that process, I need to be able to include static content (i.e. images) as part of my package distribution.  To do this, I followed the documentation and added a <code>MANIFEST.in</code> file that includes all of my icons and updated <code>setup.py</code> to include the <code>include_package_data=True</code> attribute.</p>
  <p>Based on this configuration, it does appear that the static content is pushed to PyPi when the package is published based on an inspection of the <code>SOURCES.txt</code> file that gets generated when I run <code>python3 setup.py sdist bdist_wheel</code>.  The upload is also noticeably longer with the static content included.</p>
  <p>The issue is, when I run <code>pip3 install architectures</code> the package does install, but none of the static content does.  I'm fairly confident in this after looking at the <code>RECORD</code> file that gets downloaded with the package which does not include any references to my images (icons).</p>
  <p>Relevant code snippets can be found below.  Any help is greatly appreciated.</p>
  <p><strong>Simplified folder structure</strong></p>
  <pre><code>.
  ├── setup.py
  ├── MANIFEST.in
  ├── README.md
  ├── icons
  │   └── azure
  │       └── ai
  │           ├── cognitive-services.png
  │           ├── ...
  └── architectures
      ├── core
      │   └── __init__.py
      ├── themes
      │   └── __init__.py
      ├── providers
      │   ├── azure
      │   └── __init__.py
      └── __init__.py
  </code></pre>
  <p>For a full view, here is the link to the <a href="https://github.com/Jsoconno/architectures" rel="nofollow noreferrer">source code</a> for the package.  There are other providers such as aws and gcp, but only included a single azure resource example for simplicity.</p>
  <p><strong>setup.py</strong></p>
  <pre><code>import setuptools
  
  with open(&quot;README.md&quot;, &quot;r&quot;, encoding=&quot;utf-8&quot;) as fh:
      long_description = fh.read()
  
  setuptools.setup(
      name=&quot;architectures&quot;,
      version=version,
      author=&quot;Justin O'Connor&quot;,
      author_email=&quot;jsoconno@gmail.com&quot;,
      description=&quot;Tools for creating architecture as code using Python.&quot;,
      long_description=long_description,
      long_description_content_type=&quot;text/markdown&quot;,
      url=&quot;https://github.com/jsoconno/architectures&quot;,
      packages=setuptools.find_packages(),
      include_package_data=True,
      classifiers=[
          &quot;Programming Language :: Python :: 3&quot;,
          &quot;License :: OSI Approved :: MIT License&quot;,
          &quot;Operating System :: OS Independent&quot;,
      ],
      python_requires='&gt;=3.7',
  )
  </code></pre>
  <p><strong>MANIFEST.in</strong></p>
  <pre><code>recursive-include icons *
  </code></pre>
  <p><strong>Simplified SOURCES.txt from architectures.egg-info</strong></p>
  <pre><code>LICENSE
  MANIFEST.in
  README.md
  setup.py
  architectures/__init__.py
  architectures.egg-info/PKG-INFO
  architectures.egg-info/SOURCES.txt
  architectures.egg-info/dependency_links.txt
  architectures.egg-info/top_level.txt
  architectures/core/__init__.py
  architectures/providers/__init__.py
  architectures/providers/aws/__init__.py
  ...
  architectures/themes/__init__.py
  architectures/themes/settings/__init__.py
  icons/aws/analytics/analytics.png
  icons/aws/analytics/athena.png
  icons/aws/analytics/cloudsearch-search-documents.png
  icons/aws/analytics/cloudsearch.png
  icons/aws/analytics/data-pipeline.png
  ...
  
  </code></pre>
  <p>The rest of this file is just references to more icons and more providers.  As you can see, the static content is referenced.  Without the <code>MANIFEST.in</code> or <code>include_package_data=True</code> in <code>setup.py</code> these are not included.</p>
  <p><strong>Simplified RECORD file obtained after a pip install of the package</strong></p>
  <pre><code>architectures-0.2.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
  architectures-0.2.6.dist-info/LICENSE,sha256=HkGqWUVTTaMop6P60XETwa3m-6YB6e9dj-7Z1qvVcPc,1072
  architectures-0.2.6.dist-info/METADATA,sha256=q1B9AHheDrIEFl9bHsE4SxzhmN87RyK5EHtIDkqDWAk,21202
  architectures-0.2.6.dist-info/RECORD,,
  architectures-0.2.6.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
  architectures-0.2.6.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92
  architectures-0.2.6.dist-info/top_level.txt,sha256=Ry8P57aco2wTEkX7F8DbF1AEiCIwLuhQk3DSXj5ZTjk,14
  architectures/*
  architectures/core/*
  architectures/providers/*
  architectures/themes/*
  
  </code></pre>
  <p>I would have also expected to see something like the following in the same file if the static content was downloaded:</p>
  <pre><code>icons/azure/ai/cognitive-services.png,sha256=...
  </code></pre>
  <p>Thank you in advance for any insight.  I have looked at many StackOverflow postings and Google searches, but everything seems to be about including the static content when you publish the package to PiPy and not issues with the static content not being included when you run <code>pip install package-name</code>.</p>
  <p>If anyone is interested, here are the general steps I have been using for testing on my Mac:</p>
  <ol>
  <li>Get to the desktop with <code>cd desktop</code></li>
  <li>Create a new folder with something like <code>mkdir test</code></li>
  <li>Go into that folder <code>cd test</code></li>
  <li>Create a virtual environment `python3 -m venv env</li>
  <li>Activate the environment <code>source env/bin/activate</code></li>
  <li>Install the package <code>pip3 install architectures graphviz</code></li>
  <li>Create a file for the diagram <code>touch architecture.py</code></li>
  <li>Add content as below:</li>
  </ol>
  <pre><code>from architectures.core import *
  from architectures.themes import *
  from architectures.providers.azure.ai import CognitiveServices
  
  theme = DarkMode()
  
  with Graph(&quot;Test&quot;, theme=theme):
      CognitiveServices()
  </code></pre>
  <p>The result has been that the graph is created, but the icon does not show up.</p>