prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [BUG] Tenseal necessary, makes installation impossible on Apple Silicon.
  
  As discussed in #130 tenseal remains unavailable for Apple Silicon. The current NVFlare version (2.2.0) has no optional features and tenseal is necessary, making installation impossible on Apple Silicon.
  
  </issue>
  <code>
  [start of setup.py]
  1 # Copyright (c) 2021-2022, NVIDIA CORPORATION.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 import datetime
  16 import os
  17 import shutil
  18 
  19 from setuptools import find_packages, setup
  20 
  21 import versioneer
  22 
  23 # read the contents of your README file
  24 this_directory = os.path.abspath(os.path.dirname(__file__))
  25 with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
  26     long_description = f.read()
  27 
  28 if os.path.exists(os.path.join(this_directory, "nvflare", "poc.zip")):
  29     os.remove(os.path.join(this_directory, "nvflare", "poc.zip"))
  30 shutil.make_archive(base_name="poc", format="zip", root_dir=os.path.join(this_directory, "nvflare"), base_dir="poc")
  31 shutil.move("poc.zip", os.path.join(this_directory, "nvflare", "poc.zip"))
  32 
  33 versions = versioneer.get_versions()
  34 if versions["error"]:
  35     today = datetime.date.today().timetuple()
  36     year = today[0] % 1000
  37     month = today[1]
  38     day = today[2]
  39     version = f"0.0.{year:02d}{month:02d}{day:02d}"
  40 else:
  41     version = versions["version"]
  42 
  43 release = os.environ.get("NVFL_RELEASE")
  44 if release == "1":
  45     package_name = "nvflare"
  46 else:
  47     package_name = "nvflare-nightly"
  48 
  49 setup(
  50     name=package_name,
  51     version=version,
  52     cmdclass=versioneer.get_cmdclass(),
  53     description="Federated Learning Application Runtime Environment",
  54     url="https://github.com/NVIDIA/NVFlare",
  55     package_dir={"nvflare": "nvflare"},
  56     packages=find_packages(
  57         where=".",
  58         include=[
  59             "*",
  60         ],
  61         exclude=["tests", "tests.*"],
  62     ),
  63     package_data={"": ["*.yml", "*.html", "poc.zip"]},
  64     zip_safe=True,
  65     license_files=("LICENSE",),
  66     classifiers=[
  67         "Programming Language :: Python :: 3.7",
  68         "Programming Language :: Python :: 3.8",
  69         "License :: OSI Approved :: Apache Software License",
  70         "Operating System :: POSIX :: Linux",
  71     ],
  72     long_description=long_description,
  73     long_description_content_type="text/markdown",
  74     python_requires=">=3.7,<3.9",
  75     install_requires=[
  76         "cryptography>=36.0.0",
  77         "Flask==2.1.2",
  78         "Flask-JWT-Extended==4.4.3",
  79         "Flask-SQLAlchemy==2.5.1",
  80         "google-api-python-client==2.49.0",
  81         "grpcio==1.46.3",
  82         "gunicorn==20.1.0",
  83         "numpy",
  84         "protobuf==3.20.1",
  85         "psutil==5.9.1",
  86         "PyYAML==6.0",
  87         "six>=1.15.0",
  88         "tenseal==0.3.0",
  89         "msgpack==1.0.3",
  90         "docker>=6.0",
  91     ],
  92     entry_points={
  93         "console_scripts": [
  94             "provision=nvflare.lighter.provision:main",
  95             "poc=nvflare.lighter.poc:main",
  96             "nvflare=nvflare.cli:main",
  97             "authz_preview=nvflare.fuel.hci.tools.authz_preview:main",
  98         ],
  99     },
  100 )
  101 
  102 os.remove(os.path.join(this_directory, "nvflare", "poc.zip"))
  103
  [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
  @@ -85,10 +85,10 @@
           "psutil==5.9.1",
           "PyYAML==6.0",
           "six>=1.15.0",
  -        "tenseal==0.3.0",
           "msgpack==1.0.3",
           "docker>=6.0",
       ],
  +    extras_require={"HE": ["tenseal==0.3.0"]},
       entry_points={
           "console_scripts": [
               "provision=nvflare.lighter.provision:main",
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -85,10 +85,10 @@\n         \"psutil==5.9.1\",\n         \"PyYAML==6.0\",\n         \"six>=1.15.0\",\n-        \"tenseal==0.3.0\",\n         \"msgpack==1.0.3\",\n         \"docker>=6.0\",\n     ],\n+    extras_require={\"HE\": [\"tenseal==0.3.0\"]},\n     entry_points={\n         \"console_scripts\": [\n             \"provision=nvflare.lighter.provision:main\",\n", "issue": "[BUG] Tenseal necessary, makes installation impossible on Apple Silicon.\n\r\nAs discussed in #130 tenseal remains unavailable for Apple Silicon. The current NVFlare version (2.2.0) has no optional features and tenseal is necessary, making installation impossible on Apple Silicon.\n", "before_files": [{"content": "# Copyright (c) 2021-2022, NVIDIA CORPORATION.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport datetime\nimport os\nimport shutil\n\nfrom setuptools import find_packages, setup\n\nimport versioneer\n\n# read the contents of your README file\nthis_directory = os.path.abspath(os.path.dirname(__file__))\nwith open(os.path.join(this_directory, \"README.md\"), encoding=\"utf-8\") as f:\n    long_description = f.read()\n\nif os.path.exists(os.path.join(this_directory, \"nvflare\", \"poc.zip\")):\n    os.remove(os.path.join(this_directory, \"nvflare\", \"poc.zip\"))\nshutil.make_archive(base_name=\"poc\", format=\"zip\", root_dir=os.path.join(this_directory, \"nvflare\"), base_dir=\"poc\")\nshutil.move(\"poc.zip\", os.path.join(this_directory, \"nvflare\", \"poc.zip\"))\n\nversions = versioneer.get_versions()\nif versions[\"error\"]:\n    today = datetime.date.today().timetuple()\n    year = today[0] % 1000\n    month = today[1]\n    day = today[2]\n    version = f\"0.0.{year:02d}{month:02d}{day:02d}\"\nelse:\n    version = versions[\"version\"]\n\nrelease = os.environ.get(\"NVFL_RELEASE\")\nif release == \"1\":\n    package_name = \"nvflare\"\nelse:\n    package_name = \"nvflare-nightly\"\n\nsetup(\n    name=package_name,\n    version=version,\n    cmdclass=versioneer.get_cmdclass(),\n    description=\"Federated Learning Application Runtime Environment\",\n    url=\"https://github.com/NVIDIA/NVFlare\",\n    package_dir={\"nvflare\": \"nvflare\"},\n    packages=find_packages(\n        where=\".\",\n        include=[\n            \"*\",\n        ],\n        exclude=[\"tests\", \"tests.*\"],\n    ),\n    package_data={\"\": [\"*.yml\", \"*.html\", \"poc.zip\"]},\n    zip_safe=True,\n    license_files=(\"LICENSE\",),\n    classifiers=[\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Operating System :: POSIX :: Linux\",\n    ],\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    python_requires=\">=3.7,<3.9\",\n    install_requires=[\n        \"cryptography>=36.0.0\",\n        \"Flask==2.1.2\",\n        \"Flask-JWT-Extended==4.4.3\",\n        \"Flask-SQLAlchemy==2.5.1\",\n        \"google-api-python-client==2.49.0\",\n        \"grpcio==1.46.3\",\n        \"gunicorn==20.1.0\",\n        \"numpy\",\n        \"protobuf==3.20.1\",\n        \"psutil==5.9.1\",\n        \"PyYAML==6.0\",\n        \"six>=1.15.0\",\n        \"tenseal==0.3.0\",\n        \"msgpack==1.0.3\",\n        \"docker>=6.0\",\n    ],\n    entry_points={\n        \"console_scripts\": [\n            \"provision=nvflare.lighter.provision:main\",\n            \"poc=nvflare.lighter.poc:main\",\n            \"nvflare=nvflare.cli:main\",\n            \"authz_preview=nvflare.fuel.hci.tools.authz_preview:main\",\n        ],\n    },\n)\n\nos.remove(os.path.join(this_directory, \"nvflare\", \"poc.zip\"))\n", "path": "setup.py"}]}