-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
40 lines (32 loc) · 1.08 KB
/
setup.py
File metadata and controls
40 lines (32 loc) · 1.08 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
#!/usr/bin/env python
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
def install_pyme_plugin():
import sys
import subprocess
import os
plugin_install_path = os.path.join(os.path.dirname(__file__),
'pyme_omero', 'install_plugin.py')
subprocess.Popen('"%s" "%s"' % (sys.executable, plugin_install_path),
shell=True)
class DevelopModuleAndInstallPlugin(develop):
"""Post-installation for development mode."""
def run(self):
develop.run(self)
install_pyme_plugin()
class InstallModuleAndInstallPlugin(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
install_pyme_plugin()
setup(
name='pyme_omero',
version='20.09.10',
description='pyme-omero interoperability',
packages=find_packages(),
cmdclass={
'develop': DevelopModuleAndInstallPlugin,
'install': InstallModuleAndInstallPlugin,
},
)