MCPcopy
hub / github.com/pandas-dev/pandas / initialize_options

Method initialize_options

setup.py:112–162  ·  setup.py::CleanCommand.initialize_options
(self)

Source from the content-addressed store, hash-verified

110 user_options = [(class="st">"all", class="st">"a", class="st">"")]
111
112 def initialize_options(self) -> None:
113 self.all = True
114 self._clean_me = []
115 self._clean_trees = []
116
117 base = pjoin(class="st">"pandas", class="st">"_libs", class="st">"src")
118 parser = pjoin(base, class="st">"parser")
119 vendored = pjoin(base, class="st">"vendored")
120 dt = pjoin(base, class="st">"datetime")
121 ujson_python = pjoin(vendored, class="st">"ujson", class="st">"python")
122 ujson_lib = pjoin(vendored, class="st">"ujson", class="st">"lib")
123 self._clean_exclude = [
124 pjoin(vendored, class="st">"numpy", class="st">"datetime", class="st">"np_datetime.c"),
125 pjoin(vendored, class="st">"numpy", class="st">"datetime", class="st">"np_datetime_strings.c"),
126 pjoin(dt, class="st">"date_conversions.c"),
127 pjoin(parser, class="st">"tokenizer.c"),
128 pjoin(parser, class="st">"io.c"),
129 pjoin(ujson_python, class="st">"ujson.c"),
130 pjoin(ujson_python, class="st">"objToJSON.c"),
131 pjoin(ujson_python, class="st">"JSONtoObj.c"),
132 pjoin(ujson_lib, class="st">"ultrajsonenc.c"),
133 pjoin(ujson_lib, class="st">"ultrajsondec.c"),
134 pjoin(dt, class="st">"pd_datetime.c"),
135 pjoin(parser, class="st">"pd_parser.c"),
136 ]
137
138 for root, dirs, files in os.walk(class="st">"pandas"):
139 for f in files:
140 filepath = pjoin(root, f)
141 if filepath in self._clean_exclude:
142 continue
143
144 if os.path.splitext(f)[-1] in (
145 class="st">".pyc",
146 class="st">".so",
147 class="st">".o",
148 class="st">".pyo",
149 class="st">".pyd",
150 class="st">".c",
151 class="st">".cpp",
152 class="st">".orig",
153 ):
154 self._clean_me.append(filepath)
155 self._clean_trees.append(pjoin(root, d) for d in dirs if d == class="st">"__pycache__")
156
157 class="cm"># clean the generated pxi files
158 for pxifile in _pxifiles:
159 pxifile_replaced = pxifile.replace(class="st">".pxi.in", class="st">".pxi")
160 self._clean_me.append(pxifile_replaced)
161
162 self._clean_trees.append(d for d in (class="st">"build", class="st">"dist") if os.path.exists(d))
163
164 def finalize_options(self) -> None:
165 pass

Callers

nothing calls this directly

Calls 4

walkMethod · 0.80
existsMethod · 0.80
appendMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected