-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
36 lines (33 loc) · 1.15 KB
/
Copy pathsetup.py
File metadata and controls
36 lines (33 loc) · 1.15 KB
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
#!/usr/bin/env python3
from distutils.core import setup, Extension
import platform
import os
target_os = platform.system()
root = os.path.dirname(os.path.abspath(__file__))
src = os.path.join(root, "src")
sources = []
for root, dirs, files in os.walk(src):
for file in files:
if file.endswith(".c"):
sources.append(os.path.join(root, file))
includes = ["/usr/local/include",
"/usr/local/include/freerdp2",
"/usr/local/include/winpr2",
"/usr/include/freerdp2",
"/usr/include/winpr2",
"/opt/homebrew/opt/freerdp/include/freerdp2",
"/opt/homebrew/opt/freerdp/include/winpr2"]
libs = ["/usr/local/lib", "/usr/lib", "/usr/lib64/"]
modulel = Extension("pyrdping", sources=sources,
define_macros=[("TARGET_OS_WATCH", target_os),
("TARGET_OS_IPHONE", '0'), ],
libraries=['freerdp2'],
include_dirs=includes,
library_dirs=libs, )
setup(
name="pyrdping",
author="JumpServer",
author_email="code@jumpserver.org",
version="0.0.2",
ext_modules=[modulel]
)