How to exclude a single file from package with setuptools and setup.py
<p>I am working on <code>blowdrycss</code>. The repository is <a href="https://github.com/nueverest/blowdrycss" rel="noreferrer">here</a>. </p>

<p>I want the settings file for <code>blowdrycss_settings.py</code> to be excluded from the final package on pypi. The intention is to dynamically build a custom settings file that will be placed in the users virtualenv / project folder. </p>

<p>In <code>setup.py</code>, I have the following:</p>

<pre><code>packages=find_packages(exclude=['blowdrycss_settings.py', ]),
</code></pre>

<p>I also tried <a href="https://pythonhosted.org/setuptools/setuptools.html#including-data-files" rel="noreferrer">exclude_package_data</a>:</p>

<pre><code>exclude_package_data={
    '': ['blowdrycss_settings.py'],
    '': ['blowdrycss/blowdrycss_settings.py'],
    'blowdrycss': ['blowdrycss_settings.py'],
},
</code></pre>

<p>I then run <code>python setup.py sdist bdist</code>.</p>

<p>However, when I look in the build folder I still see <code>blowdrycss_settings.py</code>:</p>

<pre><code>- build 
    - lib
        - blowdrycss_settings.py
</code></pre>

<p>It seems like it should be simple to just exclude a file. </p>

<p>How do I exclude <code>blowdrycss_settings.py</code> from the distributed package?</p>