예제 #1
0
파일: setup.py 프로젝트: gmkling/athenacl
def reportDisutils(sudoFound=None):
    # get site-packages dirs absolute file path
    sitePkgAthena = os.path.join(osTools.findSitePackages(), 'athenaCL')      
    if os.path.exists(sitePkgAthena):
        environment.printWarn(['distutuls install:', sitePkgAthena])
    else:
        environment.printWarn('no distutuls install')
예제 #2
0
파일: setup.py 프로젝트: gmkling/athenacl
def removePthLoader(sudoFound=None):
    """remove old pth loader"""
    environment.printWarn('removing outdated pth file')
    dst = os.path.join(osTools.findSitePackages(), 'athenaCL.pth')
    if os.path.exists(dst):
        osTools.rmSudo(dst, sudoFound)
    else:
        environment.printWarn('no pth file exists')
예제 #3
0
파일: setup.py 프로젝트: gmkling/athenacl
def runDisutils(bdistType):
    if bdistType == 'bdist_egg':
        print('using setuptools')
        from setuptools import setup
    else:
        from distutils.core import setup
    # store object for later examination
    setup(name = 'athenaCL', 
        version = athVersion,
        description = lang.msgAthDescShort, 
        long_description = lang.msgAthDescLong,
        author = lang.msgAuthor,
        author_email = lang.msgAuthorEmail,
        license = lang.msgLicenseName, 
        url = drawer.urlPrep(lang.msgAthURL),
        classifiers = _getClassifiers(),
        download_url = lang.msgAthDownloadTar % athVersion,
        packages = _getPackagesList(), # first is 'athenaCL'   
        package_data = {'athenaCL' : ['audio/*.aif',

                                      'demo/csound/*.xml',
                                      'demo/csound/*.txt',
                                      'demo/csound/*.py',
                                      'demo/csound/*.mp3',

                                      'demo/legacy/*.xml',
                                      'demo/legacy/*.txt',
                                      'demo/legacy/*.py',

                                      'demo/manual/*.xml',
                                      'demo/manual/*.txt',
                                      'demo/manual/*.py',

                                      'demo/midi/*.xml',
                                      'demo/midi/*.txt',
                                      'demo/midi/*.py',
                                      'demo/midi/*.mid',

                                      'demo/supercollider/*.xml',
                                      'demo/supercollider/*.txt',
                                      'demo/supercollider/*.py',

                                      'doc/*.htm',
                                      'doc/*.txt',
                                      'doc/html/*.htm',
                                      'doc/html/*.css',
                                      'doc/html/images/*.png',

                                      'test/xml/*.xml',

                                     ]}
    ) # close setup args
    
    # return absolute file path to athenaCL dir in site-packages
    sitePkgAthena = os.path.join(osTools.findSitePackages(), 'athenaCL')          
    return sitePkgAthena
예제 #4
0
파일: setup.py 프로젝트: gmkling/athenacl
def reportPthLoader(sudoFound=None):
    """remove old pth loader"""
    dst = os.path.join(osTools.findSitePackages(), 'athenaCL.pth')
    if os.path.exists(dst):
        environment.printWarn('pth file exists: %s' % dst)
        f = open(dst)
        msg = f.read()
        f.close()
        environment.printWarn(['pth contents:', msg.strip()])
    else:
        environment.printWarn('no pth file exists')
예제 #5
0
파일: setup.py 프로젝트: gmkling/athenacl
def writePthLoader(fpPackageDir):
    """a pth file named athenaCL.pth can be placed in site-packages
    to give the path to the outer dir (not athenaCL dir), 
    allowing easy imports w/o having to move files..."""
    environment.printWarn('writing pth file')
    # get dir outside of athenaCL dir
    msg = '%s\n' % fpPackageDir
    dst = os.path.join(osTools.findSitePackages(), 'athenaCL.pth')
    try:
        f = open(dst, 'w')      
        f.write(msg)
        f.close()
    except IOError: 
        environment.printWarn(lang.msgFileIoError % dst)