Created
December 13, 2014 14:41
-
-
Save blink1073/4e4e9239cd3ad093d0f3 to your computer and use it in GitHub Desktop.
Scikit Image py2exe Changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/setup.py b/setup.py | |
index 01b6962..fa3f50e 100755 | |
--- a/setup.py | |
+++ b/setup.py | |
@@ -20,14 +20,29 @@ DOWNLOAD_URL = 'http://github.com/scikit-image/scikit-image' | |
VERSION = '0.11dev' | |
PYTHON_VERSION = (2, 6) | |
-import re | |
import os | |
import sys | |
-import setuptools | |
+try: | |
+ import py2exe as _py2exe | |
+except ImportError: | |
+ pass | |
+ | |
+from distutils.core import setup | |
from distutils.command.build_py import build_py | |
from distutils.version import LooseVersion | |
+from pkgutil import walk_packages | |
+ | |
+ | |
+def find_packages(path=__file__, prefix="", exclude=None): | |
+ for _, name, ispkg in walk_packages(path, ''): | |
+ if exclude: | |
+ for e in exclude: | |
+ if name == e: | |
+ continue | |
+ if ispkg: | |
+ yield name | |
# These are manually checked. | |
# These packages are sometimes installed outside of the setuptools scope | |
@@ -151,7 +166,7 @@ if __name__ == "__main__": | |
install_requires=[ | |
"six>=%s" % DEPENDENCIES['six'] | |
], | |
- packages=setuptools.find_packages(exclude=['doc']), | |
+ packages=list(find_packages(exclude=['doc'])), | |
include_package_data=True, | |
zip_safe=False, # the package can run out of an .egg file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment