-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
34 lines (30 loc) · 1.03 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
"Handle the processing of cython code and the installation of madgwick."
try:
import numpy as np
from Cython.Build import cythonize
except (ImportError, ModuleNotFoundError):
raise ModuleNotFoundError(
"Cython and numpy are required for performing the installation.\n"
"Please run:\n"
" `$ pip install numpy Cython`\n"
"or\n"
" `pip install -r requirements.txt`\n"
"before running the installation pipeline."
)
import os
from distutils.core import setup
def read(fname):
"Read a file in the current directory."
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="madgwick",
author="Romain Fayat",
version="0.1",
author_email="r.fayat@gmail.com",
description="Cython implementation of the Madgwick filter.",
ext_modules=cythonize("madgwick/madgwick_cython.pyx"),
include_dirs=[np.get_include()],
install_requires=["numpy", "Cython", "ahrs"],
packages=["madgwick"],
long_description=read('README.md')
)