MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / initialize_options

Method initialize_options

setup.py:131–158  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129 ]
130
131 def initialize_options(self):
132 # initialize_options() may be called multiple times on the
133 # same command object, so make sure not to override previously
134 # set options.
135 if getattr(self, '_initialized', False):
136 return
137
138 super(build_ext, self).initialize_options()
139
140 defines = [
141 "CYTHON_USE_MODULE_STATE",
142 "CYTHON_PEP489_MULTI_PHASE_INIT",
143 "CYTHON_USE_TYPE_SPECS",
144 ]
145
146 if os.environ.get('ASYNCPG_DEBUG'):
147 self.cython_always = True
148 self.cython_annotate = True
149 self.cython_directives = "linetrace=True"
150 self.debug = True
151
152 defines += ["PG_DEBUG", "CYTHON_TRACE", "CYTHON_TRACE_NOGIL"]
153 else:
154 self.cython_always = False
155 self.cython_annotate = None
156 self.cython_directives = None
157
158 self.define = ",".join(defines)
159
160 def finalize_options(self):
161 # finalize_options() may be called multiple times on the

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected