-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
78 lines (68 loc) · 2.36 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import os
from setuptools import setup, Extension, find_packages
package_name = "edsdk-python"
version = "0.1"
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
long_description = "\n" + f.read()
except FileNotFoundError:
long_description = ""
_DEBUG = True
_DEBUG_LEVEL = 0
extra_compile_args = []
if _DEBUG:
extra_compile_args += ["/W4", "/DDEBUG=%s" % _DEBUG_LEVEL]
else:
extra_compile_args += ["/DNDEBUG"]
EDSDK_PATH = "dependencies"
# EDSDK_PATH = "dependencies/EDSDK_13.13.41_Win/"
extension = Extension(
"edsdk.api",
libraries=["EDSDK"],
include_dirs=[os.path.join(EDSDK_PATH, "EDSDK/Header")],
library_dirs=[os.path.join(EDSDK_PATH, "EDSDK_64/Library")],
depends=["edsdk/edsdk_python.h", "edsdk/edsdk_utils.h"],
sources=["edsdk/edsdk_python.cpp","edsdk/edsdk_utils.cpp"],
extra_compile_args=extra_compile_args,
)
setup(
name=package_name,
version=version,
author="Francesco Leacche",
author_email="[email protected]",
url="https://github.com/jiloc/edsdk-python",
description="Python wrapper for Canon EDSKD Library",
long_description=long_description,
ext_modules = [extension],
install_requires=[
'pywin32 >= 228 ; platform_system=="Windows"'
],
setup_requires=["wheel"],
packages=find_packages(),
include_package_data=True,
package_data={
"edsdk": ["py.typed", "api.pyi"],
},
data_files = [("Lib/site-packages/edsdk", [
EDSDK_PATH + "/EDSDK_64/Dll/EDSDK.dll",
EDSDK_PATH + "/EDSDK_64/Dll/EdsImage.dll"])],
python_requires=">=3.8.0",
long_description_content_type="text/markdown",
classifiers=[
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Environment :: Win32 (MS Windows)",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: System :: Hardware :: Universal Serial Bus (USB)",
"Typing :: Stubs Only",
],
keywords=["edsdk", "canon"],
license="MIT",
)