|
a |
|
b/setup.py |
|
|
1 |
from setuptools import setup |
|
|
2 |
from setuptools.command.install import install |
|
|
3 |
import subprocess |
|
|
4 |
import os |
|
|
5 |
PACKAGES=[ 'pandas==0.25.0', |
|
|
6 |
'numpy', |
|
|
7 |
'dask[dataframe]', |
|
|
8 |
'distributed', |
|
|
9 |
'nonechucks', |
|
|
10 |
'dask-image', |
|
|
11 |
'opencv-python', |
|
|
12 |
'scikit-learn', |
|
|
13 |
'scipy', |
|
|
14 |
'umap-learn', |
|
|
15 |
'pysnooper', |
|
|
16 |
'tifffile', |
|
|
17 |
'seaborn', |
|
|
18 |
'scikit-image', |
|
|
19 |
'openslide-python', |
|
|
20 |
'Shapely', |
|
|
21 |
'click==6.7', |
|
|
22 |
'torch', |
|
|
23 |
'torchvision', |
|
|
24 |
'albumentations', |
|
|
25 |
'GPUtil', |
|
|
26 |
'beautifulsoup4', |
|
|
27 |
'plotly', |
|
|
28 |
'xarray', |
|
|
29 |
'matplotlib', |
|
|
30 |
'networkx', |
|
|
31 |
'shap', |
|
|
32 |
'pyyaml', |
|
|
33 |
'torch-encoding', |
|
|
34 |
'xmltodict', |
|
|
35 |
#'lightnet', |
|
|
36 |
'brambox', |
|
|
37 |
'blosc', |
|
|
38 |
'numcodecs', |
|
|
39 |
'zarr', |
|
|
40 |
'pytorchcv', |
|
|
41 |
'h5py', |
|
|
42 |
'timm' |
|
|
43 |
] |
|
|
44 |
|
|
|
45 |
with open('README.md','r', encoding='utf-8') as f: |
|
|
46 |
long_description = f.read() |
|
|
47 |
|
|
|
48 |
class CustomInstallCommand(install): |
|
|
49 |
"""Custom install setup to help run shell commands (outside shell) before installation""" |
|
|
50 |
def run(self): |
|
|
51 |
#for package in PACKAGES: |
|
|
52 |
#os.system('pip install {}'.format(package))#install.do_egg_install(self) |
|
|
53 |
self.do_egg_install()#install.run(self) |
|
|
54 |
subprocess.call('rm -rf apex'.split()) |
|
|
55 |
os.system('git clone https://github.com/NVIDIA/apex') |
|
|
56 |
#try: |
|
|
57 |
#os.system('cd apex && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./') |
|
|
58 |
#except: |
|
|
59 |
os.system('echo pwd && cd apex && (pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ || pip install -v --no-cache-dir ./)') |
|
|
60 |
subprocess.call('rm -rf apex'.split()) |
|
|
61 |
|
|
|
62 |
setup(name='pathflowai', |
|
|
63 |
version='0.1.1', |
|
|
64 |
description='A modular approach for preprocessing and deep learning on histopathology images.', |
|
|
65 |
url='https://github.com/jlevy44/PathFlowAI', |
|
|
66 |
author='Joshua Levy', |
|
|
67 |
author_email='joshualevy44@berkeley.edu', |
|
|
68 |
license='MIT', |
|
|
69 |
scripts=['bin/install_apex', |
|
|
70 |
'bin/install_lightnet'], |
|
|
71 |
#cmdclass={'install': CustomInstallCommand}, |
|
|
72 |
entry_points={ |
|
|
73 |
'console_scripts':['pathflowai-preprocess=pathflowai.cli_preprocessing:preprocessing', |
|
|
74 |
'pathflowai-visualize=pathflowai.cli_visualizations:visualize', |
|
|
75 |
'pathflowai-monitor=pathflowai.monitor_memory_usage:monitor', |
|
|
76 |
'pathflowai-train_model=pathflowai.model_training:train'] |
|
|
77 |
}, |
|
|
78 |
long_description=long_description, |
|
|
79 |
long_description_content_type='text/markdown', |
|
|
80 |
packages=['pathflowai'], |
|
|
81 |
install_requires=PACKAGES) |