Changeset 10471:51b3ee98ec02 in orange for setup.py


Ignore:
Timestamp:
03/08/12 15:19:10 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Removed the use of ugly builtin.ORANGESETUP. Instead use imp module to load Orange.version directly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r10443 r10471  
    657657    try: 
    658658        out = _minimal_ext_cmd(['hg', 'ide', '-i']) 
    659         HG_REVISION = out.strip().decode('ascii') 
     659        HG_REVISION = str(out.strip().decode('ascii')) 
    660660    except OSError: 
    661661        HG_REVISION = "Unknown" 
     
    683683    elif os.path.exists('Orange/version.py'): 
    684684        # must be a source distribution, use existing version file 
    685         from Orange.version import hg_revision as HG_REVISION 
     685        import imp 
     686        version = imp.load_source("Orange.version", "Orange/version.py") 
     687        HG_REVISION = version.hg_revision 
    686688    else: 
    687689        HG_REVISION = "Unknown" 
     
    704706def setup_package(): 
    705707    write_version_py() 
    706     setup(name =NAME, 
     708    setup(name = NAME, 
    707709          description = DESCRIPTION, 
    708710          version = VERSION, 
Note: See TracChangeset for help on using the changeset viewer.