Changeset 478

Show
Ignore:
Timestamp:
11/29/07 13:27:12 (1 year ago)
Author:
athomas
Message:

shedskin: Initial distutilsification.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • shedskin/branches/distutils/setup.py

    r477 r478  
    1 #!/usr/bin/env python 
    2 import sys, os 
     1from distutils.core import setup 
    32 
    4 # create compiler startup script 
    53 
    6 if sys.platform != 'win32': 
    7     ss = file('ss','w') 
    8     ss.write('#\!/bin/sh\n') 
    9     ss.write('export SHEDSKIN_ROOT="%s"\n' % os.getcwd())  
    10     ss.write('%s "$SHEDSKIN_ROOT/ss.py" $*\n' % sys.executable) 
    11     ss.close() 
    12  
    13     os.system('chmod a+wrx ss') 
    14  
     4setup(name='shedskin', 
     5      url='http://shed-skin.blogspot.com/', 
     6      author='Mark Dufour', 
     7      author_email='mark.dufour@gmail.com', 
     8      version='0.25', 
     9      description='An Optimizing Python-to-C++ Compiler', 
     10      long_description=\ 
     11        'Shed Skin is an experimental Python-to-C++ compiler, than can ' \ 
     12        'translate pure, but implicitly statically typed Python programs ' \ 
     13        'into optimized C++.', 
     14      license='GPL3', 
     15      scripts=['scripts/shedskin'], 
     16      packages=['shedskin'], 
     17      package_data={'shedskin': ['lib/*.*', 'lib/os/*.*']}, 
     18      ) 
  • shedskin/branches/distutils/shedskin/__init__.py

    r477 r478  
    88from compiler.ast import * 
    99from compiler.visitor import * 
     10 
     11import shedskin 
    1012 
    1113import sys, string, copy, getopt, os.path, textwrap, traceback 
     
    557559        self.alloc_info = {}                 # allocation site type information across iterations 
    558560        self.iterations = 0 
    559         self.sysdir = os.environ.get('SHEDSKIN_ROOT', '.').replace('\\','/') 
     561        shedskin_lib = os.path.dirname(shedskin.__file__) 
     562        self.sysdir = os.environ.get('SHEDSKIN_ROOT', shedskin_lib).replace('\\','/') 
    560563        self.libdir = connect_paths(self.sysdir, 'lib') 
    561564        self.main_mod = 'test'