astropy/astropy — pull request #834 by mdboom (2013-02-27 19:41:10+00:00)
Title: Skip hidden files when finding `.pyx` files etc. in the source tree

As shown in #832, our build system will try to build hidden files that happen to end in `.c` with another hidden file alongside it ending in `.pyx`. For some inexplicable reason that probably made sense to someone at Apple at one time, in some cases resource fork files (prefixed with `._`) can appear for each of the files in the source directory. Sending these resource fork files to the C compiler makes it grumpy.

This patch adds a new function `walk_skip_hidden` which is a wrapper around `os.walk` that skips hidden files. It's then used from the 2 places in the build system where we go looking for files.