-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
72 lines (61 loc) · 2.3 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
from setuptools.command import build_ext
from setuptools import setup
import os
import io
from setuptools.command.install import install
import shutil
long_description = io.open("README.md", encoding="utf-8").read()
def copyfiles(src, dst):
if os.path.isdir(src):
filelist = os.listdir(src)
for file in filelist:
libpath = os.path.join(src, file)
shutil.copy2(libpath, dst)
else:
shutil.copy2(src, dst)
class CustomBuildExt(build_ext.build_ext):
def run(self):
build_ext.build_ext.run(self)
class CustomBuildExtDev(build_ext.build_ext):
def run(self):
build_ext.build_ext.run(self)
class CustomInstall(install):
def run(self):
install.run(self)
setup(name='twain-wia-sane-scanner',
version='1.0.0',
description='A Python package for digitizing documents from TWAIN, WIA, SANE, ICA and eSCL compatible scanners.',
long_description=long_description,
long_description_content_type="text/markdown",
author='yushulx',
url='https://github.com/yushulx/twain-wia-sane-scanner',
license='MIT',
packages=['dynamsoftservice'],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
],
install_requires=['requests'],
cmdclass={
'install': CustomInstall,
'build_ext': CustomBuildExt,
'develop': CustomBuildExtDev},
)