-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathsetup.py
50 lines (41 loc) · 1.38 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
import os
import subprocess
import sys
from distutils.command.build import build
from distutils.spawn import find_executable
from setuptools import setup
def parse_requirements(filename):
"""
Helper which parses requirement_?.*.txt files
:param filename: relative path, e.g. `./requirements.txt`
:returns: List of requirements
"""
# Get absolute filepath
filepath = os.path.join(os.getcwd(), filename)
# Check if file exists
if not os.path.exists(filepath):
print("[!] File {} not found".format(filename))
return []
# Parse install requirements
with open(filepath, encoding="utf-8") as f:
return [requires.strip() for requires in f.readlines()]
setup(
name="protoc-gen-mavsdk",
version="1.1.1",
description="Protoc plugin used to generate MAVSDK bindings",
url="https://github.com/mavlink/MAVSDK-Proto",
maintainer="Jonas Vautherin, Julian Oes",
maintainer_email="[email protected], [email protected]",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
],
packages=["protoc_gen_mavsdk"],
install_requires=parse_requirements("requirements.txt"),
entry_points={
"console_scripts": [
"protoc-gen-mavsdk= protoc_gen_mavsdk.__main__:main"
]
}
)