forked from gijzelaerr/python-snap7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
60 lines (51 loc) · 1.69 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
import os
from setuptools import setup, find_packages, Extension
__version__ = "1.2"
tests_require = ['pytest', 'pytest-asyncio', 'mypy', 'pycodestyle', 'types-setuptools']
extras_require = {
'test': tests_require,
'doc': ['sphinx', 'sphinx_rtd_theme'],
}
ext_modules = []
if os.environ.get('BUILD_WHEEL_WITH_EXTENSION'):
ext_modules = [
Extension(
"snap7.__dummy__",
["dummy.c"],
libraries=['snap7'],
include_dirs=['/usr/lib', '/usr/local/lib', 'src'],
),
]
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='python-snap7',
version=__version__,
description='Python wrapper for the snap7 library',
author='Gijs Molenaar',
author_email='[email protected]',
url='https://github.com/gijzelaerr/python-snap7',
packages=find_packages(),
package_data={'snap7': ['py.typed']},
license='MIT',
long_description=read('README.rst'),
scripts=['snap7/bin/snap7-server.py'],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Topic :: System :: Hardware",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
python_requires='>=3.7',
extras_require=extras_require,
tests_require=tests_require,
test_suite="tests",
ext_modules=ext_modules,
)