diff --git a/omnimon/_omnimon_version.py b/omnimon/_omnimon_version.py index 9f7a875c..1663d823 100644 --- a/omnimon/_omnimon_version.py +++ b/omnimon/_omnimon_version.py @@ -1 +1 @@ -version = "0.1.0" +version = "0.1.1" diff --git a/setup.py b/setup.py index 06f4bf1e..aa6e3952 100644 --- a/setup.py +++ b/setup.py @@ -204,6 +204,28 @@ def remove_pyc(basedir): if os.path.exists(path) and "numpy" not in path: os.remove(path) +def remove_numpy_tests(basedir): + print basedir + for f in glob.glob("%s/*/tests" % basedir): + print f + shutil.rmtree(f) + for f in glob.glob("%s/tests" % basedir): + print f + shutil.rmtree(f) + for f in ["tests", "f2py", "testing", "core/include", "core/lib", "distutils"]: + path = os.path.join(basedir, f) + shutil.rmtree(path, ignore_errors=True) + testing = "%s/testing" % basedir + os.mkdir(testing) + + tester_replace = """class Tester(object): + def bench(self, label='fast', verbose=1, extra_argv=None): + pass + test = bench +""" + fh = open("%s/__init__.py" % testing, "wb") + fh.write(tester_replace) + fh.close() if 'nsis' not in sys.argv: if sys.platform.startswith("win"): @@ -352,6 +374,10 @@ def remove_pyc(basedir): site_packages = "%s/Contents/Resources/lib/python2.7/site-packages.zip" % app_name subprocess.call(['/usr/bin/zip', '-d', site_packages, "distutils/command/*", "wx/locale/*", "*.c", "*.pyx", "*.png", "*.jpg", "*.ico", "*.xcf", "*.icns", "reportlab/fonts/*", ]) + # fixup numpy + numpy_dir = "%s/Contents/Resources/lib/python2.7/numpy" % app_name + remove_numpy_tests(numpy_dir) + fat_app_name = "%s/Omnimon.fat.app" % mac_dist_dir os.rename(app_name, fat_app_name) subprocess.call(['/usr/bin/ditto', '-arch', 'x86_64', fat_app_name, app_name])