We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: `Notetype` object has no attribute `MethodFilter`
## Summary

I generated a `kolibri-static`via `python setup.py bdist_wheel --static` then install it on my `Windows 7 VM` using pip then run `kolibre manage runserver` 
I got an error see the screenshots below.
## Branch or installer
- Version: `master`
## Screenshots

![screen shot 2016-07-09 at 2 34 43 am](https://cloud.githubusercontent.com/assets/4099119/16698854/182d0d34-4583-11e6-9848-62ea7d2019a1.png)
## How to reproduce
1. cd ~/kolibri in your working machine
2. run command `python setup.py bdist_wheel --static`
3. install the kolibri-static in your Windows 7 virtualbox


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 from __future__ import absolute_import, print_function, unicode_literals
4 
5 import logging
6 import os
7 import shutil
8 import sys
9 
10 from setuptools import setup
11 from setuptools.command.install_scripts import install_scripts
12 
13 # Notice that we dare do this during setup.py -- this enforces a special
14 # restraint on module initialization, namely that it shouldn't do anything
15 # that depends on an installed environment.
16 import kolibri
17 from kolibri import dist as kolibri_dist
18 
19 
20 def read_file(fname):
21     """
22     Read file and decode in py2k
23     """
24     if sys.version_info < (3,):
25         return open(fname).read().decode("utf-8")
26     return open(fname).read()
27 
28 dist_name = 'kolibri'
29 
30 readme = read_file('README.rst')
31 doclink = """
32 Documentation
33 -------------
34 
35 The full documentation is at `http://kolibri.rtfd.org <http://kolibri.rtfd.org>`_."""
36 
37 # Default description of the distributed package
38 description = (
39     """Kolibri education platform for offline environments"""
40 )
41 
42 # Decide if the invoked command is a request to do building
43 is_building_dist = any(
44     [x in sys.argv for x in (
45         "bdist",
46         "sdist",
47         "bdist_wheel",
48         "bdist_deb",
49         "sdist_dsc"
50     )]
51 )
52 
53 static_requirements = []
54 static_dir = os.path.dirname(os.path.realpath(kolibri_dist.__file__))
55 
56 install_requires = [
57     'colorlog',
58     'django>=1.9,<1.10',
59     'django-mptt==0.8.4',
60     'django-js-reverse==0.7.2',
61     'djangorestframework==3.3.3',
62     'docopt',
63     'six',
64 ]
65 
66 # Check if user supplied the special '--static' option
67 if '--static' in sys.argv:
68     sys.argv.remove('--static')
69     dist_name = 'kolibri-static'
70     description += " This static version bundles all dependencies."
71     install_requires, static_requirements = [], install_requires
72     static_build = True
73 
74 
75 ################
76 # Windows code #
77 ################
78 #
79 # Close your eyes
80 
81 BAT_TEMPLATE = \
82     r"""@echo off
83 set mypath=%~dp0
84 set pyscript="%mypath%{FNAME}"
85 set /p line1=<%pyscript%
86 if "%line1:~0,2%" == "#!" (goto :goodstart)
87 echo First line of %pyscript% does not start with "#!"
88 exit /b 1
89 :goodstart
90 set py_exe=%line1:~2%
91 call %py_exe% %pyscript% %*
92 """
93 
94 
95 class bat_install_scripts(install_scripts):
96     """
97     Automatically creates .bat scripts for each executable distributed
98     """
99 
100     def run(self):
101         install_scripts.run(self)
102         if not os.name == "nt":
103             return
104         for filepath in self.get_outputs():
105             # If we can find an executable name in the #! top line of the script
106             # file, make .bat wrapper for script.
107             with open(filepath, 'rt') as fobj:
108                 first_line = fobj.readline()
109             if not (first_line.startswith('#!') and
110                     'python' in first_line.lower()):
111                 continue
112             pth, fname = os.path.split(filepath)
113             froot, ___ = os.path.splitext(fname)
114             bat_file = os.path.join(pth, froot + '.bat')
115             bat_contents = BAT_TEMPLATE.replace('{FNAME}', fname)
116             if self.dry_run:
117                 continue
118             with open(bat_file, 'wt') as fobj:
119                 fobj.write(bat_contents)
120 
121 
122 # You can open your eyes again
123 #
124 #####################
125 # END: Windows code #
126 #####################
127 
128 
129 ######################################
130 # STATIC AND DYNAMIC BUILD SPECIFICS #
131 ######################################
132 
133 def enable_log_to_stdout(logname):
134     """Given a log name, outputs > INFO to stdout."""
135     log = logging.getLogger(logname)
136     log.setLevel(logging.DEBUG)
137     ch = logging.StreamHandler()
138     ch.setLevel(logging.DEBUG)
139     # create formatter
140     formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
141     # add formatter to ch
142     ch.setFormatter(formatter)
143     # add ch to logger
144     log.addHandler(ch)
145 
146 
147 # If it's a static build, we invoke pip to bundle dependencies in python-packages
148 # This would be the case for commands "bdist" and "sdist"
149 if static_requirements and is_building_dist:
150 
151     sys.stderr.write(
152         "This is a static build... invoking pip to put static dependencies in "
153         "dist-packages/\n\n"
154         "Requirements:\n\n" + "\n".join(static_requirements)
155     )
156 
157     current_dir = os.path.dirname(os.path.realpath(__file__))
158     static_cache_dir = os.path.join(current_dir, 'dist-packages-cache')
159     static_temp_dir = os.path.join(current_dir, 'dist-packages-temp')
160 
161     # Create directory where dynamically created dependencies are put
162     if not os.path.exists(static_cache_dir):
163         os.mkdir(static_cache_dir)
164 
165     # Should remove the temporary directory always
166     if os.path.exists(static_temp_dir):
167         sys.stderr.write("Removing previous temporary sources for pip {}".format(static_temp_dir))
168         shutil.rmtree(static_temp_dir)
169 
170     # Install from pip
171 
172     # Code modified from this example:
173     # http://threebean.org/blog/2011/06/06/installing-from-pip-inside-python-or-a-simple-pip-api/
174     import pip.commands.install
175 
176     # Ensure we get output from pip
177     enable_log_to_stdout('pip.commands.install')
178 
179     def install_distributions(distributions):
180         command = pip.commands.install.InstallCommand()
181         opts, ___ = command.parser.parse_args([])
182         opts.target_dir = static_dir
183         opts.build_dir = static_temp_dir
184         opts.download_cache = static_cache_dir
185         opts.isolated = True
186         opts.compile = False
187         opts.ignore_dependencies = True
188         # opts.use_wheel = False
189         opts.no_clean = False
190         command.run(opts, distributions)
191         # requirement_set.source_dir = STATIC_DIST_PACKAGES_TEMP
192         # requirement_set.install(opts)
193 
194     install_distributions(static_requirements)
195 
196 elif is_building_dist:
197 
198     if len(os.listdir(static_dir)) > 3:
199         raise RuntimeError(
200             "Please empty {} - make clean!".format(
201                 static_dir
202             )
203         )
204 
205 
206 setup(
207     name=dist_name,
208     version=kolibri.__version__,
209     description=description,
210     long_description="{readme}\n\n{doclink}".format(
211         readme=readme,
212         doclink=doclink
213     ),
214     author='Learning Equality',
215     author_email='info@learningequality.org',
216     url='https://github.com/learningequality/kolibri',
217     packages=[
218         str('kolibri'),  # https://github.com/pypa/setuptools/pull/597
219     ],
220     entry_points={
221         'console_scripts': [
222             'kolibri = kolibri.utils.cli:main'
223         ]
224     },
225     package_dir={'kolibri': 'kolibri'},
226     include_package_data=True,
227     install_requires=install_requires,
228     setup_requires=['pytest-runner'],
229     tests_require=['pytest', 'tox', 'flake8'],
230     license='MIT',
231     zip_safe=False,
232     keywords='kolibri',
233     classifiers=[
234         'Development Status :: 2 - Pre-Alpha',
235         'Intended Audience :: Developers',
236         'License :: OSI Approved :: MIT License',
237         'Natural Language :: English',
238         'Programming Language :: Python :: 2',
239         'Programming Language :: Python :: 2.7',
240         'Programming Language :: Python :: 3',
241         'Programming Language :: Python :: 3.3',
242         'Programming Language :: Python :: 3.4',
243         'Programming Language :: Python :: 3.5',
244         'Programming Language :: Python :: Implementation :: PyPy',
245     ],
246     cmdclass={
247         'install_scripts': bat_install_scripts  # Windows bat wrapper
248     }
249 )
250
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -56,6 +56,7 @@
 install_requires = [
     'colorlog',
     'django>=1.9,<1.10',
+    'django-filter>=0.13.0',
     'django-mptt==0.8.4',
     'django-js-reverse==0.7.2',
     'djangorestframework==3.3.3',

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -56,6 +56,7 @@\n install_requires = [\n     'colorlog',\n     'django>=1.9,<1.10',\n+    'django-filter>=0.13.0',\n     'django-mptt==0.8.4',\n     'django-js-reverse==0.7.2',\n     'djangorestframework==3.3.3',\n", "issue": "AttributeError: `Notetype` object has no attribute `MethodFilter`\n## Summary\n\nI generated a `kolibri-static`via `python setup.py bdist_wheel --static` then install it on my `Windows 7 VM` using pip then run `kolibre manage runserver` \nI got an error see the screenshots below.\n## Branch or installer\n- Version: `master`\n## Screenshots\n\n![screen shot 2016-07-09 at 2 34 43 am](https://cloud.githubusercontent.com/assets/4099119/16698854/182d0d34-4583-11e6-9848-62ea7d2019a1.png)\n## How to reproduce\n1. cd ~/kolibri in your working machine\n2. run command `python setup.py bdist_wheel --static`\n3. install the kolibri-static in your Windows 7 virtualbox\n\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport logging\nimport os\nimport shutil\nimport sys\n\nfrom setuptools import setup\nfrom setuptools.command.install_scripts import install_scripts\n\n# Notice that we dare do this during setup.py -- this enforces a special\n# restraint on module initialization, namely that it shouldn't do anything\n# that depends on an installed environment.\nimport kolibri\nfrom kolibri import dist as kolibri_dist\n\n\ndef read_file(fname):\n    \"\"\"\n    Read file and decode in py2k\n    \"\"\"\n    if sys.version_info < (3,):\n        return open(fname).read().decode(\"utf-8\")\n    return open(fname).read()\n\ndist_name = 'kolibri'\n\nreadme = read_file('README.rst')\ndoclink = \"\"\"\nDocumentation\n-------------\n\nThe full documentation is at `http://kolibri.rtfd.org <http://kolibri.rtfd.org>`_.\"\"\"\n\n# Default description of the distributed package\ndescription = (\n    \"\"\"Kolibri education platform for offline environments\"\"\"\n)\n\n# Decide if the invoked command is a request to do building\nis_building_dist = any(\n    [x in sys.argv for x in (\n        \"bdist\",\n        \"sdist\",\n        \"bdist_wheel\",\n        \"bdist_deb\",\n        \"sdist_dsc\"\n    )]\n)\n\nstatic_requirements = []\nstatic_dir = os.path.dirname(os.path.realpath(kolibri_dist.__file__))\n\ninstall_requires = [\n    'colorlog',\n    'django>=1.9,<1.10',\n    'django-mptt==0.8.4',\n    'django-js-reverse==0.7.2',\n    'djangorestframework==3.3.3',\n    'docopt',\n    'six',\n]\n\n# Check if user supplied the special '--static' option\nif '--static' in sys.argv:\n    sys.argv.remove('--static')\n    dist_name = 'kolibri-static'\n    description += \" This static version bundles all dependencies.\"\n    install_requires, static_requirements = [], install_requires\n    static_build = True\n\n\n################\n# Windows code #\n################\n#\n# Close your eyes\n\nBAT_TEMPLATE = \\\n    r\"\"\"@echo off\nset mypath=%~dp0\nset pyscript=\"%mypath%{FNAME}\"\nset /p line1=<%pyscript%\nif \"%line1:~0,2%\" == \"#!\" (goto :goodstart)\necho First line of %pyscript% does not start with \"#!\"\nexit /b 1\n:goodstart\nset py_exe=%line1:~2%\ncall %py_exe% %pyscript% %*\n\"\"\"\n\n\nclass bat_install_scripts(install_scripts):\n    \"\"\"\n    Automatically creates .bat scripts for each executable distributed\n    \"\"\"\n\n    def run(self):\n        install_scripts.run(self)\n        if not os.name == \"nt\":\n            return\n        for filepath in self.get_outputs():\n            # If we can find an executable name in the #! top line of the script\n            # file, make .bat wrapper for script.\n            with open(filepath, 'rt') as fobj:\n                first_line = fobj.readline()\n            if not (first_line.startswith('#!') and\n                    'python' in first_line.lower()):\n                continue\n            pth, fname = os.path.split(filepath)\n            froot, ___ = os.path.splitext(fname)\n            bat_file = os.path.join(pth, froot + '.bat')\n            bat_contents = BAT_TEMPLATE.replace('{FNAME}', fname)\n            if self.dry_run:\n                continue\n            with open(bat_file, 'wt') as fobj:\n                fobj.write(bat_contents)\n\n\n# You can open your eyes again\n#\n#####################\n# END: Windows code #\n#####################\n\n\n######################################\n# STATIC AND DYNAMIC BUILD SPECIFICS #\n######################################\n\ndef enable_log_to_stdout(logname):\n    \"\"\"Given a log name, outputs > INFO to stdout.\"\"\"\n    log = logging.getLogger(logname)\n    log.setLevel(logging.DEBUG)\n    ch = logging.StreamHandler()\n    ch.setLevel(logging.DEBUG)\n    # create formatter\n    formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n    # add formatter to ch\n    ch.setFormatter(formatter)\n    # add ch to logger\n    log.addHandler(ch)\n\n\n# If it's a static build, we invoke pip to bundle dependencies in python-packages\n# This would be the case for commands \"bdist\" and \"sdist\"\nif static_requirements and is_building_dist:\n\n    sys.stderr.write(\n        \"This is a static build... invoking pip to put static dependencies in \"\n        \"dist-packages/\\n\\n\"\n        \"Requirements:\\n\\n\" + \"\\n\".join(static_requirements)\n    )\n\n    current_dir = os.path.dirname(os.path.realpath(__file__))\n    static_cache_dir = os.path.join(current_dir, 'dist-packages-cache')\n    static_temp_dir = os.path.join(current_dir, 'dist-packages-temp')\n\n    # Create directory where dynamically created dependencies are put\n    if not os.path.exists(static_cache_dir):\n        os.mkdir(static_cache_dir)\n\n    # Should remove the temporary directory always\n    if os.path.exists(static_temp_dir):\n        sys.stderr.write(\"Removing previous temporary sources for pip {}\".format(static_temp_dir))\n        shutil.rmtree(static_temp_dir)\n\n    # Install from pip\n\n    # Code modified from this example:\n    # http://threebean.org/blog/2011/06/06/installing-from-pip-inside-python-or-a-simple-pip-api/\n    import pip.commands.install\n\n    # Ensure we get output from pip\n    enable_log_to_stdout('pip.commands.install')\n\n    def install_distributions(distributions):\n        command = pip.commands.install.InstallCommand()\n        opts, ___ = command.parser.parse_args([])\n        opts.target_dir = static_dir\n        opts.build_dir = static_temp_dir\n        opts.download_cache = static_cache_dir\n        opts.isolated = True\n        opts.compile = False\n        opts.ignore_dependencies = True\n        # opts.use_wheel = False\n        opts.no_clean = False\n        command.run(opts, distributions)\n        # requirement_set.source_dir = STATIC_DIST_PACKAGES_TEMP\n        # requirement_set.install(opts)\n\n    install_distributions(static_requirements)\n\nelif is_building_dist:\n\n    if len(os.listdir(static_dir)) > 3:\n        raise RuntimeError(\n            \"Please empty {} - make clean!\".format(\n                static_dir\n            )\n        )\n\n\nsetup(\n    name=dist_name,\n    version=kolibri.__version__,\n    description=description,\n    long_description=\"{readme}\\n\\n{doclink}\".format(\n        readme=readme,\n        doclink=doclink\n    ),\n    author='Learning Equality',\n    author_email='info@learningequality.org',\n    url='https://github.com/learningequality/kolibri',\n    packages=[\n        str('kolibri'),  # https://github.com/pypa/setuptools/pull/597\n    ],\n    entry_points={\n        'console_scripts': [\n            'kolibri = kolibri.utils.cli:main'\n        ]\n    },\n    package_dir={'kolibri': 'kolibri'},\n    include_package_data=True,\n    install_requires=install_requires,\n    setup_requires=['pytest-runner'],\n    tests_require=['pytest', 'tox', 'flake8'],\n    license='MIT',\n    zip_safe=False,\n    keywords='kolibri',\n    classifiers=[\n        'Development Status :: 2 - Pre-Alpha',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: MIT License',\n        'Natural Language :: English',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: Implementation :: PyPy',\n    ],\n    cmdclass={\n        'install_scripts': bat_install_scripts  # Windows bat wrapper\n    }\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport logging\nimport os\nimport shutil\nimport sys\n\nfrom setuptools import setup\nfrom setuptools.command.install_scripts import install_scripts\n\n# Notice that we dare do this during setup.py -- this enforces a special\n# restraint on module initialization, namely that it shouldn't do anything\n# that depends on an installed environment.\nimport kolibri\nfrom kolibri import dist as kolibri_dist\n\n\ndef read_file(fname):\n    \"\"\"\n    Read file and decode in py2k\n    \"\"\"\n    if sys.version_info < (3,):\n        return open(fname).read().decode(\"utf-8\")\n    return open(fname).read()\n\ndist_name = 'kolibri'\n\nreadme = read_file('README.rst')\ndoclink = \"\"\"\nDocumentation\n-------------\n\nThe full documentation is at `http://kolibri.rtfd.org <http://kolibri.rtfd.org>`_.\"\"\"\n\n# Default description of the distributed package\ndescription = (\n    \"\"\"Kolibri education platform for offline environments\"\"\"\n)\n\n# Decide if the invoked command is a request to do building\nis_building_dist = any(\n    [x in sys.argv for x in (\n        \"bdist\",\n        \"sdist\",\n        \"bdist_wheel\",\n        \"bdist_deb\",\n        \"sdist_dsc\"\n    )]\n)\n\nstatic_requirements = []\nstatic_dir = os.path.dirname(os.path.realpath(kolibri_dist.__file__))\n\ninstall_requires = [\n    'colorlog',\n    'django>=1.9,<1.10',\n    'django-filter>=0.13.0',\n    'django-mptt==0.8.4',\n    'django-js-reverse==0.7.2',\n    'djangorestframework==3.3.3',\n    'docopt',\n    'six',\n]\n\n# Check if user supplied the special '--static' option\nif '--static' in sys.argv:\n    sys.argv.remove('--static')\n    dist_name = 'kolibri-static'\n    description += \" This static version bundles all dependencies.\"\n    install_requires, static_requirements = [], install_requires\n    static_build = True\n\n\n################\n# Windows code #\n################\n#\n# Close your eyes\n\nBAT_TEMPLATE = \\\n    r\"\"\"@echo off\nset mypath=%~dp0\nset pyscript=\"%mypath%{FNAME}\"\nset /p line1=<%pyscript%\nif \"%line1:~0,2%\" == \"#!\" (goto :goodstart)\necho First line of %pyscript% does not start with \"#!\"\nexit /b 1\n:goodstart\nset py_exe=%line1:~2%\ncall %py_exe% %pyscript% %*\n\"\"\"\n\n\nclass bat_install_scripts(install_scripts):\n    \"\"\"\n    Automatically creates .bat scripts for each executable distributed\n    \"\"\"\n\n    def run(self):\n        install_scripts.run(self)\n        if not os.name == \"nt\":\n            return\n        for filepath in self.get_outputs():\n            # If we can find an executable name in the #! top line of the script\n            # file, make .bat wrapper for script.\n            with open(filepath, 'rt') as fobj:\n                first_line = fobj.readline()\n            if not (first_line.startswith('#!') and\n                    'python' in first_line.lower()):\n                continue\n            pth, fname = os.path.split(filepath)\n            froot, ___ = os.path.splitext(fname)\n            bat_file = os.path.join(pth, froot + '.bat')\n            bat_contents = BAT_TEMPLATE.replace('{FNAME}', fname)\n            if self.dry_run:\n                continue\n            with open(bat_file, 'wt') as fobj:\n                fobj.write(bat_contents)\n\n\n# You can open your eyes again\n#\n#####################\n# END: Windows code #\n#####################\n\n\n######################################\n# STATIC AND DYNAMIC BUILD SPECIFICS #\n######################################\n\ndef enable_log_to_stdout(logname):\n    \"\"\"Given a log name, outputs > INFO to stdout.\"\"\"\n    log = logging.getLogger(logname)\n    log.setLevel(logging.DEBUG)\n    ch = logging.StreamHandler()\n    ch.setLevel(logging.DEBUG)\n    # create formatter\n    formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n    # add formatter to ch\n    ch.setFormatter(formatter)\n    # add ch to logger\n    log.addHandler(ch)\n\n\n# If it's a static build, we invoke pip to bundle dependencies in python-packages\n# This would be the case for commands \"bdist\" and \"sdist\"\nif static_requirements and is_building_dist:\n\n    sys.stderr.write(\n        \"This is a static build... invoking pip to put static dependencies in \"\n        \"dist-packages/\\n\\n\"\n        \"Requirements:\\n\\n\" + \"\\n\".join(static_requirements)\n    )\n\n    current_dir = os.path.dirname(os.path.realpath(__file__))\n    static_cache_dir = os.path.join(current_dir, 'dist-packages-cache')\n    static_temp_dir = os.path.join(current_dir, 'dist-packages-temp')\n\n    # Create directory where dynamically created dependencies are put\n    if not os.path.exists(static_cache_dir):\n        os.mkdir(static_cache_dir)\n\n    # Should remove the temporary directory always\n    if os.path.exists(static_temp_dir):\n        sys.stderr.write(\"Removing previous temporary sources for pip {}\".format(static_temp_dir))\n        shutil.rmtree(static_temp_dir)\n\n    # Install from pip\n\n    # Code modified from this example:\n    # http://threebean.org/blog/2011/06/06/installing-from-pip-inside-python-or-a-simple-pip-api/\n    import pip.commands.install\n\n    # Ensure we get output from pip\n    enable_log_to_stdout('pip.commands.install')\n\n    def install_distributions(distributions):\n        command = pip.commands.install.InstallCommand()\n        opts, ___ = command.parser.parse_args([])\n        opts.target_dir = static_dir\n        opts.build_dir = static_temp_dir\n        opts.download_cache = static_cache_dir\n        opts.isolated = True\n        opts.compile = False\n        opts.ignore_dependencies = True\n        # opts.use_wheel = False\n        opts.no_clean = False\n        command.run(opts, distributions)\n        # requirement_set.source_dir = STATIC_DIST_PACKAGES_TEMP\n        # requirement_set.install(opts)\n\n    install_distributions(static_requirements)\n\nelif is_building_dist:\n\n    if len(os.listdir(static_dir)) > 3:\n        raise RuntimeError(\n            \"Please empty {} - make clean!\".format(\n                static_dir\n            )\n        )\n\n\nsetup(\n    name=dist_name,\n    version=kolibri.__version__,\n    description=description,\n    long_description=\"{readme}\\n\\n{doclink}\".format(\n        readme=readme,\n        doclink=doclink\n    ),\n    author='Learning Equality',\n    author_email='info@learningequality.org',\n    url='https://github.com/learningequality/kolibri',\n    packages=[\n        str('kolibri'),  # https://github.com/pypa/setuptools/pull/597\n    ],\n    entry_points={\n        'console_scripts': [\n            'kolibri = kolibri.utils.cli:main'\n        ]\n    },\n    package_dir={'kolibri': 'kolibri'},\n    include_package_data=True,\n    install_requires=install_requires,\n    setup_requires=['pytest-runner'],\n    tests_require=['pytest', 'tox', 'flake8'],\n    license='MIT',\n    zip_safe=False,\n    keywords='kolibri',\n    classifiers=[\n        'Development Status :: 2 - Pre-Alpha',\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: MIT License',\n        'Natural Language :: English',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: Implementation :: PyPy',\n    ],\n    cmdclass={\n        'install_scripts': bat_install_scripts  # Windows bat wrapper\n    }\n)\n", "path": "setup.py"}]}