prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Recursive directory lookup can take long
  This [line](https://github.com/facebookresearch/habitat-api/blob/master/setup.py#L38) looks for requirements.txt under all directories, this can be especially costly if you have data directories. 
  
  One way to get around this is to only look at specific set of directories and ignore data directories.
  
  </issue>
  <code>
  [start of setup.py]
  1 #!/usr/bin/env python3
  2 
  3 # Copyright (c) Facebook, Inc. and its affiliates.
  4 # This source code is licensed under the MIT license found in the
  5 # LICENSE file in the root directory of this source tree.
  6 
  7 import glob
  8 import os.path
  9 import sys
  10 
  11 import setuptools
  12 from setuptools.command.develop import develop as DefaultDevelopCommand
  13 from setuptools.command.install import install as DefaultInstallCommand
  14 
  15 sys.path.insert(0, os.path.join(os.path.dirname(__file__), "habitat"))
  16 from version import VERSION  # isort:skip noqa
  17 
  18 
  19 with open("README.md", encoding="utf8") as f:
  20     readme = f.read()
  21 
  22 with open("LICENSE") as f:
  23     license = f.read()
  24 
  25 with open("requirements.txt") as f:
  26     reqs = f.read()
  27 
  28 DISTNAME = "habitat"
  29 DESCRIPTION = "habitat: a suite for embodied agent tasks and benchmarks"
  30 LONG_DESCRIPTION = readme
  31 AUTHOR = "Facebook AI Research"
  32 LICENSE = license
  33 REQUIREMENTS = reqs.strip().split("\n")
  34 BASELINE_PATH = ["habitat_baselines", "habitat_baselines.*"]
  35 DEFAULT_EXCLUSION = ["test", "examples"]
  36 FULL_REQUIREMENTS = set()
  37 # collect requirements.txt file in all subdirectories
  38 for file_name in glob.glob("**/requirements.txt", recursive=True):
  39     with open(file_name) as f:
  40         reqs = f.read()
  41         FULL_REQUIREMENTS.update(reqs.strip().split("\n"))
  42 
  43 
  44 class OptionedCommand:
  45     r"""Generic Command class that takes extra user options and modifies
  46     arguments in setuptools.setup() accordingly.
  47     Though OptionedCommand inherits directly from object, it assumes
  48     inheritance from DefaultDevelopCommand or DefaultInstallCommand, as it
  49     overrides methods from those two classes.
  50     """
  51 
  52     user_options = [("all", None, "include habitat_baselines in installation")]
  53 
  54     def initialize_options(self):
  55         super().initialize_options()
  56         self.all = None
  57 
  58     def run(self):
  59         if not self.all:  # install core only
  60             DEFAULT_EXCLUSION.extend(BASELINE_PATH)
  61             self.distribution.packages = setuptools.find_packages(
  62                 exclude=DEFAULT_EXCLUSION
  63             )
  64             # self.distribution accesses arguments of setup() in main()
  65         else:  # install all except test and examples
  66             self.distribution.install_requires = FULL_REQUIREMENTS
  67         super().run()
  68 
  69 
  70 class InstallCommand(OptionedCommand, DefaultInstallCommand):
  71     user_options = (
  72         getattr(DefaultInstallCommand, "user_options", [])
  73         + OptionedCommand.user_options
  74     )
  75 
  76 
  77 class DevelopCommand(OptionedCommand, DefaultDevelopCommand):
  78     user_options = (
  79         getattr(DefaultDevelopCommand, "user_options", [])
  80         + OptionedCommand.user_options
  81     )
  82 
  83 
  84 if __name__ == "__main__":
  85     setuptools.setup(
  86         name=DISTNAME,
  87         install_requires=REQUIREMENTS,
  88         packages=setuptools.find_packages(exclude=DEFAULT_EXCLUSION),
  89         version=VERSION,
  90         description=DESCRIPTION,
  91         long_description=LONG_DESCRIPTION,
  92         author=AUTHOR,
  93         license=LICENSE,
  94         setup_requires=["pytest-runner"],
  95         tests_require=["pytest"],
  96         include_package_data=True,
  97         cmdclass={"install": InstallCommand, "develop": DevelopCommand},
  98     )
  99
  [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
  @@ -35,7 +35,9 @@
   DEFAULT_EXCLUSION = ["test", "examples"]
   FULL_REQUIREMENTS = set()
   # collect requirements.txt file in all subdirectories
  -for file_name in glob.glob("**/requirements.txt", recursive=True):
  +for file_name in ["requirements.txt"] + glob.glob(
  +    "habitat_baselines/**/requirements.txt", recursive=True
  +):
       with open(file_name) as f:
           reqs = f.read()
           FULL_REQUIREMENTS.update(reqs.strip().split("\n"))
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -35,7 +35,9 @@\n DEFAULT_EXCLUSION = [\"test\", \"examples\"]\n FULL_REQUIREMENTS = set()\n # collect requirements.txt file in all subdirectories\n-for file_name in glob.glob(\"**/requirements.txt\", recursive=True):\n+for file_name in [\"requirements.txt\"] + glob.glob(\n+    \"habitat_baselines/**/requirements.txt\", recursive=True\n+):\n     with open(file_name) as f:\n         reqs = f.read()\n         FULL_REQUIREMENTS.update(reqs.strip().split(\"\\n\"))\n", "issue": "Recursive directory lookup can take long\nThis [line](https://github.com/facebookresearch/habitat-api/blob/master/setup.py#L38) looks for requirements.txt under all directories, this can be especially costly if you have data directories. \r\n\r\nOne way to get around this is to only look at specific set of directories and ignore data directories.\n", "before_files": [{"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport glob\nimport os.path\nimport sys\n\nimport setuptools\nfrom setuptools.command.develop import develop as DefaultDevelopCommand\nfrom setuptools.command.install import install as DefaultInstallCommand\n\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), \"habitat\"))\nfrom version import VERSION  # isort:skip noqa\n\n\nwith open(\"README.md\", encoding=\"utf8\") as f:\n    readme = f.read()\n\nwith open(\"LICENSE\") as f:\n    license = f.read()\n\nwith open(\"requirements.txt\") as f:\n    reqs = f.read()\n\nDISTNAME = \"habitat\"\nDESCRIPTION = \"habitat: a suite for embodied agent tasks and benchmarks\"\nLONG_DESCRIPTION = readme\nAUTHOR = \"Facebook AI Research\"\nLICENSE = license\nREQUIREMENTS = reqs.strip().split(\"\\n\")\nBASELINE_PATH = [\"habitat_baselines\", \"habitat_baselines.*\"]\nDEFAULT_EXCLUSION = [\"test\", \"examples\"]\nFULL_REQUIREMENTS = set()\n# collect requirements.txt file in all subdirectories\nfor file_name in glob.glob(\"**/requirements.txt\", recursive=True):\n    with open(file_name) as f:\n        reqs = f.read()\n        FULL_REQUIREMENTS.update(reqs.strip().split(\"\\n\"))\n\n\nclass OptionedCommand:\n    r\"\"\"Generic Command class that takes extra user options and modifies\n    arguments in setuptools.setup() accordingly.\n    Though OptionedCommand inherits directly from object, it assumes\n    inheritance from DefaultDevelopCommand or DefaultInstallCommand, as it\n    overrides methods from those two classes.\n    \"\"\"\n\n    user_options = [(\"all\", None, \"include habitat_baselines in installation\")]\n\n    def initialize_options(self):\n        super().initialize_options()\n        self.all = None\n\n    def run(self):\n        if not self.all:  # install core only\n            DEFAULT_EXCLUSION.extend(BASELINE_PATH)\n            self.distribution.packages = setuptools.find_packages(\n                exclude=DEFAULT_EXCLUSION\n            )\n            # self.distribution accesses arguments of setup() in main()\n        else:  # install all except test and examples\n            self.distribution.install_requires = FULL_REQUIREMENTS\n        super().run()\n\n\nclass InstallCommand(OptionedCommand, DefaultInstallCommand):\n    user_options = (\n        getattr(DefaultInstallCommand, \"user_options\", [])\n        + OptionedCommand.user_options\n    )\n\n\nclass DevelopCommand(OptionedCommand, DefaultDevelopCommand):\n    user_options = (\n        getattr(DefaultDevelopCommand, \"user_options\", [])\n        + OptionedCommand.user_options\n    )\n\n\nif __name__ == \"__main__\":\n    setuptools.setup(\n        name=DISTNAME,\n        install_requires=REQUIREMENTS,\n        packages=setuptools.find_packages(exclude=DEFAULT_EXCLUSION),\n        version=VERSION,\n        description=DESCRIPTION,\n        long_description=LONG_DESCRIPTION,\n        author=AUTHOR,\n        license=LICENSE,\n        setup_requires=[\"pytest-runner\"],\n        tests_require=[\"pytest\"],\n        include_package_data=True,\n        cmdclass={\"install\": InstallCommand, \"develop\": DevelopCommand},\n    )\n", "path": "setup.py"}]}