prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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. 
  
  </issue>
  <code>
  [start of setup.py]
  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 of setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
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"}]}