forked from tianocore/edk2-pytool-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
90 lines (81 loc) · 2.81 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
## @file setup.py
# This contains setup info for edk2-pytool-extensions pip module
#
##
# Copyright (c) Microsoft Corporation
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import setuptools
from setuptools.command.sdist import sdist
from setuptools.command.install import install
from setuptools.command.develop import develop
from edk2toolext.bin.nuget import DownloadNuget
with open("readme.md", "r") as fh:
long_description = fh.read()
class PostSdistCommand(sdist):
"""Post-sdist."""
def run(self):
# we need to download nuget so throw the exception if we don't get it
DownloadNuget()
sdist.run(self)
class PostInstallCommand(install):
"""Post-install."""
def run(self):
try:
DownloadNuget()
except:
pass
install.run(self)
class PostDevCommand(develop):
"""Post-develop."""
def run(self):
try:
DownloadNuget()
except:
pass
develop.run(self)
setuptools.setup(
name="edk2-pytool-extensions",
author="Tianocore Edk2-PyTool-Extensions team",
author_email="[email protected]",
description="Python tools supporting UEFI EDK2 firmware development",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/tianocore/edk2-pytool-extensions",
license='BSD-2-Clause-Patent',
packages=setuptools.find_packages(),
use_scm_version=True,
setup_requires=['setuptools_scm'],
cmdclass={
'sdist': PostSdistCommand,
'install': PostInstallCommand,
'develop': PostDevCommand,
},
include_package_data=True,
entry_points={
'console_scripts': ['stuart_setup=edk2toolext.invocables.edk2_setup:main',
'stuart_update=edk2toolext.invocables.edk2_update:main',
'stuart_build=edk2toolext.invocables.edk2_platform_build:main',
'stuart_ci_build=edk2toolext.invocables.edk2_ci_build:main',
'stuart_ci_setup=edk2toolext.invocables.edk2_ci_setup:main',
'stuart_pr_eval=edk2toolext.invocables.edk2_pr_eval:main',
'omnicache=edk2toolext.omnicache:main',
'nuget-publish=edk2toolext.nuget_publishing:go',
'edk2_capsule_tool=edk2toolext.capsule.capsule_tool:main']
},
install_requires=[
'pyyaml>=5.2',
'edk2-pytool-library>=0.10.3'
],
extras_require={
'openssl': ['pyopenssl']
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers"
]
)