Browse Source

Windows tweaks

HEAD
John Daily 7 years ago
parent
commit
ee041ed79e
2 changed files with 7 additions and 31 deletions
  1. 2
    2
      akvo/tressel/filtfilt.py
  2. 5
    29
      setup.py

+ 2
- 2
akvo/tressel/filtfilt.py View File

35
     edge=ntaps*3
35
     edge=ntaps*3
36
 
36
 
37
     if x.ndim != 1:
37
     if x.ndim != 1:
38
-        raise ValueError, "Filiflit is only accepting 1 dimension arrays."
38
+        raise ValueError("Filiflit is only accepting 1 dimension arrays.")
39
 
39
 
40
     #x must be bigger than edge
40
     #x must be bigger than edge
41
     if x.size < edge:
41
     if x.size < edge:
42
-        raise ValueError, "Input vector needs to be bigger than 3 * max(len(a),len(b)."
42
+        raise ValueError("Input vector needs to be bigger than 3 * max(len(a),len(b).")
43
 
43
 
44
     if len(a) < ntaps:
44
     if len(a) < ntaps:
45
         a=r_[a,zeros(len(b)-len(a))]
45
         a=r_[a,zeros(len(b)-len(a))]

+ 5
- 29
setup.py View File

1
 #!/usr/bin/env python
1
 #!/usr/bin/env python
2
-import sys
3
 
2
 
4
-# optionally use qt4
5
-# if sys.argv[1] == "build_ui":
6
-try:
7
-    from pyqt_distutils.build_ui import build_ui
8
-#         cmdclass = {'build_ui': build_ui}
9
-except ImportError:
10
-    build_ui = None  # user won't have pyqt_distutils when deploying
11
-#         cmdclass = {}
12
-# else:
13
-#     build_ui = None  # user won't have pyqt_distutils when deploying
14
-#     cmdclass = {}
15
-
16
-
17
-# Require PyQt5 and compiltion of GUI files via pyuic 
3
+# Requires PyQt5 and compiltion of GUI files via pyuic 
18
 from setuptools import setup, Extension
4
 from setuptools import setup, Extension
19
 from setuptools.command.build_py import build_py
5
 from setuptools.command.build_py import build_py
20
-#from pyqt_distutils.build_ui import build_ui
6
+from pyqt_distutils.build_ui import build_ui
21
 
7
 
22
 class custom_build_py(build_py):
8
 class custom_build_py(build_py):
23
     def run(self):
9
     def run(self):
24
         self.run_command('build_ui')
10
         self.run_command('build_ui')
25
         build_py.run(self)
11
         build_py.run(self)
26
 
12
 
27
-try:
28
-    from Cython.Build import cythonize as cythonise
29
-except ImportError:
30
-    def cythonise(*args, **kwargs):
31
-        #from Cython.Build import cythonize
32
-        #return cythonize(*args, **kwargs)
33
-        return 
34
-
35
-#from distutils.core import setup
36
-
37
 setup(name='Akvo',
13
 setup(name='Akvo',
38
       version='1.0.5',
14
       version='1.0.5',
39
       description='Surface nuclear magnetic resonance workbench',
15
       description='Surface nuclear magnetic resonance workbench',
43
       #setup_requires=['PyQt5'],
19
       #setup_requires=['PyQt5'],
44
       setup_requires=[
20
       setup_requires=[
45
         # Setuptools 18.0 properly handles Cython extensions.
21
         # Setuptools 18.0 properly handles Cython extensions.
46
-        'PyQt5', 'pyqt_distutils','setuptools>=18.0',
22
+        #'PyQt', 
23
+        'pyqt_distutils','setuptools>=18.0',
47
       ],
24
       ],
48
 #      ext_modules = cythonise("akvo/tressel/*.pyx"), 
25
 #      ext_modules = cythonise("akvo/tressel/*.pyx"), 
49
 #      build_requires=['cython'],
26
 #      build_requires=['cython'],
53
           'matplotlib',
30
           'matplotlib',
54
           'scipy',
31
           'scipy',
55
           'numpy',
32
           'numpy',
56
-          'PyQt5',
33
+#          'PyQt5',
57
           'pyyaml',
34
           'pyyaml',
58
           'pyqt-distutils',
35
           'pyqt-distutils',
59
           'cmocean'
36
           'cmocean'
70
           'build_ui': build_ui,
47
           'build_ui': build_ui,
71
           'build_py': custom_build_py,
48
           'build_py': custom_build_py,
72
       },
49
       },
73
-      #cmdclass=cmdclass,
74
       # Mechanism to include auxiliary files
50
       # Mechanism to include auxiliary files
75
       include_package_data=True,
51
       include_package_data=True,
76
       package_data={
52
       package_data={

Loading…
Cancel
Save