-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
45 lines (40 loc) · 1.34 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
#from distutils.core import setup, Extension
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
import subprocess
with open("README.md", "r") as fh:
long_description = fh.read()
backend = Extension('multicam.backend',
define_macros = [('HAVE_JPEG',), ('NPY_NO_DEPRECATED_API','NPY_1_7_API_VERSION')],
include_dirs = ['libyuv/include'],
libraries = [':libyuv.a', ':libjpeg.so.8', 'stdc++'],
library_dirs = ['libyuv/out'],
sources = ['src/multicam.c', 'src/v4l2.c'],
extra_compile_args = [],
extra_link_args = [],
)
class Buildlibyuv(build_ext):
def run(self):
subprocess.call("./build_libyuv.sh")
build_ext.run(self)
setup(
name='multicam',
version='1.0.4',
ext_modules=[backend],
packages=find_packages(),
install_requires=[
'numpy',
],
author="Søren Rasmussen",
author_email="[email protected]",
description="Syncronous reading from multiple webcams",
long_description=long_description,
long_description_content_type="text/markdown",
cmdclass={'build_ext': Buildlibyuv},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux"
],
python_requires='>=3.6'
)