forked from PyMoDAQ/pymodaq_plugins_keysight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
51 lines (41 loc) · 1.75 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
from setuptools import setup, find_packages
import toml
config = toml.load('./plugin_info.toml')
SHORT_PLUGIN_NAME = config['plugin-info']['SHORT_PLUGIN_NAME']
PLUGIN_NAME = f"pymodaq_plugins_{SHORT_PLUGIN_NAME}"
from pathlib import Path
if not SHORT_PLUGIN_NAME.isidentifier():
raise ValueError("'SHORT_PLUGIN_NAME = %s' is not a valid python identifier." % SHORT_PLUGIN_NAME)
with open(str(Path(__file__).parent.joinpath(f'src/{PLUGIN_NAME}/VERSION')), 'r') as fvers:
version = fvers.read().strip()
with open('README.rst') as fd:
long_description = fd.read()
setupOpts = dict(
name=PLUGIN_NAME,
description=config['plugin-info']['description'],
long_description=long_description,
license=config['plugin-info']['license'],
url=config['plugin-info']['package-url'],
author=config['plugin-info']['author'],
author_email=config['plugin-info']['author-email'],
classifiers=[
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable",
"Environment :: Other Environment",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Human Machine Interfaces",
"Topic :: Scientific/Engineering :: Visualization",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: User Interfaces",
], )
setup(
version=version,
packages=find_packages(where='./src'),
package_dir={'': 'src'},
include_package_data=True,
entry_points={'pymodaq.plugins': f'{SHORT_PLUGIN_NAME} = {PLUGIN_NAME}'},
install_requires=['toml', ]+config['plugin-install']['packages-required'],
**setupOpts
)