Skip to content

Commit

Permalink
update docstrings and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed May 24, 2023
1 parent ea77607 commit 9d289e0
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,9 @@ def get_use_openmp_from_env_var() -> bool:
class BuildExt(build_ext):
"""Handle extension compilation.
Command-line argument and environment can custom:
Environment variables can custom the build of extensions, see the install documentation.
- The use of cython to cythonize files, else a default version is used
- Build extension with support of OpenMP (by default it is enabled)
- If building with MSVC, compiler flags are converted from gcc flags.
If building with MSVC, compiler flags are converted from gcc flags.
"""

COMPILE_ARGS_CONVERTER = {'-fopenmp': '/openmp'}
Expand All @@ -325,13 +323,9 @@ class BuildExt(build_ext):

description = 'Build extensions'

def patch_extension(self, ext):
def patch_extension(self, ext: Extension):
"""Patch an extension according to requested Cython and OpenMP usage.
"""
Patch an extension according to requested Cython and OpenMP usage.
:param Extension ext: An extension
"""
# Cytonize
from Cython.Build import cythonize
patched_exts = cythonize(
[ext],
Expand Down

0 comments on commit 9d289e0

Please sign in to comment.