Skip to content

Commit

Permalink
Update setup.py to ensure compatibility with Python 3.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
fbriol committed Nov 25, 2024
1 parent d538810 commit 6e2a305
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Working directory
from typing import List, Tuple
from typing import List, Optional, Tuple
import os
import pathlib
import platform
Expand Down Expand Up @@ -155,13 +155,13 @@ def set_mklroot() -> None:
os.environ['MKLROOT'] = sys.prefix

@staticmethod
def conda_prefix() -> str | None:
def conda_prefix() -> Optional[str]:
"""Returns the conda prefix."""
if 'CONDA_PREFIX' in os.environ:
return os.environ['CONDA_PREFIX']
return None

def set_cmake_user_options(self) -> list[str]:
def set_cmake_user_options(self) -> List[str]:
"""Sets the options defined by the user."""
result = []

Expand All @@ -178,7 +178,7 @@ def set_cmake_user_options(self) -> list[str]:

return result

def cmake_arguments(self, cfg: str, extdir: str) -> list[str]:
def cmake_arguments(self, cfg: str, extdir: str) -> List[str]:
"""Returns the cmake arguments."""
cmake_args: list[str] = [
'-DCMAKE_BUILD_TYPE=' + cfg,
Expand Down

0 comments on commit 6e2a305

Please sign in to comment.