Changeset 9567:73ff6ea797da in orange for orange/setup.py


Ignore:
Timestamp:
01/25/12 21:00:31 (2 years ago)
Author:
markotoplak
Branch:
default
Message:

Tree: format -> to_string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/setup.py

    r9068 r9567  
    2424from subprocess import check_call 
    2525 
    26 from types import * 
     26import types 
    2727 
    2828from distutils.dep_util import newer_group 
     
    3232from distutils.sysconfig import get_python_inc, get_config_var 
    3333import numpy 
    34 numpy_include_dir = numpy.get_include(); 
     34numpy_include_dir = numpy.get_include() 
    3535python_include_dir = get_python_inc(plat_specific=1) 
    3636 
     
    9191            self.library_dirs.append(self.build_lib)  
    9292        else: 
    93             self.library_dirs.append("./")  
     93            self.library_dirs.append("./orange") 
    9494         
    9595    def build_extension(self, ext): 
     
    128128        ## mostly copied from build_extension 
    129129        sources = ext.sources 
    130         if sources is None or type(sources) not in (ListType, TupleType): 
     130        if sources is None or type(sources) not in (types.ListType, types.TupleType): 
    131131            raise DistutilsSetupError, \ 
    132132                  ("in 'ext_modules' option (extension '%s'), " + 
     
    219219        ## mostly copied from build_extension, changed 
    220220        sources = ext.sources 
    221         if sources is None or type(sources) not in (ListType, TupleType): 
     221        if sources is None or type(sources) not in (types.ListType, types.TupleType): 
    222222            raise DistutilsSetupError, \ 
    223223                  ("in 'ext_modules' option (extension '%s'), " + 
     
    469469import fnmatch 
    470470matches = [] 
     471os.chdir("orange") 
    471472for root, dirnames, filenames in os.walk('Orange'): #Recursively find '__init__.py's 
    472473  for filename in fnmatch.filter(filenames, '__init__.py'): 
    473474      matches.append(os.path.join(root, filename)) 
    474475packages = [os.path.dirname(pkg).replace(os.path.sep, '.') for pkg in matches] 
     476os.chdir("..") 
    475477 
    476478if have_setuptools: 
     
    493495      download_url = "http://orange.biolab.si/svn/orange/trunk", 
    494496      packages = packages + ["", 
    495                              "OrangeCanvas",  
     497                             "OrangeCanvas", 
    496498                             "OrangeWidgets",  
    497499                             "OrangeWidgets.Associate", 
     
    508510                             "doc", 
    509511                             ], 
    510       package_dir = {"": "."}, 
     512      package_dir = {"": "orange"}, 
    511513      package_data = {"OrangeCanvas": ["icons/*.png", "orngCanvas.pyw", "WidgetTabs.txt"], 
    512514                      "OrangeWidgets": ["icons/*.png", "icons/backgrounds/*.png", "report/index.html"], 
     
    522524                      "OrangeWidgets.plot.primitives": ["*.obj"], 
    523525                      "doc": ["datasets/*.tab", ], 
    524                       "": ["orangerc.cfg"]  
     526                      "": ["orangerc.cfg"] 
    525527                      }, 
    526528      ext_modules = [include_ext, orange_ext, orangeom_ext, orangene_ext, corn_ext, statc_ext], 
    527529      extra_path=("orange", "orange"), 
    528       scripts = ["orange-canvas"], 
     530      scripts = ["orange/orange-canvas"], 
    529531      license = "GNU General Public License (GPL)", 
    530532      keywords = ["data mining", "machine learning", "artificial intelligence"], 
Note: See TracChangeset for help on using the changeset viewer.