]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/setup.py
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / setup.py
1 """
2 This module defines the attributes of the
3 PyPI package for the Mbed SDK
4 """
5
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
11
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).
14
15 .. _mbed framework: http://mbed.org"""
16 OWNER_NAMES = 'emilmont, bogdanm'
17 OWNER_EMAILS = 'Emilio.Monti@arm.com, Bogdan.Marinescu@arm.com'
18
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')
22 backup = None
23 if isfile(private_settings):
24 backup = TemporaryFile()
25 with open(private_settings, "rb") as f:
26 copyfileobj(f, backup)
27
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")
31
32 setup(name='mbed-tools',
33 version='0.1.14',
34 description='Build and test system for mbed',
35 long_description=DESCRIPTION,
36 author=OWNER_NAMES,
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(),
42 license=LICENSE,
43 install_requires=["PrettyTable>=0.7.2", "PySerial>=2.7", "IntelHex>=1.3", "colorama>=0.3.3", "Jinja2>=2.7.3"])
44
45 # Restore previous private_settings if needed
46 if backup:
47 backup.seek(0)
48 with open(private_settings, "wb") as f:
49 copyfileobj(backup, f)
Imprint / Impressum