Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mnemosyne: 2.3.2 -> 2.6 #32799

Merged
merged 1 commit into from Feb 14, 2018
Merged

mnemosyne: 2.3.2 -> 2.6 #32799

merged 1 commit into from Feb 14, 2018

Conversation

dotlambda
Copy link
Member

Motivation for this change

Mnemosyne was broken previously, because tests failed during install.
I updated it, but still something goes very wrong in the checkPhase if I don't disable checks:

running build_ext
Traceback (most recent call last):
  File "nix_run_setup.py", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 178, in <module>
    app = py2app_app
  File "/nix/store/vyn106wj077zhv3n7w9c0nwjwq3xja0z-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/nix/store/vyn106wj077zhv3n7w9c0nwjwq3xja0z-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/test.py", line 226, in run
    self.run_tests()
  File "/nix/store/vyn106wj077zhv3n7w9c0nwjwq3xja0z-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/test.py", line 248, in run_tests
    exit=False,
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/unittest/main.py", line 118, in parseArgs
    self._do_discovery(argv[2:])
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/unittest/main.py", line 229, in _do_discovery
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/unittest/loader.py", line 341, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/unittest/loader.py", line 398, in _find_tests
    full_path, pattern, namespace)
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/unittest/loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/nix/store/vyn106wj077zhv3n7w9c0nwjwq3xja0z-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/test.py", line 52, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/nix/store/vyn106wj077zhv3n7w9c0nwjwq3xja0z-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/test.py", line 52, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/nrv3zzw9a42vax72gaif8bjgxgnv9iy1-python3-3.6.3/lib/python3.6/unittest/loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "/tmp/nix-build-mnemosyne-2.6.drv-0/Mnemosyne-2.6/mnemosyne/pyqt_ui/configuration_wdgt_main.py", line 18, in <module>
    Ui_ConfigurationWdgtMain):
  File "/tmp/nix-build-mnemosyne-2.6.drv-0/Mnemosyne-2.6/mnemosyne/pyqt_ui/configuration_wdgt_main.py", line 20, in ConfigurationWdgtMain
    name = _("General")
TypeError: 'NoneType' object is not callable

At least, I'm now able to run the program.
Nevertheless, there also seem to be errors within the program. For example, when starting a server and accessing it via web browser (http://localhost:8513/), some error with a NoneType occurs.
I sadly don't have the time to look into these and I've also never made contact with PyQt.

/cc @lverns @domenkozar @peti

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@dotlambda dotlambda force-pushed the mnemosyne branch 2 times, most recently from d4c089d to 3601331 Compare December 18, 2017 14:13
@grahamc
Copy link
Member

grahamc commented Dec 19, 2017

@GrahamcOfBorg eval

@dotlambda
Copy link
Member Author

dotlambda commented Jan 26, 2018

Is anybody able to run Mnemosyne from the unstable channel?

@dotlambda
Copy link
Member Author

The alternative would be to mark mnemosyne as broken and wait until someone who really needs it comes by. Does this fit you better @FRidh?

@FRidh
Copy link
Member

FRidh commented Feb 7, 2018

Often specifying

checkPhase = ''
  ${python.interpreter} -m unittest discover -s <testsdir>
'';

helps with errors like these.

@FRidh
Copy link
Member

FRidh commented Feb 7, 2018

However, if you say the error also occurs during runtime...

You can indeed mark it has broken. Let someone who wants this step up and fix it.

@dotlambda
Copy link
Member Author

I think I didn't express myself very well :)

The current status in master is: Mnemosyne builds fine but doesn't run, at least for me:

An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/nix/store/jh87lab7xyxry771ja996sps7j6glwxj-mnemosyne-2.3.2/bin/.mnemosyne-wrapped", line 192, in <module>
    debug_file=options.debug_file)
  File "/nix/store/jh87lab7xyxry771ja996sps7j6glwxj-mnemosyne-2.3.2/lib/python2.7/site-packages/mnemosyne/libmnemosyne/__init__.py", line 174, in initialise
    self.register_components()
  File "/nix/store/jh87lab7xyxry771ja996sps7j6glwxj-mnemosyne-2.3.2/lib/python2.7/site-packages/mnemosyne/libmnemosyne/__init__.py", line 244, in register_components
    exec("from %s import %s" % (module_name, class_name))
  File "<string>", line 1, in <module>
  File "/nix/store/jh87lab7xyxry771ja996sps7j6glwxj-mnemosyne-2.3.2/lib/python2.7/site-packages/mnemosyne/pyqt_ui/qt_web_server.py", line 13, in <module>
    from mnemosyne.web_server.web_server import WebServer
  File "/nix/store/jh87lab7xyxry771ja996sps7j6glwxj-mnemosyne-2.3.2/lib/python2.7/site-packages/mnemosyne/web_server/web_server.py", line 16, in <module>
    from cherrypy import wsgiserver
 ImportError: cannot import name wsgiserver

Regarding this PR: Mnemosyne does build AND run. I however wasn't able to make the tests run.

I had another look at the tests and I think we won't be able to enable them:

  1. They are not distributed in the tarball.
  2. GitHub doesn't provide version tags.
  3. GitHub is missing locales etc.
    So, we can't use GitHub and therfore we need to diable the tests.

My proposal would be merge this one, since it IS in a working state and I don't see any problem with the disabled tests.

@GrahamcOfBorg build mnemosyne

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Installing collected packages: Mnemosyne
Successfully installed Mnemosyne-2.6
/tmp/nix-build-mnemosyne-2.6.drv-0/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6/lib  /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6/bin 
patching script interpreter paths in /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6
checking for references to /tmp/nix-build-mnemosyne-2.6.drv-0 in /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6...
wrapping `/nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6/bin/mnemosyne'...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

Successfully installed Mnemosyne-2.6
/build/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/256v1lwij2fyiv8lbd7a4g8yzcl6z7cl-mnemosyne-2.6
strip is /nix/store/xmpjypwjmp2qi1chs5kr0hacnh161ls4-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/256v1lwij2fyiv8lbd7a4g8yzcl6z7cl-mnemosyne-2.6/lib  /nix/store/256v1lwij2fyiv8lbd7a4g8yzcl6z7cl-mnemosyne-2.6/bin
patching script interpreter paths in /nix/store/256v1lwij2fyiv8lbd7a4g8yzcl6z7cl-mnemosyne-2.6
checking for references to /build in /nix/store/256v1lwij2fyiv8lbd7a4g8yzcl6z7cl-mnemosyne-2.6...
wrapping `/nix/store/256v1lwij2fyiv8lbd7a4g8yzcl6z7cl-mnemosyne-2.6/bin/mnemosyne'...
/nix/store/256v1lwij2fyiv8lbd7a4g8yzcl6z7cl-mnemosyne-2.6

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

/nix/store/256v1lwij2fyiv8lbd7a4g8yzcl6z7cl-mnemosyne-2.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Installing collected packages: Mnemosyne
Successfully installed Mnemosyne-2.6
/tmp/nix-build-mnemosyne-2.6.drv-0/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6/lib  /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6/bin 
patching script interpreter paths in /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6
checking for references to /tmp/nix-build-mnemosyne-2.6.drv-0 in /nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6...
wrapping `/nix/store/qaijf5q79k77kldjk2nwcp5chddgna35-mnemosyne-2.6/bin/mnemosyne'...

@dotlambda
Copy link
Member Author

ping @FRidh

src = fetchurl {
url = "http://sourceforge.net/projects/mnemosyne-proj/files/mnemosyne/${name}/Mnemosyne-${version}.tar.gz";
sha256 = "0jkrw45i4v24p6xyq94z7rz5948h7f5dspgs5mcdaslnlp2accfp";
url = "http://sourceforge.net/projects/mnemosyne-proj/files/mnemosyne/${pname}-${version}/Mnemosyne-${version}.tar.gz";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use mirror://sourceforge?

@@ -18489,7 +18489,9 @@ with pkgs;
libpng = libpng12;
};

mnemosyne = callPackage ../games/mnemosyne { };
mnemosyne = libsForQt5.callPackage ../games/mnemosyne {
inherit (python3Packages) buildPythonApplication pyqt5 matplotlib cherrypy cheroot webob pillow;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't make these kind of changes. They can only cause more work when there are incompatible versions.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Installing collected packages: Mnemosyne
Successfully installed Mnemosyne-2.6
/tmp/nix-build-mnemosyne-2.6.drv-0/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/f20hl2civx3z7sz8v9hix9hphqyzlagf-mnemosyne-2.6
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/f20hl2civx3z7sz8v9hix9hphqyzlagf-mnemosyne-2.6/lib  /nix/store/f20hl2civx3z7sz8v9hix9hphqyzlagf-mnemosyne-2.6/bin 
patching script interpreter paths in /nix/store/f20hl2civx3z7sz8v9hix9hphqyzlagf-mnemosyne-2.6
checking for references to /tmp/nix-build-mnemosyne-2.6.drv-0 in /nix/store/f20hl2civx3z7sz8v9hix9hphqyzlagf-mnemosyne-2.6...
wrapping `/nix/store/f20hl2civx3z7sz8v9hix9hphqyzlagf-mnemosyne-2.6/bin/mnemosyne'...

postInstall = ''
mkdir -p $out/share
mv $out/lib/python2.7/site-packages/$out/share/locale $out/share
rm -r $out/lib/python2.7/site-packages/nix
mv $out/lib/python*/site-packages/$out/share/locale $out/share
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${python.sitePackages}

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

Successfully installed Mnemosyne-2.6
/build/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/gm7rjvrn8qmqfaz07yqhsv4025v6k0zf-mnemosyne-2.6
strip is /nix/store/xmpjypwjmp2qi1chs5kr0hacnh161ls4-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/gm7rjvrn8qmqfaz07yqhsv4025v6k0zf-mnemosyne-2.6/lib  /nix/store/gm7rjvrn8qmqfaz07yqhsv4025v6k0zf-mnemosyne-2.6/bin
patching script interpreter paths in /nix/store/gm7rjvrn8qmqfaz07yqhsv4025v6k0zf-mnemosyne-2.6
checking for references to /build in /nix/store/gm7rjvrn8qmqfaz07yqhsv4025v6k0zf-mnemosyne-2.6...
wrapping `/nix/store/gm7rjvrn8qmqfaz07yqhsv4025v6k0zf-mnemosyne-2.6/bin/mnemosyne'...
/nix/store/gm7rjvrn8qmqfaz07yqhsv4025v6k0zf-mnemosyne-2.6

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

Successfully installed Mnemosyne-2.6
/build/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pgrdkqsh1hha6yvmxas66ffmks2ib13j-mnemosyne-2.6
strip is /nix/store/xmpjypwjmp2qi1chs5kr0hacnh161ls4-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/pgrdkqsh1hha6yvmxas66ffmks2ib13j-mnemosyne-2.6/lib  /nix/store/pgrdkqsh1hha6yvmxas66ffmks2ib13j-mnemosyne-2.6/bin
patching script interpreter paths in /nix/store/pgrdkqsh1hha6yvmxas66ffmks2ib13j-mnemosyne-2.6
checking for references to /build in /nix/store/pgrdkqsh1hha6yvmxas66ffmks2ib13j-mnemosyne-2.6...
wrapping `/nix/store/pgrdkqsh1hha6yvmxas66ffmks2ib13j-mnemosyne-2.6/bin/mnemosyne'...
/nix/store/pgrdkqsh1hha6yvmxas66ffmks2ib13j-mnemosyne-2.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Installing collected packages: Mnemosyne
Successfully installed Mnemosyne-2.6
/build/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/0yv0r927y86p86n76l4pkrdyd24ds5k6-mnemosyne-2.6
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/0yv0r927y86p86n76l4pkrdyd24ds5k6-mnemosyne-2.6/lib  /nix/store/0yv0r927y86p86n76l4pkrdyd24ds5k6-mnemosyne-2.6/bin
patching script interpreter paths in /nix/store/0yv0r927y86p86n76l4pkrdyd24ds5k6-mnemosyne-2.6
checking for references to /build in /nix/store/0yv0r927y86p86n76l4pkrdyd24ds5k6-mnemosyne-2.6...
wrapping `/nix/store/0yv0r927y86p86n76l4pkrdyd24ds5k6-mnemosyne-2.6/bin/mnemosyne'...

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Installing collected packages: Mnemosyne
Successfully installed Mnemosyne-2.6
/tmp/nix-build-mnemosyne-2.6.drv-0/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/d5d8jhyr70n4ikyzb8rm19k9h7hd38x5-mnemosyne-2.6
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/d5d8jhyr70n4ikyzb8rm19k9h7hd38x5-mnemosyne-2.6/lib  /nix/store/d5d8jhyr70n4ikyzb8rm19k9h7hd38x5-mnemosyne-2.6/bin 
patching script interpreter paths in /nix/store/d5d8jhyr70n4ikyzb8rm19k9h7hd38x5-mnemosyne-2.6
checking for references to /tmp/nix-build-mnemosyne-2.6.drv-0 in /nix/store/d5d8jhyr70n4ikyzb8rm19k9h7hd38x5-mnemosyne-2.6...
wrapping `/nix/store/d5d8jhyr70n4ikyzb8rm19k9h7hd38x5-mnemosyne-2.6/bin/mnemosyne'...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

Successfully installed Mnemosyne-2.6
/build/Mnemosyne-2.6
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/lf3an830516188bz76ag634bbfj3ragq-mnemosyne-2.6
strip is /nix/store/xmpjypwjmp2qi1chs5kr0hacnh161ls4-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/lf3an830516188bz76ag634bbfj3ragq-mnemosyne-2.6/lib  /nix/store/lf3an830516188bz76ag634bbfj3ragq-mnemosyne-2.6/bin
patching script interpreter paths in /nix/store/lf3an830516188bz76ag634bbfj3ragq-mnemosyne-2.6
checking for references to /build in /nix/store/lf3an830516188bz76ag634bbfj3ragq-mnemosyne-2.6...
wrapping `/nix/store/lf3an830516188bz76ag634bbfj3ragq-mnemosyne-2.6/bin/mnemosyne'...
/nix/store/lf3an830516188bz76ag634bbfj3ragq-mnemosyne-2.6

@dotlambda
Copy link
Member Author

ping

@FRidh FRidh merged commit 9b9eeb5 into NixOS:master Feb 14, 2018
@dotlambda dotlambda deleted the mnemosyne branch February 14, 2018 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants