From e4b5a10b9ae2651ef0c39ca606674828adb0ab43 Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Tue, 9 Nov 2010 21:20:37 -0500 Subject: [PATCH] some fixes to setup.py for Mac OS X, and .gitignore additions --- .gitignore | 7 +++++++ setup.py | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ec813ce..0171c9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,15 @@ *.pyc build +# header files that may be copied over, if missing +ImPlatform.h +Imaging.h + # various forms of compiled _composite extensions _composite.so _composite.pyd _composite_d.pyd _composite.dylib + +# Mac OS X noise +.DS_Store diff --git a/setup.py b/setup.py index 95bba2a..4348e6a 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ if py2exe != None: # _composite.c extension # -setup_kwargs['ext_modules'].append(Extension('_composite', ['_composite.c'])) +setup_kwargs['ext_modules'].append(Extension('_composite', ['_composite.c'], include_dirs=['.'])) # tell build_ext to build the extension in-place # (NOT in build/) setup_kwargs['options']['build_ext'] = {'inplace' : 1} @@ -48,8 +48,8 @@ class CustomClean(clean): # try to remove '_composite.{so,pyd,...}' extension, # regardless of the current system's extension name convention build_ext = self.get_finalized_command('build_ext') - fname = build_ext.get_ext_fullpath('_composite') - pretty_fname = os.path.split(fname)[1] + pretty_fname = build_ext.get_ext_filename('_composite') + fname = pretty_fname if os.path.exists(fname): try: if not self.dry_run: