prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Installing files under /etc yields SandboxViolation in virtualenv
  In one of my environments installing a newer version of Nitrate yields:
  ```
  remote: error: Setup script exited with error: SandboxViolation: open('/etc/httpd/conf.d/nitrate-httpd.conf', 'wb') {}
  ```
  
  this is due to the change made in ff4ecc75 adding the `data_files` attribute to `setup.py`. I propose installing these files under /etc via the RPM packages, not via pip. 
  
  --- 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 
  3 import os
  4 from setuptools import setup, find_packages
  5 
  6 import tcms
  7 
  8 
  9 def get_install_requires():
  10     requires = []
  11     links = []
  12     with open('requirements/base.txt', 'r') as f:
  13         for line in f:
  14             dep_line = line.strip()
  15             parts = dep_line.split('#egg=')
  16             if len(parts) == 2:
  17                 links.append(dep_line)
  18                 requires.append(parts[1])
  19             else:
  20                 requires.append(dep_line)
  21         return requires, links
  22 
  23 install_requires, dependency_links = get_install_requires()
  24 
  25 
  26 def get_long_description():
  27     with open('README.rst', 'r') as f:
  28         return f.read()
  29 
  30 
  31 setup(
  32     name='nitrate',
  33     version=tcms.__version__,
  34     description='Test Case Management System',
  35     long_description=get_long_description(),
  36     author='Nitrate Team',
  37     maintainer='Chenxiong Qi',
  38     maintainer_email='qcxhome@gmail.com',
  39     url='https://github.com/Nitrate/Nitrate/',
  40     license='GPLv2+',
  41     keywords='test case',
  42 
  43     install_requires=install_requires,
  44     dependency_links=dependency_links,
  45 
  46     packages=find_packages(),
  47     include_package_data=True,
  48     data_files=[
  49         ('/etc/httpd/conf.d/', ['contrib/conf/nitrate-httpd.conf']),
  50         ('/etc/init.d', ['contrib/script/celeryd']),
  51         ],
  52 
  53     classifiers=[
  54         'Intended Audience :: Developers',
  55         'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
  56         'Programming Language :: Python :: 2',
  57         'Programming Language :: Python :: 2.7',
  58         'Topic :: Software Development :: Quality Assurance',
  59         'Topic :: Software Development :: Testing',
  60     ],
  61 )
  62
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -1,6 +1,5 @@
   # -*- coding: utf-8 -*-
   
  -import os
   from setuptools import setup, find_packages
   
   import tcms
  @@ -20,6 +19,7 @@
                   requires.append(dep_line)
           return requires, links
   
  +
   install_requires, dependency_links = get_install_requires()
   
   
  @@ -45,10 +45,6 @@
   
       packages=find_packages(),
       include_package_data=True,
  -    data_files=[
  -        ('/etc/httpd/conf.d/', ['contrib/conf/nitrate-httpd.conf']),
  -        ('/etc/init.d', ['contrib/script/celeryd']),
  -        ],
   
       classifiers=[
           'Intended Audience :: Developers',
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,6 +1,5 @@\n # -*- coding: utf-8 -*-\n \n-import os\n from setuptools import setup, find_packages\n \n import tcms\n@@ -20,6 +19,7 @@\n                 requires.append(dep_line)\n         return requires, links\n \n+\n install_requires, dependency_links = get_install_requires()\n \n \n@@ -45,10 +45,6 @@\n \n     packages=find_packages(),\n     include_package_data=True,\n-    data_files=[\n-        ('/etc/httpd/conf.d/', ['contrib/conf/nitrate-httpd.conf']),\n-        ('/etc/init.d', ['contrib/script/celeryd']),\n-        ],\n \n     classifiers=[\n         'Intended Audience :: Developers',\n", "issue": "Installing files under /etc yields SandboxViolation in virtualenv\nIn one of my environments installing a newer version of Nitrate yields:\r\n```\r\nremote: error: Setup script exited with error: SandboxViolation: open('/etc/httpd/conf.d/nitrate-httpd.conf', 'wb') {}\r\n```\r\n\r\nthis is due to the change made in ff4ecc75 adding the `data_files` attribute to `setup.py`. I propose installing these files under /etc via the RPM packages, not via pip. \n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nimport os\nfrom setuptools import setup, find_packages\n\nimport tcms\n\n\ndef get_install_requires():\n    requires = []\n    links = []\n    with open('requirements/base.txt', 'r') as f:\n        for line in f:\n            dep_line = line.strip()\n            parts = dep_line.split('#egg=')\n            if len(parts) == 2:\n                links.append(dep_line)\n                requires.append(parts[1])\n            else:\n                requires.append(dep_line)\n        return requires, links\n\ninstall_requires, dependency_links = get_install_requires()\n\n\ndef get_long_description():\n    with open('README.rst', 'r') as f:\n        return f.read()\n\n\nsetup(\n    name='nitrate',\n    version=tcms.__version__,\n    description='Test Case Management System',\n    long_description=get_long_description(),\n    author='Nitrate Team',\n    maintainer='Chenxiong Qi',\n    maintainer_email='qcxhome@gmail.com',\n    url='https://github.com/Nitrate/Nitrate/',\n    license='GPLv2+',\n    keywords='test case',\n\n    install_requires=install_requires,\n    dependency_links=dependency_links,\n\n    packages=find_packages(),\n    include_package_data=True,\n    data_files=[\n        ('/etc/httpd/conf.d/', ['contrib/conf/nitrate-httpd.conf']),\n        ('/etc/init.d', ['contrib/script/celeryd']),\n        ],\n\n    classifiers=[\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Topic :: Software Development :: Quality Assurance',\n        'Topic :: Software Development :: Testing',\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nimport tcms\n\n\ndef get_install_requires():\n    requires = []\n    links = []\n    with open('requirements/base.txt', 'r') as f:\n        for line in f:\n            dep_line = line.strip()\n            parts = dep_line.split('#egg=')\n            if len(parts) == 2:\n                links.append(dep_line)\n                requires.append(parts[1])\n            else:\n                requires.append(dep_line)\n        return requires, links\n\n\ninstall_requires, dependency_links = get_install_requires()\n\n\ndef get_long_description():\n    with open('README.rst', 'r') as f:\n        return f.read()\n\n\nsetup(\n    name='nitrate',\n    version=tcms.__version__,\n    description='Test Case Management System',\n    long_description=get_long_description(),\n    author='Nitrate Team',\n    maintainer='Chenxiong Qi',\n    maintainer_email='qcxhome@gmail.com',\n    url='https://github.com/Nitrate/Nitrate/',\n    license='GPLv2+',\n    keywords='test case',\n\n    install_requires=install_requires,\n    dependency_links=dependency_links,\n\n    packages=find_packages(),\n    include_package_data=True,\n\n    classifiers=[\n        'Intended Audience :: Developers',\n        'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Topic :: Software Development :: Quality Assurance',\n        'Topic :: Software Development :: Testing',\n    ],\n)\n", "path": "setup.py"}]}