<div dir="ltr">It looks like the following setup.py will do what I want, but it won't install the examples when I use --target:<br><br>from setuptools import setup, find_packages<br>from codecs import open<br>from os import path<br><br>with open(path.join('.', 'README.md'), encoding='utf-8') as f:<br>   long_description = f.read()<br><br>setup(<br>   name='kivydnd',<br>   version='0.5.0',<br>   description='Kivy Drag-n-Drop for Widgets',<br>   long_description=long_description,<br>   long_description_content_type='text/markdown',<br>   url='<a href="https://github.com/GreyGnome/KivyDnD">https://github.com/GreyGnome/KivyDnD</a>',<br>   author='GreyGnome',<br>   author_email='<a href="mailto:mschwage@gmail.com">mschwage@gmail.com</a>',<br>   license='Apache License 2.0',<br>   keywords='kivy drag-n-drop',<br>   packages=find_packages(exclude=[]),<br>   data_files=[('share/kivydnd-examples',<br>       [<br>           'examples/dndexample1.py',<br>           'examples/dndexample2.py',<br>           'examples/dndexample3.py',<br>           'examples/dndexample_copy_draggable.py',<br>           'examples/dndexample_drop_groups.py',<br>           'examples/dndexample_relative_layout.py',<br>           'examples/example_base_classes.py',<br>           'examples/example_base_classes.pyc',<br>       ]<br>   )],<br>)<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 7, 2018 at 12:48 AM, Michael Schwager <span dir="ltr"><<a href="mailto:mschwage@gmail.com" target="_blank">mschwage@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>I am trying to install a module with a package and also an examples directory. How do I get my examples installed on users' machines into a reasonable location, in a cross-platform kind of way?</div><div><br></div><div> I notice that a number of Python examples are installed in /usr/share (in Linux) or in  <home>\AppData\Local\Programs\<wbr>Python\Python36\Share on Windows 8.</div><div><br></div><div>So in my setup.py, I have this:</div><div><br></div>from setuptools import setup, find_packages<br>from codecs import open<br>from os import path<br><br>with open(path.join('.', 'README.md'), encoding='utf-8') as f:<br>   long_description = f.read()<br><br>setup(<br>   name='kivydnd',<br>   version='0.5.0',<br>   description='Kivy Drag-n-Drop for Widgets',<br>   long_description=long_<wbr>description,<br>   long_description_content_<wbr>type='text/markdown',<br>   url='<a href="https://github.com/GreyGnome/KivyDnD" target="_blank">https://github.com/<wbr>GreyGnome/KivyDnD</a>',<br>   author='GreyGnome',<br>   author_email='<a href="mailto:myemail@example.com" target="_blank">myemail@<wbr>example.com</a>',<br>   license='Apache License 2.0',<br>   keywords='kivy drag-n-drop',<br>   packages=find_packages(<wbr>exclude=[]),<br>   data_files=[('share/kivydnd-<wbr>examples', ['examples/dndexample1.py',])]<wbr>,<br>)<br><br>But when I try to install them on Linux, I don't see the dndexample1.py file anywhere:<br><br>python setup.py sdist<br>pip install --target=/home/schwager/lib/<wbr>python dist/kivydnd-0.5.0.tar.gz --log /tmp/piplog<br><br>(Note that I am using a different target for testing).<br><br>The piplog shows that it at least tried to do something with the examples, but I can find a directory by that name anywhere in my home directory:<br><br><snippet from log><br>   creating /tmp/tmpirrDx8/share/kivydnd-<wbr>examples<br>   copying examples/dndexample1.py -> /tmp/tmpirrDx8/share/kivydnd-<wbr>examples<div><span style="font-family:monospace"><br></span></div><div><div>Thanks!</div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-411341960950426699gmail_signature">-Mike Schwager</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">-Mike Schwager</div>
</div>