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.
@goertzenator goertzenator requested review from FRidh and jonringer as code owners Feb 4, 2020
@ofborg ofborg bot added the 6.topic: python label Feb 4, 2020
})
];

buildInputs = [ setuptools_scm ];

This comment has been minimized.

@FRidh

FRidh Feb 4, 2020
Member

nativeBuildInputs

This comment has been minimized.

@goertzenator

goertzenator Feb 4, 2020
Author Contributor

updated as requested

];

buildInputs = [
cython setuptools setuptools_scm setuptools-scm-git-archive pyqt4

This comment has been minimized.

@FRidh

FRidh Feb 4, 2020
Member

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

This comment has been minimized.

@goertzenator

goertzenator Feb 4, 2020
Author Contributor

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

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;

This comment has been minimized.

@jonringer

jonringer Feb 17, 2020
Contributor

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;

This comment has been minimized.

@jonringer

jonringer Feb 17, 2020
Contributor

Suggested change
homepage = https://github.com/rougier/freetype-py;
homepage = "https://github.com/rougier/freetype-py";
@aanderse
Copy link
Contributor

@aanderse aanderse commented Mar 26, 2020

(triage) ping @goertzenator

@goertzenator
Copy link
Contributor Author

@goertzenator goertzenator commented Mar 26, 2020

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 mjlbach commented May 7, 2020

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

@goertzenator
Copy link
Contributor Author

@goertzenator goertzenator commented May 7, 2020

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 FRidh commented May 7, 2020

Please avoid merging Nixpkgs branches and instead rebase.

@goertzenator
Copy link
Contributor Author

@goertzenator goertzenator commented May 7, 2020

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 goertzenator force-pushed the goertzenator:add_vispy branch from 6ec4d3d to 6adf626 May 7, 2020
@goertzenator
Copy link
Contributor Author

@goertzenator goertzenator commented May 7, 2020

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 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 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 mjlbach commented May 7, 2020

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

@mjlbach
Copy link
Contributor

@mjlbach 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

I would prefer unit tests, but this should suffice

numpy freetype-py fontconfig libGL
];

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

This comment has been minimized.

@jonringer

jonringer May 7, 2020
Contributor

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 ];

This comment has been minimized.

@jonringer

jonringer May 7, 2020
Contributor

Suggested change
pythonImportsCheck = [ "freetype" ];
Copy link
Member

@prusnak prusnak left a comment

Tested ACK

@prusnak
Copy link
Member

@prusnak 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
14 checks passed
14 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="5f57e9f"; rev="5f57e9fcbe9ea685760412cdcc9c68aa1f874538"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="5f57e9f"; rev="5f57e9fcbe9ea685760412cdcc9c68aa1f874538"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="5f57e9f"; rev="5f57e9fcbe9ea685760412cdcc9c68aa1f874538"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="5f57e9f"; rev="5f57e9fcbe9ea685760412cdcc9c68aa1f874538"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="5f57e9f"; rev="5f57e9fcbe9ea685760412cdcc9c68aa1f874538"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="5f57e9f"; rev="5f57e9fcbe9ea685760412cdcc9c68aa1f874538"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="5f57e9f"; rev="5f57e9fcbe9ea685760412cdcc9c68aa1f874538"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
dtzWill added 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.