'method' object is not iterable from calling splitlines from a read method
<p>Currently trying to setup my setup.py file for pip installation or simply python setup.py develop installation, however when I run the code, it faults saying that the method is not iterable, regarding to my read function.</p>

<p>The code is as follows for setup.py</p>

<pre><code>from setuptools import setup, find_packages
import os

def read(filename):
    with open(os.path.join(os.path.dirname(__file__), filename)) as f:
        return f.read()

setup(
    name='example',
    version='1.0',
    description='example',
    url='https://github.com/example',
    author='Example',
    author_email='iam@example.com',
    packages=find_packages,
    install_requires=read('requirements.txt').splitlines(),
    zip_safe=False
)
</code></pre>

<p>And finally the error I receive is,</p>

<pre><code>Traceback (most recent call last):
  File "setup.py", line 16, in &lt;module&gt;
install_requires=read('requirements.txt').splitlines()
  File "C:\Python35\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
  File "C:\Python35\lib\site-packages\setuptools\dist.py", line 272, in __init__
_Distribution.__init__(self,attrs)
  File "C:\Python35\lib\distutils\dist.py", line 281, in __init__
self.finalize_options()
  File "C:\Python35\lib\site-packages\setuptools\dist.py", line 327, in finalize_options
    ep.load()(self, ep.name, value)
  File "C:\Python35\lib\site-packages\setuptools\dist.py", line 161, in  check_packages
    for pkgname in value:
TypeError: 'method' object is not iterable
</code></pre>

<p>This line is missing the call parens you need:</p>

<pre><code>packages=find_packages,
</code></pre>

<p>Change it to:</p>

<pre><code>packages=find_packages(),
</code></pre>

python django