Ejemplo n.º 1
0
def main():
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print s % (name, version, required_python_version)
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']

    dist = setup(
        name                 = name,
        version              = version,
        description          = description,
        long_description     = readme,
        keywords             = keywords,
        packages             = packages,
        package_dir          = package_dir,
        data_files           = data_files,
        scripts              = datafiles('bin'),
        requires             = ['python (>=2.6)', 'sphinx (>=1.0.4)',
                                'Cheetah (>=2.4)', 'cherrypy (>=3.1.2)'],
        classifiers          = classifiers,
        cmdclass             = {'test': TestCommand, 'clean': CleanCommand},
        author               = author,
        author_email         = author_email,
        url                  = url,
        license              = license,
    )
Ejemplo n.º 2
0
def main():
    """Main routine"""
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print s % (name, version, required_python_version)
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']


    dist = setup(
      name                 = name,
      version              = version,
      description          = desc,
      long_description     = readme,
      keywords             = keywords,
#      package_dir          = {"":'pyquerybuilder'},
      packages             = packages,
      package_data         = package_data,
#      data_files           = data_files,
      include_package_data = True,
      install_requires     = requirements,
#      scripts              = scriptfiles,
      classifiers          = classifiers,
      author               = author,
      author_email         = author_email,
      url                  = url,
      license              = license,
     )
Ejemplo n.º 3
0
Archivo: setup.py Proyecto: sbraz/klaus
def install_data_files_hack():
    # This is a clever hack to circumvent distutil's data_files
    # policy "install once, find never". Definitely a TODO!
    # -- https://groups.google.com/group/comp.lang.python/msg/2105ee4d9e8042cb
    from distutils.command.install import INSTALL_SCHEMES
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']
Ejemplo n.º 4
0
def main():
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print(s % (name, version, required_python_version))
        sys.exit(1)
    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in list(INSTALL_SCHEMES.values()):
        scheme['data'] = scheme['purelib']

    setup(
        name=name,
        version=version,
        description=desc,
        long_description=long_desc,
        classifiers=classifiers,
        author=author,
        author_email=author_email,
        url=url,
        license=cp_license,
        packages=packages,
        data_files=data_files,
        scripts=scripts,
        cmdclass=cmd_class,
    )
Ejemplo n.º 5
0
def main():
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print s % (name, version, required_python_version)
        sys.exit(1)
    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme["data"] = scheme["purelib"]

    dist = setup(
        name=name,
        version=version,
        description=desc,
        long_description=long_desc,
        classifiers=classifiers,
        author=author,
        author_email=author_email,
        url=url,
        license=cp_license,
        packages=packages,
        download_url=download_url,
        data_files=data_files,
        scripts=[os.path.join("cherrypy", "cherryd")],
    )
Ejemplo n.º 6
0
def main():
    "Main function"
    version      = skl_version
    name         = "Skeletons"
    description  = "Skeletons description"
    url          = "Skeletons URL"
    readme       = "Skeletons readme"
    author       = "Valentin Kuznetsov",
    author_email = "<Valentin Kuznetsov email [dot] com>",
    keywords     = ["Skeletons"]
    package_dir  = {'Skeletons': 'python/Skeletons'}
    packages     = find_packages('python')
    extentions   = [] # list your extensions here
    data_files   = [] # list of tuples whose entries are (dir, [data_files])
    data_files   = [(install_prefix('etc'), datafiles('etc')),
                    (install_prefix('scripts'), datafiles('scripts'))
                   ]
    cms_license  = "Skeletons license"
    classifiers  = [
        "Development Status :: 3 - Production/Beta",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Skeletons License",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: POSIX",
        "Programming Language :: Python",
        "Topic :: General"
    ]

    if  sys.version < required_python_version:
        msg = "I'm sorry, but %s %s requires Python %s or later."
        print msg % (name, version, required_python_version)
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']

    setup(
        name                 = name,
        version              = version,
        description          = description,
        long_description     = readme,
        keywords             = keywords,
        packages             = packages,
        package_dir          = package_dir,
        data_files           = data_files,
        scripts              = datafiles('bin'),
        requires             = ['python (>=2.6)'],
        classifiers          = classifiers,
        ext_modules          = extentions,
        cmdclass             = {'test': TestCommand,
                                'clean': CleanCommand,
                                'doc': DocCommand},
        author               = author,
        author_email         = author_email,
        url                  = url,
        license              = cms_license,
    )
Ejemplo n.º 7
0
def main():
    "Main function"
    version      = t0_version
    name         = "T0"
    description  = "CMS T0 System"
    url          = \
        "https://twiki.cern.ch/twiki/bin/viewauth/CMS/T0ASTDevelopmentPlan"
    readme       = "T0 CMS system %s" % url
    author       = "Dirk Hufnagel",
    author_email = "Dirk.Hufnagel [at] cern.ch>",
    keywords     = ["T0"]
    package_dir  = \
        {"T0": "src/python/T0", "T0Component": "src/python/T0Component"}
    packages     = find_packages('src/python')
    scriptfiles  = [] # list of scripts
    data_files   = [] # list of tuples whose entries are (dir, [data_files])
    data_files   = [(install_prefix('etc'), datafiles('etc', recursive=False)),
                    (install_prefix('bin'), datafiles('bin', recursive=False))]
    cms_license  = "CMS experiment software"
    classifiers  = [
        "Development Status :: 3 - Production/Beta",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: CMS/CERN Software License",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: POSIX",
        "Programming Language :: Python",
        "Topic :: Database"
    ]

    if  sys.version < required_python_version:
        msg = "I'm sorry, but %s %s requires Python %s or later."
        print(msg % (name, version, required_python_version))
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']

    setup(
        name                 = name,
        version              = version,
        description          = description,
        long_description     = readme,
        keywords             = keywords,
        packages             = packages,
        package_dir          = package_dir,
        data_files           = data_files,
        scripts              = scriptfiles,
        requires             = ['python (>=2.6)'],
        classifiers          = classifiers,
        cmdclass             = {'test': TestCommand, 'clean': CleanCommand},
        author               = author,
        author_email         = author_email,
        url                  = url,
        license              = cms_license,
    )
Ejemplo n.º 8
0
def main():
    "Main function"
    version      = cc_version
    name         = "CRABClient"
    description  = "CMS CRAB Client"
    url          = \
        "https://twiki.cern.ch/twiki/bin/viewauth/CMS/RunningCRAB3"
    readme       = "CRAB Client %s" % url
    author       = "",
    author_email = "",
    keywords     = ["CRABClient"]
    package_dir  = \
        {"CRABClient": "src/python/CRABClient"}
    packages     = find_packages('src/python')
    data_files   = [] # list of tuples whose entries are (dir, [data_files])
    cms_license  = "CMS experiment software"
    classifiers  = [
        "Development Status :: 3 - Production/Beta",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: CMS/CERN Software License",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: POSIX",
        "Programming Language :: Python",
        "Topic :: Scientific/Engineering"
    ]

    if  sys.version < required_python_version:
        msg = "I'm sorry, but %s %s requires Python %s or later."
        print msg % (name, version, required_python_version)
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']

    setup(
        name                 = name,
        version              = version,
        description          = description,
        long_description     = readme,
        keywords             = keywords,
        packages             = packages,
        package_dir          = package_dir,
        data_files           = data_files,
        scripts              = datafiles('bin'),
        requires             = ['python (>=2.6)'],
        classifiers          = classifiers,
        cmdclass             = {'test': TestCommand, 'clean': CleanCommand},
        author               = author,
        author_email         = author_email,
        url                  = url,
        license              = cms_license,
    )
Ejemplo n.º 9
0
def main():
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print(s % (name, version, required_python_version))
        sys.exit(1)
    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in list(INSTALL_SCHEMES.values()):
        scheme['data'] = scheme['purelib']

    setup(**setup_params)
Ejemplo n.º 10
0
def main():
    "Main function"
    version      = dp_version
    name         = "DataProvider"
    description  = "CMS DataProvider generates CMS meta-data, e.g. DBS/Phedex"
    url          = ""
    readme       = "DataProvider package %s" % url
    author       = "Valentin Kuznetsov",
    author_email = "vkuznet [at] gmail [dot] com>",
    keywords     = ["DataProvider"]
    package_dir  = {'DataProvider': 'src/python/DataProvider'}
    packages     = find_packages('src/python')
    data_files   = [] # list of tuples whose entries are (dir, [data_files])
    cms_license  = "CMS experiment software"
    classifiers  = [
        "Development Status :: 3 - Production/Beta",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: CMS/CERN Software License",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: POSIX",
        "Programming Language :: Python",
        "Topic :: Database"
    ]

    if  sys.version < required_python_version:
        msg = "I'm sorry, but %s %s requires Python %s or later."
        print msg % (name, version, required_python_version)
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']

    setup(
        name                 = name,
        version              = version,
        description          = description,
        long_description     = readme,
        keywords             = keywords,
        packages             = packages,
        package_dir          = package_dir,
        data_files           = data_files,
        scripts              = datafiles('bin'),
        requires             = ['python (>=2.6)'],
        classifiers          = classifiers,
        cmdclass             = {'test': TestCommand, 'clean': CleanCommand, 'doc': DocCommand},
        author               = author,
        author_email         = author_email,
        url                  = url,
        license              = cms_license,
    )
Ejemplo n.º 11
0
Archivo: setup.py Proyecto: ktf/DAS
def main():
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print s % (name, version, required_python_version)
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']

    dist = setup(
        name                 = name,
        version              = version,
        description          = description,
        long_description     = readme,
        keywords             = keywords,
        packages             = packages,
        package_dir          = package_dir,
        data_files           = data_files,
        scripts              = datafiles('bin'),
        requires             = ['python (>=2.6)', 'pymongo (>=1.6)', 'ply (>=3.3)',
                                'sphinx (>=1.0.4)', 'cherrypy (>=3.1.2)',
                                'Cheetah (>=2.4)', 'yaml (>=3.09)',
                                # keyword search
                                'nltk', 'jsonpath_rw'],
        ext_modules          = [Extension('DAS.extensions.das_speed_utils',
                                   include_dirs=['extensions'],
                                   sources=['src/python/DAS/extensions/dict_handler.c']),
                               Extension('DAS.extensions.das_hash',
                                   include_dirs=['extensions'],
                                   sources=['src/python/DAS/extensions/das_hash.c']),

                               # fast_recursive_ranker is based on cython, but
                               # is distributed as .c source
                               # .pyx->.c to be compiled separately
                               #  so cython is not required for installation
                               Extension('DAS.extensions.fast_recursive_ranker',
                                   sources=['src/python/DAS/extensions/fast_recursive_ranker.c'])],
        classifiers          = classifiers,
        cmdclass             = {'build_ext': BuildExtCommand,
                                'test': TestCommand,
                                'doc': DocCommand,
                                'clean': CleanCommand},
        author               = author,
        author_email         = author_email,
        url                  = url,
        license              = license,
    )
Ejemplo n.º 12
0
def _gen_freeze_scheme():
    """ Generate scheme to freeze distribution.
    """
    freeze_scheme = {}

    for key in SCHEME_KEYS:
        paths = []
        for scheme_name, install_scheme in INSTALL_SCHEMES.iteritems():
            val = install_scheme[key]
            if scheme_name == 'unix_home':
                val = val.replace('$base', '$home', 1)
            else:
                val = val.replace('$base', '$prefix', 1)
                val = val.replace('$platbase', '$exec_prefix', 1)
            paths.append(val)
        freeze_scheme[key] = paths

    return freeze_scheme
Ejemplo n.º 13
0
def main():
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print s % (name, version, required_python_version)
        sys.exit(1)
    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']
    
    dist = setup(
        name=name,
        version=version,
        description="Python Commons",
        long_description="Utility code.",
        author="Tim Watson",
        author_email="*****@*****.**",
        url="http://github.com/n0gg1n/commons",
        license="BSD",
        packages=['commons'],
        download_url="http://github.com/n0gg1n/badrabbit",
        data_files=[('commons',['INSTALL', 'LICENSE', 'README'])]
    )
Ejemplo n.º 14
0
def main():
    if sys.version < required_python_version:
        s = "I'm sorry, but %s %s requires Python %s or later."
        print s % (name, version, required_python_version)
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']

    dist = setup(
        name                 = name,
        version              = version,
        description          = description,
        long_description     = readme,
        keywords             = keywords,
        packages             = packages,
        package_dir          = package_dir,
        data_files           = data_files,
        scripts              = datafiles('bin'),
        requires             = ['python (>=2.6)', 'pymongo (>=1.6)', 'ply (>=3.3)',
                                'sphinx (>=1.0.4)', 'cherrypy (>=3.1.2)',
                                'Cheetah (>=2.4)', 'yaml (>=3.09)'],
        ext_modules          = [Extension('DAS.extensions.das_speed_utils',
                               include_dirs=['extensions'],
                               sources=['src/python/DAS/extensions/dict_handler.c'])],
        classifiers          = classifiers,
        cmdclass             = {'build_ext': BuildExtCommand,
                                'test': TestCommand,
                                'doc': DocCommand,
                                'clean': CleanCommand},
        author               = author,
        author_email         = author_email,
        url                  = url,
        license              = license,
    )
Ejemplo n.º 15
0
    platform-neutral way.
    """
    if result is None:
        result = []
    head, tail = os.path.split(path)
    if head == '':
        return [tail] + result
    if head == path:
        return result
    return fullsplit(head, [tail] + result)


# Tell distutils to put the data_files in platform-specific installation
# locations. See here for an explanation:
# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
for scheme in INSTALL_SCHEMES.values():
    scheme['data'] = scheme['purelib']

# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir != '':
    os.chdir(root_dir)
dj_scaffold_dir = 'dj_scaffold'

for dirpath, dirnames, filenames in os.walk(dj_scaffold_dir):
    # Ignore dirnames that start with '.'
    is_data = False
    if '/conf/' in dirpath.replace('\\', '/'):
        is_data = True
Ejemplo n.º 16
0
elif platform.system() == 'Windows':
    if ctypes.sizeof(ctypes.c_void_p) == 8:
        liblist = [
            'mosek64_8_0.dll', 'mosekxx8_0.dll', 'libiomp5md.dll',
            'mosekscopt8_0.dll'
        ]
    else:
        liblist = [
            'mosek8_0.dll', 'mosekxx8_0.dll', 'libiomp5md.dll',
            'mosekscopt8_0.dll'
        ]
else:
    raise InstallationError("Unsupported system")

# hack so data files are copied to the module directory
for k in INSTALL_SCHEMES.keys():
    INSTALL_SCHEMES[k]['data'] = INSTALL_SCHEMES[k]['purelib']

os.chdir(os.path.abspath(os.path.dirname(__file__)))


def _post_install(sitedir):
    mskdir = os.path.join(sitedir, 'mosek')
    with open(os.path.join(mskdir, 'mosekorigin.py'), 'wt') as f:
        f.write('__mosekinstpath__ = {0}\n'.format(repr(mosekinstdir)))


class install(distutils.command.install.install):
    def run(self):
        distutils.command.install.install.run(self)
        self.execute(_post_install, (self.install_lib, ),
Ejemplo n.º 17
0
]), ('gimmemotifs/score_dists', ['score_dists/total_wic_mean_score_dist.txt']),
              ('gimmemotifs/genes',
               ['genes/hg18.bed', 'genes/mm9.bed', 'genes/xenTro2.bed']),
              ('gimmemotifs/bg', [
                  'bg/hg18.MotifSampler.bg', 'bg/mm9.MotifSampler.bg',
                  'bg/xenTro2.MotifSampler.bg'
              ]),
              ('gimmemotifs/motif_databases', ['motif_databases/jaspar.pfm']),
              ('gimmemotifs/doc',
               ['doc/gimmemotifs_manual.pdf', 'doc/gimmemotifs_manual.html']),
              ('gimmemotifs/examples',
               ['examples/TAp73alpha.bed', 'examples/TAp73alpha.fa']),
              ('gimmemotifs/genome_index', ['genome_index/README.txt'])]

# Fix for install_data, add share to prefix (borrowed from Dan Christiansen)
for platform, scheme in INSTALL_SCHEMES.iteritems():
    if platform.startswith('unix_'):
        if scheme['data'][0] == '$' and '/' not in scheme['data']:
            scheme['data'] = os.path.join(scheme['data'], 'share')

dlog.info("checking dependencies")
try:
    import pp
    import matplotlib
    import kid
    import scipy
    import numpy
except ImportError, inst:
    print "Error: required dependency not found!"
    print inst
    sys.exit()
Ejemplo n.º 18
0
    try:
        return open(os.path.join(root_dir, f), 'rb').read().decode('utf-8').strip()
    except IOError:
        return 'UNKNOWN'

def list_data_files(d):
    data_files = []
    for root, dirs, files in os.walk(os.path.join(root_dir, d)):
        path = root.replace(root_dir + os.sep, '', 1)
        if len(files) > 0:
            data_files.append((path, [os.path.join(path, f) for f in files]))

    return data_files

# Tell distutils to put data_files in platform-specific installation
for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib']

# Fix MacOS platform-specific lib dir
class osx_install_data(install_data):
    def finalize_options(self):
        self.set_undefined_options('install', ('install_lib', 'install_dir'))
        install_data.finalize_options(self)

if sys.platform == "darwin":
    cmdclasses = {'install_data': osx_install_data}
else:
    cmdclasses = {'install_data': install_data}

setup(
    name = 'django-pki',
    version=version,
Ejemplo n.º 19
0
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

"""

To install MySQL Connector/Python:

    shell> python ./setup.py install

"""

import sys
from distutils.core import setup
from distutils.command.install import INSTALL_SCHEMES

# Make sure that data files are actually installed in the package directory
for install_scheme in INSTALL_SCHEMES.values():
    install_scheme['data'] = install_scheme['purelib']

import metasetupinfo

setup(
    name = metasetupinfo.name,
    version = metasetupinfo.version,
    description = metasetupinfo.description,
    long_description = metasetupinfo.long_description,
    author = metasetupinfo.author,
    author_email = metasetupinfo.author_email,
    license = metasetupinfo.license,
    keywords = metasetupinfo.keywords,
    url = metasetupinfo.url,
    download_url = metasetupinfo.download_url,
Ejemplo n.º 20
0
           # Not storing templates in python eggs
           'pkg_resources', 'resource',
           # Not using the python interactive interpreter
           'IPython',
           # Not sure where django references these...
           'crypt',
           # Not using SSL
           'OpenSSL',
           # Not needed to include frePPLe's own python interface
           'frepple',
           ]

# Collect all static files to be included in the distribution.
# This includes our custom python code as well.
from distutils.command.install import INSTALL_SCHEMES
for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib']
data_files = []
for srcdir, targetdir in [
   (os.path.join(djangodirectory,'contrib','admin','templates'), 'templates'),
   (os.path.join(djangodirectory,'contrib','admin','static'), 'static'),
   (os.path.join(djangodirectory,'conf','locale'), os.path.join('locale','django')),
   (os.path.join(djangodirectory,'contrib','auth','locale'), os.path.join('locale','auth')),
   (os.path.join(djangodirectory,'contrib','contenttypes','locale'), os.path.join('locale','contenttypes')),
   (os.path.join(djangodirectory,'contrib','sessions','locale'), os.path.join('locale','sessions')),
   (os.path.join(djangodirectory,'contrib','admin','locale'), os.path.join('locale','admin')),
   (os.path.join(djangodirectory,'contrib','messages','locale'), os.path.join('locale','messages')),
   (freppledirectory, os.path.join('custom','freppledb')),
   ]:
   root_path_length = len(srcdir) + 1
   for dirpath, dirnames, filenames in os.walk(os.path.join(srcdir)):
     # Ignore dirnames that start with '.'
Ejemplo n.º 21
0
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""

To install MySQL Connector/Python:

    shell> python ./setup.py install

"""

from distutils.core import setup
from distutils.command.install import INSTALL_SCHEMES

# Make sure that data files are actually installed in the package directory
for install_scheme in INSTALL_SCHEMES.values():
    install_scheme['data'] = install_scheme['purelib']

import setupinfo
try:
    from cpyint import metasetupinfo
    setupinfo.command_classes.update(metasetupinfo.command_classes)
except (ImportError, AttributeError):
    # python-internal not available
    pass

setup(
    name=setupinfo.name,
    version=setupinfo.version,
    description=setupinfo.description,
    long_description=setupinfo.long_description,
Ejemplo n.º 22
0
    platform-neutral way.
    """
    if result is None:
        result = []
    head, tail = os.path.split(path)
    if head == '':
        return [tail] + result
    if head == path:
        return result
    return full_split(head, [tail] + result)


# Tell distutils to put the data_files in platform-specific installation
# locations. See here for an explanation:
# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
for scheme in list(INSTALL_SCHEMES.values()):
    scheme['data'] = scheme['purelib']

# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir != '':
    os.chdir(root_dir)


def is_not_module(filename):
    return os.path.splitext(filename)[1] not in ['.py', '.pyc', '.pyo']


scripts = ['dodo', 'dodo.py']
Ejemplo n.º 23
0
    ('gimmemotifs/score_dists', ['score_dists/total_wic_mean_score_dist.txt']),
    ('gimmemotifs/genes', ['genes/hg18.bed', 'genes/hg19.bed', 'genes/xenTro2.bed', 'genes/mm9.bed']),
    ('gimmemotifs/bg', ['bg/hg19.MotifSampler.bg', 'bg/hg18.MotifSampler.bg', 'bg/mm9.MotifSampler.bg', 'bg/xenTro2.MotifSampler.bg']),
    ('gimmemotifs/motif_databases', [
                                    'motif_databases/JASPAR2010_vertebrate.pwm',
                                    'motif_databases/vertebrate_motifs.pwm',
                                    'motif_databases/vertebrate_clusters.pwm',
                                    ]),
#    ('gimmemotifs/doc', ['doc/gimmemotifs_manual.pdf','doc/gimmemotifs_manual.html']),
    ('gimmemotifs/examples', ['examples/TAp73alpha.bed','examples/TAp73alpha.fa']),
    ('gimmemotifs/genome_index', ['genome_index/README.txt'])
]


# Fix for install_data, add share to prefix (borrowed from Dan Christiansen) 
for platform, scheme in INSTALL_SCHEMES.iteritems():
    if platform.startswith('unix_'):
        if scheme['data'][0] == '$' and '/' not in scheme['data']:
            scheme['data'] = os.path.join(scheme['data'], 'share')

class build_tools(Command):
    description = "compile all included motif prediction tools"

    def initialize_options(self):
        self.build_base = None
        self.plat_name = None
        self.build_tools_dir = None
        self.machine = None

    def finalize_options(self):    
        if self.plat_name is None:
            'osx64x86'   : [ 'libmosek64.7.1.dylib',
                             'libmosekglb64.7.1.dylib',
                             'libiomp5.dylib',
                             'libmosekxx7_1.dylib' ],
            'win64x86'   : [ 'mosek64_7_1.dll',
                             'mosekglb64_7_1.dll',
                             'mosekxx7_1.dll',
                             'libiomp5md.dll' ],
            'win32x86'   : [ 'mosek7_1.dll',
                             'mosekglb7_1.dll',
                             'mosekxx7_1.dll',
                             'libiomp5md.dll' ],
            }

# hack so data files are copied to the module directory
for k in INSTALL_SCHEMES.keys():
  INSTALL_SCHEMES[k]['data'] = INSTALL_SCHEMES[k]['purelib']

os.chdir(os.path.abspath(os.path.dirname(__file__)))

setup( name='Mosek',
       version      = '7.1.32',
       description  = 'Mosek/Python APIs',
       long_description = 'Interface for MOSEK',
       author       = 'Mosek ApS',
       author_email = "*****@*****.**",
       license      = "See license.pdf in the MOSEK distribution",
       url          = 'http://www.mosek.com',
       packages     = [ 'mosek', 'mosek.fusion' ],
       data_files   = [ ('mosek',[os.path.join(instdir,'../../bin',l)]) for l in liblist[platformid] ] +
                      [ ('mosek',[os.path.join(instdir,'../../../../../license.pdf')])],
Ejemplo n.º 25
0
    os.chdir(root_dir)
src_dir = 'kombu'


def fullsplit(path, result=None):
    if result is None:
        result = []
    head, tail = os.path.split(path)
    if head == '':
        return [tail] + result
    if head == path:
        return result
    return fullsplit(head, [tail] + result)


for scheme in list(INSTALL_SCHEMES.values()):
    scheme['data'] = scheme['purelib']

for dirpath, dirnames, filenames in os.walk(src_dir):
    # Ignore dirnames that start with '.'
    for i, dirname in enumerate(dirnames):
        if dirname.startswith('.'):
            del dirnames[i]
    for filename in filenames:
        if filename.endswith('.py'):
            packages.append('.'.join(fullsplit(dirpath)))
        else:
            data_files.append(
                [dirpath, [os.path.join(dirpath, f) for f in filenames]],
            )
Ejemplo n.º 26
0
from distutils.command.install import INSTALL_SCHEMES

from reviewboard import get_package_version, is_release, VERSION


# Make sure we're actually in the directory containing setup.py.
root_dir = os.path.dirname(__file__)

if root_dir != "":
    os.chdir(root_dir)


# Tell distutils to put the data_files in platform-specific installation
# locations. See here for an explanation:
# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
for scheme in INSTALL_SCHEMES.values():
    scheme["data"] = scheme["purelib"]


class osx_install_data(install_data):
    # On MacOS, the platform-specific lib dir is
    # /System/Library/Framework/Python/.../
    # which is wrong. Python 2.5 supplied with MacOS 10.5 has an
    # Apple-specific fix for this in distutils.command.install_data#306. It
    # fixes install_lib but not install_data, which is why we roll our own
    # install_data class.

    def finalize_options(self):
        # By the time finalize_options is called, install.install_lib is
        # set to the fixed directory, so we set the installdir to install_lib.
        # The # install_data class uses ('install_data', 'install_dir') instead.
Ejemplo n.º 27
0
def main():
    "Main function"
    version = cc_version
    name = "CRABClient"
    description = "CMS CRAB Client"
    url          = \
        "https://twiki.cern.ch/twiki/bin/viewauth/CMS/RunningCRAB3"
    readme = "CRAB Client %s" % url
    author = "",
    author_email = "",
    keywords = ["CRABClient"]
    package_dir  = \
        {"CRABClient": "src/python/CRABClient", "CRABAPI": "src/python/CRABAPI"}
    packages = find_packages('src/python')
    data_files = [('etc', [
        'doc/FullConfiguration.py', 'doc/ExampleConfiguration.py',
        'etc/crab-bash-completion.sh', 'etc/init-light.sh',
        'etc/init-light.csh', 'etc/init-light-pre.sh'
    ])]  # list of tuples whose entries are (dir, [data_files])
    cms_license = "CMS experiment software"
    classifiers = [
        "Development Status :: 3 - Production/Beta",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: CMS/CERN Software License",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: POSIX", "Programming Language :: Python",
        "Topic :: Scientific/Engineering"
    ]

    if sys.version < required_python_version:
        msg = "I'm sorry, but %s %s requires Python %s or later."
        print(msg % (name, version, required_python_version))
        sys.exit(1)

    # set default location for "data_files" to
    # platform specific "site-packages" location
    for scheme in INSTALL_SCHEMES.values():
        scheme['data'] = scheme['purelib']

    setup(
        name=name,
        version=version,
        description=description,
        long_description=readme,
        keywords=keywords,
        packages=packages,
        package_dir=package_dir,
        data_files=data_files,
        scripts=datafiles('bin'),
        requires=['python (>=2.6)'],
        classifiers=classifiers,
        cmdclass={
            'test': TestCommand,
            'clean': CleanCommand
        },
        author=author,
        author_email=author_email,
        url=url,
        license=cms_license,
    )