Skip to content

BUG: setup.py does not allow equal filenames in *different* directories #9415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,31 +265,28 @@ def initialize_options(self):
self.all = True
self._clean_me = []
self._clean_trees = []
self._clean_exclude = ['np_datetime.c',
'np_datetime_strings.c',
'period.c',
'tokenizer.c',
'io.c',
'ujson.c',
'objToJSON.c',
'JSONtoObj.c',
'ultrajsonenc.c',
'ultrajsondec.c',
self._clean_exclude = ['pandas/src/datetime/np_datetime.c',
'pandas/src/datetime/np_datetime_strings.c',
'pandas/src/period.c',
'pandas/src/parser/tokenizer.c',
'pandas/src/parser/io.c',
'pandas/src/ujson/python/ujson.c',
'pandas/src/ujson/python/objToJSON.c',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is much more explicit which is good

'pandas/src/ujson/python/JSONtoObj.c',
'pandas/src/ujson/lib/ultrajsonenc.c',
'pandas/src/ujson/lib/ultrajsondec.c',
]

for root, dirs, files in os.walk('pandas'):
for f in files:
if f in self._clean_exclude:
continue

# XXX
if 'ujson' in f:
filepath = pjoin(root, f)
if filepath in self._clean_exclude:
continue

if os.path.splitext(f)[-1] in ('.pyc', '.so', '.o',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't remove ujson from this as these are part of the src/ujson/lib dir.

maybe directly specify ALL of the *.c files by dir and filename (or just dir) for the exclusions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f is this context is the filename (only). So the ujson conditional doesn't do anything since those filenames are already part of the list.

I thought about that but didn't want to break the way it worked before. So you are saying that all excluded files should be referred to by their project root relative path? e.g. src/ujson/lib/ultrajsondec.c. I believe directories should be allowed for exclusion also.

Edited: directory example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ujson conditional also does nothing because none of the filenames in src/ujson/lib have ujson in them.

'.pyo',
'.pyd', '.c', '.orig'):
self._clean_me.append(pjoin(root, f))
self._clean_me.append(filepath)
for d in dirs:
if d == '__pycache__':
self._clean_trees.append(pjoin(root, d))
Expand Down