forked from mavlink/MAVSDK-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
64 lines (50 loc) · 1.83 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
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from codecs import open
from os import path, getcwd
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 = path.join(getcwd(), filename)
# Check if file exists
if not 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()]
def parse_long_description():
"""
Helper function which parses the readme
:returns: Content of the Readme
"""
with open(path.join(getcwd(), "README.md"), encoding="utf-8") as f:
return f.read()
setup(
name="mavsdk",
version="0.1.0",
description="Python wrapper for MAVSDK",
long_description=parse_long_description(),
url="https://github.com/mavlink/MAVSDK-Python",
maintainer="Jonas Vautherin, Julian Oes",
maintainer_email="[email protected], [email protected]",
include_package_data=True,
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.6",
],
packages=find_packages(exclude=["other", "docs", "tests", "examples",
"proto"]),
install_requires=parse_requirements("requirements.txt"),
setup_requires=parse_requirements("requirements-dev.txt"),
project_urls={
"Bug Reports": "https://github.com/mavlink/MAVSDK-Python/issues",
"Source": "https://github.com/mavlink/MAVSDK-Python/",
},
)