Skip to content

Commit bb9c311

Browse files
committed
Merge pull request #9415 from blbradley/clean-exclude-path-check
BUG: setup.py does not allow equal filenames in *different* directories
2 parents 098a09a + 8805910 commit bb9c311

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

setup.py

+13-16
Original file line numberDiff line numberDiff line change
@@ -265,31 +265,28 @@ def initialize_options(self):
265265
self.all = True
266266
self._clean_me = []
267267
self._clean_trees = []
268-
self._clean_exclude = ['np_datetime.c',
269-
'np_datetime_strings.c',
270-
'period.c',
271-
'tokenizer.c',
272-
'io.c',
273-
'ujson.c',
274-
'objToJSON.c',
275-
'JSONtoObj.c',
276-
'ultrajsonenc.c',
277-
'ultrajsondec.c',
268+
self._clean_exclude = ['pandas/src/datetime/np_datetime.c',
269+
'pandas/src/datetime/np_datetime_strings.c',
270+
'pandas/src/period.c',
271+
'pandas/src/parser/tokenizer.c',
272+
'pandas/src/parser/io.c',
273+
'pandas/src/ujson/python/ujson.c',
274+
'pandas/src/ujson/python/objToJSON.c',
275+
'pandas/src/ujson/python/JSONtoObj.c',
276+
'pandas/src/ujson/lib/ultrajsonenc.c',
277+
'pandas/src/ujson/lib/ultrajsondec.c',
278278
]
279279

280280
for root, dirs, files in os.walk('pandas'):
281281
for f in files:
282-
if f in self._clean_exclude:
283-
continue
284-
285-
# XXX
286-
if 'ujson' in f:
282+
filepath = pjoin(root, f)
283+
if filepath in self._clean_exclude:
287284
continue
288285

289286
if os.path.splitext(f)[-1] in ('.pyc', '.so', '.o',
290287
'.pyo',
291288
'.pyd', '.c', '.orig'):
292-
self._clean_me.append(pjoin(root, f))
289+
self._clean_me.append(filepath)
293290
for d in dirs:
294291
if d == '__pycache__':
295292
self._clean_trees.append(pjoin(root, d))

0 commit comments

Comments
 (0)