andreped commited on
Commit
0cee8e2
1 Parent(s): 33f590f

added install argument to set which cupy version to install livermask with

Browse files
Files changed (1) hide show
  1. setup.py +11 -14
setup.py CHANGED
@@ -7,27 +7,24 @@ with open("README.md", "r") as f:
7
 
8
  with open('requirements.txt', 'r', encoding='utf-16') as ff:
9
  required = ff.read().splitlines()
10
-
11
- # install additional dependencies (CuPy)
12
- #required.append(cupy-cuda110==9.6.0)
13
-
14
 
15
  class InstallCommand(install):
16
  user_option = install.user_options 0 [
17
- ('gpu=', None, 'enable flag to install package with GPU support'),
18
  ]
19
 
20
- def initialize_options(self):
21
- install.initialize_options(self)
22
- self.gpu = False
23
 
24
- def finalize_options(self):
25
- print("value of gpu is ", self.gpu)
26
- install.finalize_options(self)
27
 
28
- def run(self):
29
- if (self.)
30
- install.run(self)
31
 
32
 
33
  setup(
 
7
 
8
  with open('requirements.txt', 'r', encoding='utf-16') as ff:
9
  required = ff.read().splitlines()
10
+
 
 
 
11
 
12
  class InstallCommand(install):
13
  user_option = install.user_options 0 [
14
+ ('cupy=', 'cupy', 'enable flag to install package with GPU support'),
15
  ]
16
 
17
+ def initialize_options(self):
18
+ install.initialize_options(self)
19
+ self.cupy = "cupy"
20
 
21
+ def finalize_options(self):
22
+ print("CuPY version selected is: ", self.cupy)
23
+ install.finalize_options(self)
24
 
25
+ def run(self):
26
+ required.append(self.cupy)
27
+ install.run(self)
28
 
29
 
30
  setup(