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

vispy: init at 0.6.4 #79235

Merged
merged 4 commits into from Jul 21, 2020
Merged

vispy: init at 0.6.4 #79235

merged 4 commits into from Jul 21, 2020

Conversation

goertzenator
Copy link
Contributor

@goertzenator goertzenator commented Feb 4, 2020

Motivation for this change

Add python module for vispy (scientific plotting) and freetype-py (needed by vispy).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

})
];

buildInputs = [ setuptools_scm ];
Copy link
Member

Choose a reason for hiding this comment

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

nativeBuildInputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated as requested

];

buildInputs = [
cython setuptools setuptools_scm setuptools-scm-git-archive pyqt4
Copy link
Member

Choose a reason for hiding this comment

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

aside from pyqt4 the others likely belong in nativeBuildInputs. setuptools should not be here, unless it's needed at runtime in which case it should be in propagatedBuildInputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated as requested, setuptools and pyqt4 removed (pyqt4 was part of a failed effort to make tests work.)

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

mostly LGTM.

Can you add yourself as a maintainer of the packages?
Also, can you try to add unit tests (if possible). Don't need 100% of the test suite, they just help when bumping dependencies and ensure something doesn't break.

doCheck = false; # otherwise runs OSX code on linux.

meta = with lib; {
homepage = http://vispy.org/index.html;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
homepage = http://vispy.org/index.html;
homepage = "http://vispy.org/index.html";

propagatedBuildInputs = [ freetype ];

meta = with lib; {
homepage = https://github.com/rougier/freetype-py;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
homepage = https://github.com/rougier/freetype-py;
homepage = "https://github.com/rougier/freetype-py";

@aanderse
Copy link
Member

(triage) ping @goertzenator

@goertzenator
Copy link
Contributor Author

Thanks for reviewing, changes made as requested.

I ended up not using this package for my project so my interest in learning how to add unit tests is low. I did run vispy tests manually and there were lots of failures, but it did work for my brief experiment. I suspect the failures are more about the maturity of the project than interaction with nixpkgs.

@mjlbach
Copy link
Contributor

mjlbach commented May 7, 2020

I'm interested in getting this merged. Is this just blocked by tests?

@goertzenator
Copy link
Contributor Author

I don't know what is blocking it. I think it might be helpful if you tried this PR on your system and reported if it produced a working vispy or not.

@FRidh
Copy link
Member

FRidh commented May 7, 2020

Please avoid merging Nixpkgs branches and instead rebase.

@goertzenator
Copy link
Contributor Author

Apologies, I just hit buttons in the github UI to resolve a minor conflict. I didn't see any choices about how to manage it. I'll tidy this up on the command line.

That said, maybe some github settings need to be tweaked if those buttons are doing the wrong thing?

@goertzenator
Copy link
Contributor Author

All cleaned up. I looked at the settings on one of my repos and unfortunately did not see any controls for the "Resolve Conflicts" button.

@mjlbach
Copy link
Contributor

mjlbach commented May 7, 2020

Currently having a slight issue...

shell.nix

{ pkgs ? import <nixpkgs> {} }:
  pkgs.mkShell {
    buildInputs = [
      pkgs.python3Packages.vispy
      pkgs.python3Packages.pyqt5
  ];
}

error msg

WARNING: Could not find the Qt platform plugin "xcb" in ""
WARNING: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-org.kde.kwin.qpa.

Aborted (core dumped)

This is usually fixed by adding a wrapQtAppsHook https://nixos.wiki/wiki/Qt, I know vispy uses pyqt5 but not sure what's happening here.

@goertzenator
Copy link
Contributor Author

goertzenator commented May 7, 2020

Looking back at my shell.nix I note that I had pyqt4 instead of pyqt5.

@mjlbach
Copy link
Contributor

mjlbach commented May 7, 2020

@goertzenator Thanks! That seems to do it. strange, vispy should be compatible with PyQt5

@mjlbach
Copy link
Contributor

mjlbach commented May 7, 2020

Nevermind, I just tried again this morning and it seems to be working with PyQt5, i tried a dozen examples and they all seem to work. Thanks for the contribution!

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

I would prefer unit tests, but this should suffice

numpy freetype-py fontconfig libGL
];

doCheck = false; # otherwise runs OSX code on linux.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
doCheck = false; # otherwise runs OSX code on linux.
doCheck = false; # otherwise runs OSX code on linux.
pythonImportsCheck = [ "vispy" ];

nativeBuildInputs = [ setuptools_scm ];

propagatedBuildInputs = [ freetype ];

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pythonImportsCheck = [ "freetype" ];

Copy link
Member

@prusnak prusnak left a comment

Choose a reason for hiding this comment

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

Tested ACK

@prusnak
Copy link
Member

prusnak commented Jul 17, 2020

@jonringer every suggested change has been applied, can we have this merged?

@adisbladis adisbladis merged commit 1be9aa3 into NixOS:master Jul 21, 2020
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Jul 21, 2020
vispy: init at 0.6.4
(cherry picked from commit 1be9aa3)
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

7 participants