Skip to content

Commit

Permalink
Merge pull request #306 from spencerkclark/fix-intersphinx
Browse files Browse the repository at this point in the history
Update `intersphinx_mapping` format; use `c_api_binop_methods` during coverage installs
  • Loading branch information
jswhit authored Aug 1, 2023
2 parents 144da53 + 615ba88 commit e7c591b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@
# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
13 changes: 9 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
# directive was added in Cython version 0.29.20.
"c_api_binop_methods": True
}
COVERAGE_COMPILER_DIRECTIVES = {
"linetrace": True,
"warn.maybe_uninitialized": False,
"warn.unreachable": False,
"warn.unused": False,
}
DEFINE_MACROS = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
FLAG_COVERAGE = '--cython-coverage' # custom flag enabling Cython line tracing
NAME = 'cftime'
Expand Down Expand Up @@ -81,10 +87,9 @@ def description():

if ((FLAG_COVERAGE in sys.argv or os.environ.get('CYTHON_COVERAGE', None))
and cythonize):
COMPILER_DIRECTIVES = {'linetrace': True,
'warn.maybe_uninitialized': False,
'warn.unreachable': False,
'warn.unused': False}
COMPILER_DIRECTIVES = {
**COMPILER_DIRECTIVES, **COVERAGE_COMPILER_DIRECTIVES
}
DEFINE_MACROS += [('CYTHON_TRACE', '1'),
('CYTHON_TRACE_NOGIL', '1')]
if FLAG_COVERAGE in sys.argv:
Expand Down

0 comments on commit e7c591b

Please sign in to comment.