-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
40 lines (34 loc) · 1.13 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
from setuptools import setup,Extension,find_packages
import os
import shutil
from Cython.Build import cythonize
from Cython.Distutils import build_ext
#package_dir = {
# 'pylibde265': './lib',
#}
def extension_sources(directory, suffix):
matches = []
for root, dirnames, filenames in os.walk(directory):
for filename in filenames:
if filename.endswith(suffix):
matches.append(os.path.join(root, filename))
#print(matches)
return matches
ext_modules = [
Extension("pylibde265.pyde265",
sources=['src/pylibde265/pyde265.pyx'],
include_dirs=['src/pylibde265/libde265'],
library_dirs=['src/pylibde265/lib'],
libraries=['de265'],
#language='c++',
#extra_compile_args=[''],
)
]
setup(
name='pylibde265',
ext_modules=cythonize(ext_modules),
packages=find_packages(include=['src/pylibde265','src/pylibde265.*']),
include_package_data=True,
zip_safe=False,
data_files=[('', ['src/pylibde265/lib/libde265.dll']),('Lib/site-packages/pylibde265',['typing/pyde265.pyi'])],
)