We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove sub modules
We often have problems, when building plugins. Plugins have another release pace than the server.

We should remove the submodules
* pam_python
* freeradius
* simplesamlphp
* adminclient

and give them their own versioning. 
The debian build environment has to be added/moved to those repositories.

--- 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 # -*- coding: utf-8 -*-
2 from setuptools import setup, find_packages
3 import os
4 import stat
5 import sys
6 
7 #VERSION="2.1dev4"
8 VERSION="3.0dev1"
9 
10 # Taken from kennethreitz/requests/setup.py
11 package_directory = os.path.realpath(os.path.dirname(__file__))
12 
13 
14 def get_file_contents(file_path):
15     """Get the context of the file using full path name."""
16     content = ""
17     try:
18         full_path = os.path.join(package_directory, file_path)
19         content = open(full_path, 'r').read()
20     except:
21         print >> sys.stderr, "### could not open file {0!r}".format(file_path)
22     return content
23 
24 def get_file_list(file_path):
25     full_path = os.path.join(package_directory, file_path)
26     file_list = os.listdir(full_path)
27     # now we need to add the path to the files
28     return [ file_path + f for f in file_list ]
29 
30 
31 install_requires = ["Flask>=0.10.1",
32                     "Flask-Migrate>=1.2.0",
33                     "Flask-SQLAlchemy>=2.0",
34                     "Flask-Script>=2.0.5",
35                     "Jinja2>=2.7.3",
36                     "Mako>=0.9.1",
37                     "MarkupSafe>=0.23",
38                     "PyMySQL>=0.6.6",
39                     "Pillow>=2.6.1",
40                     "PyJWT>=1.3.0",
41                     "PyYAML>=3.11",
42                     "Pygments>=2.0.2",
43                     "SQLAlchemy>=1.0.5",
44                     "Werkzeug>=0.10.4",
45                     "alembic>=0.6.7",
46                     "argparse>=1.2.1",
47                     "bcrypt>=1.1.0",
48                     "beautifulsoup4>=4.3.2",
49                     "cffi>=0.8.6",
50                     "configobj>=5.0.6",
51                     "docutils>=0.12",
52                     "funcparserlib>=0.3.6",
53                     "itsdangerous>=0.24",
54                     "ldap3>=2.5",
55                     "netaddr>=0.7.12",
56                     "passlib>=1.6.2",
57                     "pyasn1>=0.4.2",
58                     "pyOpenSSL>=17.5",
59                     "pycparser>=2.10",
60                     "pycrypto>=2.6.1",
61                     "pyrad>=2.0",
62                     "pyusb>=1.0.0b2",
63                     "qrcode>=5.1",
64                     "requests>=2.7.0",
65                     "sqlsoup>=0.9.0",
66                     "ecdsa>=0.13",
67                     "lxml>=3.3",
68                     "python-gnupg>=0.3.8",
69                     "defusedxml>=0.4.1",
70                     "flask-babel>=0.9",
71                     "croniter>=0.3.8",
72                     "oauth2client>=2.0.1"
73                     ]
74 
75 # For python 2.6 we need additional dependency importlib
76 try:
77     import importlib
78 except ImportError:
79     install_requires.append('importlib')
80 
81 
82 def get_man_pages(dir):
83     """
84     Get man pages in a directory.
85     :param dir: 
86     :return: list of file names
87     """
88     files = os.listdir(dir)
89     r_files = []
90     for file in files:
91         if file.endswith(".1"):
92             r_files.append(dir + "/" + file)
93     return r_files
94 
95 
96 def get_scripts(dir):
97     """
98     Get files that are executable
99     :param dir: 
100     :return: list of file names
101     """
102     files = os.listdir(dir)
103     r_files = []
104     for file in files:
105         if os.stat(dir + "/" + file)[stat.ST_MODE] & stat.S_IEXEC:
106             r_files.append(dir + "/" + file)
107     return r_files
108 
109 
110 setup(
111     name='privacyIDEA',
112     version=VERSION,
113     description='privacyIDEA: identity, multifactor authentication (OTP), '
114                 'authorization, audit',
115     author='privacyidea.org',
116     license='AGPLv3',
117     author_email='cornelius@privacyidea.org',
118     url='http://www.privacyidea.org',
119     keywords='OTP, two factor authentication, management, security',
120     packages=find_packages(),
121     scripts=["pi-manage"] + get_scripts("tools"),
122     extras_require={
123         'dev': ["Sphinx>=1.3.1",
124                 "sphinxcontrib-httpdomain>=1.3.0"],
125         'test': ["coverage>=3.7.1",
126                  "mock>=1.0.1",
127                  "pyparsing>=2.0.3",
128                  "nose>=1.3.4",
129                  "responses>=0.4.0",
130                  "six>=1.8.0"],
131     },
132     install_requires=install_requires,
133     include_package_data=True,
134     data_files=[('etc/privacyidea/',
135                  ['deploy/apache/privacyideaapp.wsgi',
136                   'deploy/privacyidea/dictionary',
137                   'deploy/privacyidea/enckey',
138                   'deploy/privacyidea/private.pem',
139                   'deploy/privacyidea/public.pem']),
140                 ('share/man/man1', get_man_pages("tools")),
141                 ('lib/privacyidea/authmodules/FreeRADIUS',
142                  ["authmodules/FreeRADIUS/LICENSE",
143                   "authmodules/FreeRADIUS/privacyidea_radius.pm"]),
144                ('lib/privacyidea/authmodules/OTRS',
145                  ["authmodules/OTRS/privacyIDEA.pm"]),
146                 ('lib/privacyidea/migrations',
147                  ["migrations/alembic.ini",
148                   "migrations/env.py",
149                   "migrations/README",
150                   "migrations/script.py.mako"]),
151                 ('lib/privacyidea/migrations/versions',
152                  get_file_list("migrations/versions/"))
153                 ],
154     classifiers=["Framework :: Flask",
155                  "License :: OSI Approved :: "
156                  "GNU Affero General Public License v3",
157                  "Programming Language :: Python",
158                  "Development Status :: 5 - Production/Stable",
159                  "Topic :: Internet",
160                  "Topic :: Security",
161                  "Topic :: System ::"
162                  " Systems Administration :: Authentication/Directory"
163                  ],
164     #message_extractors={'privacyidea': [
165     #        ('**.py', 'python', None),
166     #        ('static/**.html', 'html', {'input_encoding': 'utf-8'})]},
167     zip_safe=False,
168     long_description=get_file_contents('README.rst')
169 )
170
```
--- 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
@@ -138,9 +138,6 @@
                   'deploy/privacyidea/private.pem',
                   'deploy/privacyidea/public.pem']),
                 ('share/man/man1', get_man_pages("tools")),
-                ('lib/privacyidea/authmodules/FreeRADIUS',
-                 ["authmodules/FreeRADIUS/LICENSE",
-                  "authmodules/FreeRADIUS/privacyidea_radius.pm"]),
                ('lib/privacyidea/authmodules/OTRS',
                  ["authmodules/OTRS/privacyIDEA.pm"]),
                 ('lib/privacyidea/migrations',

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -138,9 +138,6 @@\n                   'deploy/privacyidea/private.pem',\n                   'deploy/privacyidea/public.pem']),\n                 ('share/man/man1', get_man_pages(\"tools\")),\n-                ('lib/privacyidea/authmodules/FreeRADIUS',\n-                 [\"authmodules/FreeRADIUS/LICENSE\",\n-                  \"authmodules/FreeRADIUS/privacyidea_radius.pm\"]),\n                ('lib/privacyidea/authmodules/OTRS',\n                  [\"authmodules/OTRS/privacyIDEA.pm\"]),\n                 ('lib/privacyidea/migrations',\n", "issue": "Remove sub modules\nWe often have problems, when building plugins. Plugins have another release pace than the server.\r\n\r\nWe should remove the submodules\r\n* pam_python\r\n* freeradius\r\n* simplesamlphp\r\n* adminclient\r\n\r\nand give them their own versioning. \r\nThe debian build environment has to be added/moved to those repositories.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nimport os\nimport stat\nimport sys\n\n#VERSION=\"2.1dev4\"\nVERSION=\"3.0dev1\"\n\n# Taken from kennethreitz/requests/setup.py\npackage_directory = os.path.realpath(os.path.dirname(__file__))\n\n\ndef get_file_contents(file_path):\n    \"\"\"Get the context of the file using full path name.\"\"\"\n    content = \"\"\n    try:\n        full_path = os.path.join(package_directory, file_path)\n        content = open(full_path, 'r').read()\n    except:\n        print >> sys.stderr, \"### could not open file {0!r}\".format(file_path)\n    return content\n\ndef get_file_list(file_path):\n    full_path = os.path.join(package_directory, file_path)\n    file_list = os.listdir(full_path)\n    # now we need to add the path to the files\n    return [ file_path + f for f in file_list ]\n\n\ninstall_requires = [\"Flask>=0.10.1\",\n                    \"Flask-Migrate>=1.2.0\",\n                    \"Flask-SQLAlchemy>=2.0\",\n                    \"Flask-Script>=2.0.5\",\n                    \"Jinja2>=2.7.3\",\n                    \"Mako>=0.9.1\",\n                    \"MarkupSafe>=0.23\",\n                    \"PyMySQL>=0.6.6\",\n                    \"Pillow>=2.6.1\",\n                    \"PyJWT>=1.3.0\",\n                    \"PyYAML>=3.11\",\n                    \"Pygments>=2.0.2\",\n                    \"SQLAlchemy>=1.0.5\",\n                    \"Werkzeug>=0.10.4\",\n                    \"alembic>=0.6.7\",\n                    \"argparse>=1.2.1\",\n                    \"bcrypt>=1.1.0\",\n                    \"beautifulsoup4>=4.3.2\",\n                    \"cffi>=0.8.6\",\n                    \"configobj>=5.0.6\",\n                    \"docutils>=0.12\",\n                    \"funcparserlib>=0.3.6\",\n                    \"itsdangerous>=0.24\",\n                    \"ldap3>=2.5\",\n                    \"netaddr>=0.7.12\",\n                    \"passlib>=1.6.2\",\n                    \"pyasn1>=0.4.2\",\n                    \"pyOpenSSL>=17.5\",\n                    \"pycparser>=2.10\",\n                    \"pycrypto>=2.6.1\",\n                    \"pyrad>=2.0\",\n                    \"pyusb>=1.0.0b2\",\n                    \"qrcode>=5.1\",\n                    \"requests>=2.7.0\",\n                    \"sqlsoup>=0.9.0\",\n                    \"ecdsa>=0.13\",\n                    \"lxml>=3.3\",\n                    \"python-gnupg>=0.3.8\",\n                    \"defusedxml>=0.4.1\",\n                    \"flask-babel>=0.9\",\n                    \"croniter>=0.3.8\",\n                    \"oauth2client>=2.0.1\"\n                    ]\n\n# For python 2.6 we need additional dependency importlib\ntry:\n    import importlib\nexcept ImportError:\n    install_requires.append('importlib')\n\n\ndef get_man_pages(dir):\n    \"\"\"\n    Get man pages in a directory.\n    :param dir: \n    :return: list of file names\n    \"\"\"\n    files = os.listdir(dir)\n    r_files = []\n    for file in files:\n        if file.endswith(\".1\"):\n            r_files.append(dir + \"/\" + file)\n    return r_files\n\n\ndef get_scripts(dir):\n    \"\"\"\n    Get files that are executable\n    :param dir: \n    :return: list of file names\n    \"\"\"\n    files = os.listdir(dir)\n    r_files = []\n    for file in files:\n        if os.stat(dir + \"/\" + file)[stat.ST_MODE] & stat.S_IEXEC:\n            r_files.append(dir + \"/\" + file)\n    return r_files\n\n\nsetup(\n    name='privacyIDEA',\n    version=VERSION,\n    description='privacyIDEA: identity, multifactor authentication (OTP), '\n                'authorization, audit',\n    author='privacyidea.org',\n    license='AGPLv3',\n    author_email='cornelius@privacyidea.org',\n    url='http://www.privacyidea.org',\n    keywords='OTP, two factor authentication, management, security',\n    packages=find_packages(),\n    scripts=[\"pi-manage\"] + get_scripts(\"tools\"),\n    extras_require={\n        'dev': [\"Sphinx>=1.3.1\",\n                \"sphinxcontrib-httpdomain>=1.3.0\"],\n        'test': [\"coverage>=3.7.1\",\n                 \"mock>=1.0.1\",\n                 \"pyparsing>=2.0.3\",\n                 \"nose>=1.3.4\",\n                 \"responses>=0.4.0\",\n                 \"six>=1.8.0\"],\n    },\n    install_requires=install_requires,\n    include_package_data=True,\n    data_files=[('etc/privacyidea/',\n                 ['deploy/apache/privacyideaapp.wsgi',\n                  'deploy/privacyidea/dictionary',\n                  'deploy/privacyidea/enckey',\n                  'deploy/privacyidea/private.pem',\n                  'deploy/privacyidea/public.pem']),\n                ('share/man/man1', get_man_pages(\"tools\")),\n                ('lib/privacyidea/authmodules/FreeRADIUS',\n                 [\"authmodules/FreeRADIUS/LICENSE\",\n                  \"authmodules/FreeRADIUS/privacyidea_radius.pm\"]),\n               ('lib/privacyidea/authmodules/OTRS',\n                 [\"authmodules/OTRS/privacyIDEA.pm\"]),\n                ('lib/privacyidea/migrations',\n                 [\"migrations/alembic.ini\",\n                  \"migrations/env.py\",\n                  \"migrations/README\",\n                  \"migrations/script.py.mako\"]),\n                ('lib/privacyidea/migrations/versions',\n                 get_file_list(\"migrations/versions/\"))\n                ],\n    classifiers=[\"Framework :: Flask\",\n                 \"License :: OSI Approved :: \"\n                 \"GNU Affero General Public License v3\",\n                 \"Programming Language :: Python\",\n                 \"Development Status :: 5 - Production/Stable\",\n                 \"Topic :: Internet\",\n                 \"Topic :: Security\",\n                 \"Topic :: System ::\"\n                 \" Systems Administration :: Authentication/Directory\"\n                 ],\n    #message_extractors={'privacyidea': [\n    #        ('**.py', 'python', None),\n    #        ('static/**.html', 'html', {'input_encoding': 'utf-8'})]},\n    zip_safe=False,\n    long_description=get_file_contents('README.rst')\n)\n", "path": "setup.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nimport os\nimport stat\nimport sys\n\n#VERSION=\"2.1dev4\"\nVERSION=\"3.0dev1\"\n\n# Taken from kennethreitz/requests/setup.py\npackage_directory = os.path.realpath(os.path.dirname(__file__))\n\n\ndef get_file_contents(file_path):\n    \"\"\"Get the context of the file using full path name.\"\"\"\n    content = \"\"\n    try:\n        full_path = os.path.join(package_directory, file_path)\n        content = open(full_path, 'r').read()\n    except:\n        print >> sys.stderr, \"### could not open file {0!r}\".format(file_path)\n    return content\n\ndef get_file_list(file_path):\n    full_path = os.path.join(package_directory, file_path)\n    file_list = os.listdir(full_path)\n    # now we need to add the path to the files\n    return [ file_path + f for f in file_list ]\n\n\ninstall_requires = [\"Flask>=0.10.1\",\n                    \"Flask-Migrate>=1.2.0\",\n                    \"Flask-SQLAlchemy>=2.0\",\n                    \"Flask-Script>=2.0.5\",\n                    \"Jinja2>=2.7.3\",\n                    \"Mako>=0.9.1\",\n                    \"MarkupSafe>=0.23\",\n                    \"PyMySQL>=0.6.6\",\n                    \"Pillow>=2.6.1\",\n                    \"PyJWT>=1.3.0\",\n                    \"PyYAML>=3.11\",\n                    \"Pygments>=2.0.2\",\n                    \"SQLAlchemy>=1.0.5\",\n                    \"Werkzeug>=0.10.4\",\n                    \"alembic>=0.6.7\",\n                    \"argparse>=1.2.1\",\n                    \"bcrypt>=1.1.0\",\n                    \"beautifulsoup4>=4.3.2\",\n                    \"cffi>=0.8.6\",\n                    \"configobj>=5.0.6\",\n                    \"docutils>=0.12\",\n                    \"funcparserlib>=0.3.6\",\n                    \"itsdangerous>=0.24\",\n                    \"ldap3>=2.5\",\n                    \"netaddr>=0.7.12\",\n                    \"passlib>=1.6.2\",\n                    \"pyasn1>=0.4.2\",\n                    \"pyOpenSSL>=17.5\",\n                    \"pycparser>=2.10\",\n                    \"pycrypto>=2.6.1\",\n                    \"pyrad>=2.0\",\n                    \"pyusb>=1.0.0b2\",\n                    \"qrcode>=5.1\",\n                    \"requests>=2.7.0\",\n                    \"sqlsoup>=0.9.0\",\n                    \"ecdsa>=0.13\",\n                    \"lxml>=3.3\",\n                    \"python-gnupg>=0.3.8\",\n                    \"defusedxml>=0.4.1\",\n                    \"flask-babel>=0.9\",\n                    \"croniter>=0.3.8\",\n                    \"oauth2client>=2.0.1\"\n                    ]\n\n# For python 2.6 we need additional dependency importlib\ntry:\n    import importlib\nexcept ImportError:\n    install_requires.append('importlib')\n\n\ndef get_man_pages(dir):\n    \"\"\"\n    Get man pages in a directory.\n    :param dir: \n    :return: list of file names\n    \"\"\"\n    files = os.listdir(dir)\n    r_files = []\n    for file in files:\n        if file.endswith(\".1\"):\n            r_files.append(dir + \"/\" + file)\n    return r_files\n\n\ndef get_scripts(dir):\n    \"\"\"\n    Get files that are executable\n    :param dir: \n    :return: list of file names\n    \"\"\"\n    files = os.listdir(dir)\n    r_files = []\n    for file in files:\n        if os.stat(dir + \"/\" + file)[stat.ST_MODE] & stat.S_IEXEC:\n            r_files.append(dir + \"/\" + file)\n    return r_files\n\n\nsetup(\n    name='privacyIDEA',\n    version=VERSION,\n    description='privacyIDEA: identity, multifactor authentication (OTP), '\n                'authorization, audit',\n    author='privacyidea.org',\n    license='AGPLv3',\n    author_email='cornelius@privacyidea.org',\n    url='http://www.privacyidea.org',\n    keywords='OTP, two factor authentication, management, security',\n    packages=find_packages(),\n    scripts=[\"pi-manage\"] + get_scripts(\"tools\"),\n    extras_require={\n        'dev': [\"Sphinx>=1.3.1\",\n                \"sphinxcontrib-httpdomain>=1.3.0\"],\n        'test': [\"coverage>=3.7.1\",\n                 \"mock>=1.0.1\",\n                 \"pyparsing>=2.0.3\",\n                 \"nose>=1.3.4\",\n                 \"responses>=0.4.0\",\n                 \"six>=1.8.0\"],\n    },\n    install_requires=install_requires,\n    include_package_data=True,\n    data_files=[('etc/privacyidea/',\n                 ['deploy/apache/privacyideaapp.wsgi',\n                  'deploy/privacyidea/dictionary',\n                  'deploy/privacyidea/enckey',\n                  'deploy/privacyidea/private.pem',\n                  'deploy/privacyidea/public.pem']),\n                ('share/man/man1', get_man_pages(\"tools\")),\n               ('lib/privacyidea/authmodules/OTRS',\n                 [\"authmodules/OTRS/privacyIDEA.pm\"]),\n                ('lib/privacyidea/migrations',\n                 [\"migrations/alembic.ini\",\n                  \"migrations/env.py\",\n                  \"migrations/README\",\n                  \"migrations/script.py.mako\"]),\n                ('lib/privacyidea/migrations/versions',\n                 get_file_list(\"migrations/versions/\"))\n                ],\n    classifiers=[\"Framework :: Flask\",\n                 \"License :: OSI Approved :: \"\n                 \"GNU Affero General Public License v3\",\n                 \"Programming Language :: Python\",\n                 \"Development Status :: 5 - Production/Stable\",\n                 \"Topic :: Internet\",\n                 \"Topic :: Security\",\n                 \"Topic :: System ::\"\n                 \" Systems Administration :: Authentication/Directory\"\n                 ],\n    #message_extractors={'privacyidea': [\n    #        ('**.py', 'python', None),\n    #        ('static/**.html', 'html', {'input_encoding': 'utf-8'})]},\n    zip_safe=False,\n    long_description=get_file_contents('README.rst')\n)\n", "path": "setup.py"}]}