cura-build icon indicating copy to clipboard operation
cura-build copied to clipboard

WIP: setup.py: Windows: Trying to add Numpy and SciPy completely

Open thopiekar opened this issue 5 years ago • 8 comments

.. but without hooks.

thopiekar avatar Nov 15 '19 14:11 thopiekar

So we'd remove the def load_numpy declarations and such as well.

And we're not using the MKL versions any more? Seems to me that this was added for a reason.

Ghostkeeper avatar Dec 03 '19 15:12 Ghostkeeper

We are still using the MKL versions on Windows. I will create some builds with this change so we can test it.

LipuFei avatar Dec 04 '19 13:12 LipuFei

Hi @thopiekar , this PR fails to build Cura on Windows. I got the following error messages:

[ 97%] Completed 'fdm_materials'
[ 97%] Built target fdm_materials
Scanning dependencies of target projects
[ 97%] Built target projects
Scanning dependencies of target build_bundle
running cx_Freeze
running build_exe
Traceback (most recent call last):
  File "setup.py", line 195, in <module>
    executables = executables
  File "X:\env\master\inst\lib\site-packages\cx_Freeze\dist.py", line 349, in setup
    distutils.core.setup(**attrs)
  File "X:\env\master\inst\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "X:\env\master\inst\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "X:\env\master\inst\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "X:\env\master\inst\lib\site-packages\cx_Freeze\dist.py", line 219, in run
    freezer.Freeze()
  File "X:\env\master\inst\lib\site-packages\cx_Freeze\freezer.py", line 621, in Freeze
    self.finder = self._GetModuleFinder()
  File "X:\env\master\inst\lib\site-packages\cx_Freeze\freezer.py", line 340, in _GetModuleFinder
    finder.IncludePackage(name)
  File "X:\env\master\inst\lib\site-packages\cx_Freeze\finder.py", line 653, in IncludePackage
    module = self._ImportModule(name, deferredImports)
  File "X:\env\master\inst\lib\site-packages\cx_Freeze\finder.py", line 350, in _ImportModule
    raise ImportError("No module named %r" % name)
ImportError: No module named 'scipy'
CMakeFiles\build_bundle.dir\build.make:56: recipe for target 'build_bundle' failed
mingw32-make[2]: *** [build_bundle] Error 1
CMakeFiles\Makefile2:598: recipe for target 'CMakeFiles/build_bundle.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/build_bundle.dir/all] Error 2
Makefile:150: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
[SSH] exit-status: 2

LipuFei avatar Dec 06 '19 09:12 LipuFei

Well, it is marked as WIP after all :)

Ghostkeeper avatar Dec 06 '19 15:12 Ghostkeeper

Ok. I thought that the hooks were needed to create a minimal set of SciPy. Looks like they are needed to get SciPy packaged somehow. Also, other people are having issues with it: https://bitbucket.org/anthony_tuininga/cx_freeze/issues/43/import-errors-when-using-cx_freeze-with

thopiekar avatar Dec 16 '19 18:12 thopiekar

@thopiekar Are you still working on this?

LipuFei avatar Jan 10 '20 11:01 LipuFei

Nope, and I feel a bit lost with it. For me it seems that adding all the missing files needs to be done manually.

thopiekar avatar Jan 11 '20 15:01 thopiekar

Well, apparently if you don't do that it won't work...

LipuFei avatar Jan 11 '20 15:01 LipuFei