joey shelton / LED_Demo

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers setup.py Source File

setup.py

00001 """
00002 This module defines the attributes of the
00003 PyPI package for the Mbed SDK
00004 """
00005 
00006 from shutil import copyfileobj
00007 from os.path import isfile, join
00008 from tempfile import TemporaryFile
00009 from setuptools import find_packages
00010 from distutils.core import setup
00011 
00012 LICENSE = open('LICENSE').read()
00013 DESCRIPTION = """A set of Python scripts that can be used to compile programs written on top of the `mbed framework`_. It can also be used to export mbed projects to other build systems and IDEs (uVision, IAR, makefiles).
00014 
00015 .. _mbed framework: http://mbed.org"""
00016 OWNER_NAMES = 'emilmont, bogdanm'
00017 OWNER_EMAILS = 'Emilio.Monti@arm.com, Bogdan.Marinescu@arm.com'
00018 
00019 # If mbed_settings.py exists in tools, read it in a temporary file
00020 # so it can be restored later
00021 mbed_settings = join('mbed_settings.py')
00022 backup = None
00023 if isfile(mbed_settings):
00024     backup = TemporaryFile()
00025     with open(mbed_settings, "rb") as f:
00026         copyfileobj(f, backup)
00027 
00028 # Create the correct mbed_settings.py for the distribution
00029 with open(mbed_settings, "wt") as f:
00030     f.write("from mbed_settings import *\n")
00031 
00032 setup(name='mbed-tools',
00033       version='0.1.14',
00034       description='Build and test system for mbed',
00035       long_description=DESCRIPTION,
00036       author=OWNER_NAMES,
00037       author_email=OWNER_EMAILS,
00038       maintainer=OWNER_NAMES,
00039       maintainer_email=OWNER_EMAILS,
00040       url='https://github.com/mbedmicro/mbed',
00041       packages=find_packages(),
00042       license=LICENSE,
00043       install_requires=["PrettyTable>=0.7.2", "PySerial>=2.7", "IntelHex>=1.3", "colorama>=0.3.3", "Jinja2>=2.7.3", "project-generator>=0.9.3,<0.10.0", "project-generator-definitions>=0.2.26,<0.3.0", "junit-xml", "requests", "pyYAML"])
00044 
00045 # Restore previous mbed_settings if needed
00046 if backup:
00047     backup.seek(0)
00048     with open(mbed_settings, "wb") as f:
00049         copyfileobj(backup, f)