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

tumpa: init at 0.1.1 #108522

Merged
merged 2 commits into from Jan 11, 2021
Merged

tumpa: init at 0.1.1 #108522

merged 2 commits into from Jan 11, 2021

Conversation

0x4A6F
Copy link
Member

@0x4A6F 0x4A6F commented Jan 5, 2021

Motivation for this change

Add package tumpa with dependency johnnycanencrypt.

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.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

If you take a look at https://github.com/NixOS/nixpkgs/pull/108378/files#diff-a6ddec54f874bafe1f87a5423f6135222cb002ff0f8e4d0e532433aaaf3cd3c0 you will find a version which supports multiple python versions. Also I am working on a hook which does all of this. When I am done I am going to convert this package, too.

johnnycanencrypt
pyside2
];

Copy link
Member

Choose a reason for hiding this comment

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

Please add a pythonImportsCheck.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added for johnnycanencrypt, tumpa seems to be lacking tests.

Copy link
Member

Choose a reason for hiding this comment

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

pythonImportsCheck is a replacement for tests to know if the module can be imported at all. Please add this.

pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
LIBCLANG_PATH = llvmPackages.libclang + "/lib";

propagatedBuildInputs = [
python
Copy link
Member

Choose a reason for hiding this comment

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

That is a nativeBuildInput of maturin to check if python is available, right?

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108522 run on x86_64-linux 1

6 packages built:
  • python37Packages.johnnycanencrypt
  • python37Packages.tumpa
  • python38Packages.johnnycanencrypt
  • python38Packages.tumpa
  • python39Packages.johnnycanencrypt
  • python39Packages.tumpa

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:

python37Packages.tumpa:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python38Packages.tumpa:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.
python39Packages.tumpa:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

  • Tell pytest(CheckHook) where to find the tests included in the package
  • Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
  • If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.

Comment on lines 77 to 78
'';
postCheck = "popd";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'';
postCheck = "popd";
'';
postCheck = ''
popd
'';

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108522 run on x86_64-linux 1

6 packages built:
  • python37Packages.johnnycanencrypt
  • python37Packages.tumpa
  • python38Packages.johnnycanencrypt
  • python38Packages.tumpa
  • python39Packages.johnnycanencrypt
  • python39Packages.tumpa

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 8, 2021

darwin diff for johnny

diff --git a/pkgs/development/python-modules/johnnycanencrypt/default.nix b/pkgs/development/python-modules/johnnycanencrypt/default.nix
index 607c36c8da7..407bb44d8b2 100644
--- a/pkgs/development/python-modules/johnnycanencrypt/default.nix
+++ b/pkgs/development/python-modules/johnnycanencrypt/default.nix
@@ -13,6 +13,7 @@
 , numpy
 , pytestCheckHook
 , pythonOlder
+, PCSC
 }:
 
 rustPlatform.buildRustPackage rec {
@@ -48,7 +49,7 @@ rustPlatform.buildRustPackage rec {
   buildInputs = [
     pcsclite
     nettle
-  ];
+  ] ++ stdenv.lib.optionals stdenv.isDarwin [ PCSC ];
 
   # Needed b/c need to check AFTER python wheel is installed (using Rust Build, not buildPythonPackage)
   doCheck = false;
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 75754ba26e0..935155c112d 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3214,7 +3214,9 @@ in {
 
   joblib = callPackage ../development/python-modules/joblib { };
 
-  johnnycanencrypt = callPackage ../development/python-modules/johnnycanencrypt { };
+  johnnycanencrypt = callPackage ../development/python-modules/johnnycanencrypt {
+    inherit (pkgs.darwin.apple_sdk.frameworks) PCSC;
+  };
 
   josepy = callPackage ../development/python-modules/josepy { };
 

Tumpa does not work on darwin due to some unrelated build failure.

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

2 participants