File size: 1,870 Bytes
846011c
33f590f
98c3e5f
 
 
fb2ed23
33f590f
faf3b5a
693891f
ac935be
faf3b5a
acc7ac7
2abae3a
5129798
33f590f
 
5129798
98c3e5f
33f590f
 
0cee8e2
98c3e5f
0cee8e2
33f590f
0cee8e2
98c3e5f
 
33f590f
b44b8e4
98c3e5f
b44b8e4
0cee8e2
98c3e5f
 
33f590f
 
 
faf3b5a
e65e88c
4a775c0
ac935be
 
faf3b5a
 
 
 
0b72594
 
 
 
 
 
faf3b5a
 
dacb584
faf3b5a
 
2abae3a
faf3b5a
a844dc3
 
 
 
faf3b5a
 
 
 
0b72594
 
 
faf3b5a
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
61
62
63
64
65
66
67
68
69
70
71
72
from setuptools import setup, find_packages
from setuptools.command.install import install
import os, sys


print("\n\n\n\n---:", sys.argv)


with open("README.md", "r") as f:
    long_description = f.read()

with open('requirements.txt', 'r', encoding='utf-16') as ff:
    required = ff.read().splitlines()


class InstallCommand(install):
    user_option = install.user_options + [
        ('cupyyy=', None, 'enable flag to install package with GPU support'),
    ]

    def initialize_options(self):
        super().initialize_options()
        self.cupy = "cupy"

    def finalize_options(self):
        print("CuPy version selected is: ", self.cupyyy)
        super().finalize_options()

    def run(self):
        # use options
        global cupy
        required.append(self.cupy)

        super().run()


setup(
     name='livermask',  
     version='1.2.0',
     author="André Pedersen",
     author_email="andrped94@gmail.com",
     license='MIT',
     description="A package for automatic segmentation of liver from CT data",
     long_description=long_description,
     long_description_content_type="text/markdown",
     url="https://github.com/andreped/livermask",
     packages=find_packages(
        include=[
            'livermask', 
            'livermask.utils',
        ]
    ),
     entry_points={
        'console_scripts': [
            'livermask = livermask.livermask:main',
        ]
     },
     install_requires=required,
     classifiers=[
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
         "License :: OSI Approved :: MIT License",
         "Operating System :: OS Independent",
     ],
     python_requires='>=3.6',
     cmdclass={
        'install': InstallCommand,
     },
 )