]>
git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/setup.py
2 This module defines the attributes of the
3 PyPI package for the Mbed SDK
6 from shutil
import copyfileobj
7 from os
. path
import isfile
, join
8 from tempfile
import TemporaryFile
9 from setuptools
import find_packages
10 from distutils
. core
import setup
12 LICENSE
= open ( 'LICENSE' ). read ()
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).
15 .. _mbed framework: http://mbed.org"""
16 OWNER_NAMES
= 'emilmont, bogdanm'
17 OWNER_EMAILS
= 'Emilio.Monti@arm.com, Bogdan.Marinescu@arm.com'
19 # If private_settings.py exists in workspace_tools, read it in a temporary file
20 # so it can be restored later
21 private_settings
= join ( 'workspace_tools' , 'private_settings.py' )
23 if isfile ( private_settings
):
24 backup
= TemporaryFile ()
25 with
open ( private_settings
, "rb" ) as f
:
26 copyfileobj ( f
, backup
)
28 # Create the correct private_settings.py for the distribution
29 with
open ( private_settings
, "wt" ) as f
:
30 f
. write ( "from mbed_settings import * \n " )
32 setup ( name
= 'mbed-tools' ,
34 description
= 'Build and test system for mbed' ,
35 long_description
= DESCRIPTION
,
37 author_email
= OWNER_EMAILS
,
38 maintainer
= OWNER_NAMES
,
39 maintainer_email
= OWNER_EMAILS
,
40 url
= 'https://github.com/mbedmicro/mbed' ,
41 packages
= find_packages (),
43 install_requires
=[ "PrettyTable>=0.7.2" , "PySerial>=2.7" , "IntelHex>=1.3" , "colorama>=0.3.3" , "Jinja2>=2.7.3" ])
45 # Restore previous private_settings if needed
48 with
open ( private_settings
, "wb" ) as f
:
49 copyfileobj ( backup
, f
)