-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·45 lines (38 loc) · 1.35 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·45 lines (38 loc) · 1.35 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
37
38
39
40
41
42
43
44
45
#!/usr/local/bin/python
from setuptools import setup, find_packages
from setuptools.command.install import install
from batch_operation_tool import __version__ as version
import sys
v = sys.version_info
if v[0] != 3:
error = "ERROR: BatchOperationTool requires Python 3. " \
"For Python 2.7, download and install the Python 2 branch."
print(error)
sys.exit(1)
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
import batch_operation_tool.desktop_integration as di
di.add_start_menu_shortcut()
install.run(self)
setup(name = 'Batch operation tool',
version = version,
# scripts = [os.path.join('bin', 'myscript')],
packages = find_packages(exclude=['tests*']),
license = 'GPLv3',
long_description = open('README.md').read(),
install_requires = ['hyperspy >= 1.7',
'pint',
'qtpy',
'shortcutter',
'matplotlib_scalebar',
],
entry_points={
'gui_scripts': [
'BatchOperationToolUI=batch_operation_tool.__main__:main']},
cmdclass={
'install': PostInstallCommand,
},
package_data={'batch_operation_tool':
['*/*.json',]},
)