Changeset 10351:dc2ce7a256ff in orange for setup.py


Ignore:
Timestamp:
02/22/12 12:39:14 (2 years ago)
Author:
anze <anze.staric@…>
Branch:
default
Message:

Use setuptools whenever possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r10350 r10351  
    44import distutils.core 
    55try: 
    6     from setuptools.command.install import install  
     6    from setuptools import setup 
     7    from setuptools.command.install import install 
     8    have_setuptools = True 
    79except ImportError: 
     10    from distutils.core import setup 
    811    from distutils.command.install import install 
    9  
    10 from distutils.core import setup 
     12    have_setuptools = False 
     13 
    1114from distutils.core import Extension 
    1215from distutils.command.build_ext import build_ext 
     
    1720 
    1821# This is set in setupegg.py 
    19 have_setuptools = getattr(distutils.core, "have_setuptools", False)  
     22have_setuptools = getattr(distutils.core, "have_setuptools", have_setuptools)  
     23if have_setuptools: 
     24    setuptools_args = {"zip_safe": False, 
     25                       "install_requires": ["numpy"], 
     26                       "extra_requires": ["networkx", "PyQt4", "PyQwt"] 
     27                      } 
     28else: 
     29    setuptools_args = {} 
     30 
    2031 
    2132import re 
     
    535546      matches.append(os.path.join(root, filename)) 
    536547packages = [os.path.dirname(pkg).replace(os.path.sep, '.') for pkg in matches] 
    537  
    538 if have_setuptools: 
    539     setuptools_args = {"zip_safe": False, 
    540                        "install_requires": ["numpy"], 
    541                        "extra_requires": ["networkx", "PyQt4", "PyQwt"] 
    542                        } 
    543 else: 
    544     setuptools_args = {} 
    545548 
    546549setup(cmdclass={"build_ext": pyxtract_build_ext, 
Note: See TracChangeset for help on using the changeset viewer.