WORKS

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Committer:
cyberjoey
Date:
Sat Oct 22 01:31:58 2016 +0000
Revision:
9:6bb35cef007d
Parent:
1:55a6170b404f
WORKING

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nexpaq 1:55a6170b404f 1 """
nexpaq 1:55a6170b404f 2 This module defines the attributes of the
nexpaq 1:55a6170b404f 3 PyPI package for the Mbed SDK
nexpaq 1:55a6170b404f 4 """
nexpaq 1:55a6170b404f 5
nexpaq 1:55a6170b404f 6 from shutil import copyfileobj
nexpaq 1:55a6170b404f 7 from os.path import isfile, join
nexpaq 1:55a6170b404f 8 from tempfile import TemporaryFile
nexpaq 1:55a6170b404f 9 from setuptools import find_packages
nexpaq 1:55a6170b404f 10 from distutils.core import setup
nexpaq 1:55a6170b404f 11
nexpaq 1:55a6170b404f 12 LICENSE = open('LICENSE').read()
nexpaq 1:55a6170b404f 13 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).
nexpaq 1:55a6170b404f 14
nexpaq 1:55a6170b404f 15 .. _mbed framework: http://mbed.org"""
nexpaq 1:55a6170b404f 16 OWNER_NAMES = 'emilmont, bogdanm'
nexpaq 1:55a6170b404f 17 OWNER_EMAILS = 'Emilio.Monti@arm.com, Bogdan.Marinescu@arm.com'
nexpaq 1:55a6170b404f 18
nexpaq 1:55a6170b404f 19 # If mbed_settings.py exists in tools, read it in a temporary file
nexpaq 1:55a6170b404f 20 # so it can be restored later
nexpaq 1:55a6170b404f 21 mbed_settings = join('mbed_settings.py')
nexpaq 1:55a6170b404f 22 backup = None
nexpaq 1:55a6170b404f 23 if isfile(mbed_settings):
nexpaq 1:55a6170b404f 24 backup = TemporaryFile()
nexpaq 1:55a6170b404f 25 with open(mbed_settings, "rb") as f:
nexpaq 1:55a6170b404f 26 copyfileobj(f, backup)
nexpaq 1:55a6170b404f 27
nexpaq 1:55a6170b404f 28 # Create the correct mbed_settings.py for the distribution
nexpaq 1:55a6170b404f 29 with open(mbed_settings, "wt") as f:
nexpaq 1:55a6170b404f 30 f.write("from mbed_settings import *\n")
nexpaq 1:55a6170b404f 31
nexpaq 1:55a6170b404f 32 setup(name='mbed-tools',
nexpaq 1:55a6170b404f 33 version='0.1.14',
nexpaq 1:55a6170b404f 34 description='Build and test system for mbed',
nexpaq 1:55a6170b404f 35 long_description=DESCRIPTION,
nexpaq 1:55a6170b404f 36 author=OWNER_NAMES,
nexpaq 1:55a6170b404f 37 author_email=OWNER_EMAILS,
nexpaq 1:55a6170b404f 38 maintainer=OWNER_NAMES,
nexpaq 1:55a6170b404f 39 maintainer_email=OWNER_EMAILS,
nexpaq 1:55a6170b404f 40 url='https://github.com/mbedmicro/mbed',
nexpaq 1:55a6170b404f 41 packages=find_packages(),
nexpaq 1:55a6170b404f 42 license=LICENSE,
nexpaq 1:55a6170b404f 43 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"])
nexpaq 1:55a6170b404f 44
nexpaq 1:55a6170b404f 45 # Restore previous mbed_settings if needed
nexpaq 1:55a6170b404f 46 if backup:
nexpaq 1:55a6170b404f 47 backup.seek(0)
nexpaq 1:55a6170b404f 48 with open(mbed_settings, "wb") as f:
nexpaq 1:55a6170b404f 49 copyfileobj(backup, f)