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

pythonPackages.pynmea2: init at 1.12.0 #40757

Merged
merged 1 commit into from May 23, 2018
Merged

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented May 19, 2018

Motivation for this change

Adds the pynmea2 package to the nixpkgs.

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.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please change your commit message to pythonPackages.pynmea2: init at 1.12.0.

buildPythonPackage rec {
pname = "pynmea2";
version = "1.12.0";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

drop this line

sha256 = "185wxn8gag9whxmysspbh8s7wn3sh1glgf508w2zzwi4lklryl7i";
};

# Tests are failing for Python 3 because the version is missing.
Copy link
Member

Choose a reason for hiding this comment

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

Which version of what is missing? You can set doCheck = isPy27.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not quite sure, but the test fails with

_version (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: _version (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: module 'pynmea2' has no attribute '_version'

----------------------------------------------------------------------

Copy link
Member

Choose a reason for hiding this comment

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

We can try reenabling the tests once the appropriate checkPhase is set.

@@ -0,0 +1,22 @@
{ stdenv, lib, buildPythonPackage, fetchPypi }:
Copy link
Member

Choose a reason for hiding this comment

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

stdenv is not used

@oxzi oxzi force-pushed the pynmea2-1.12.0 branch 2 times, most recently from 67ba777 to 4beca92 Compare May 19, 2018 09:50
@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.pynmea2 python3.pkgs.pynmea2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.pynmea2, python3.pkgs.pynmea2

Partial log (click to expand)

warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'pynmea2.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/rygi98hbm83v5r2v7mxwsacb436vd00w-python2.7-pynmea2-1.12.0
/nix/store/9g0dizzw6mhbhi84vb2y8hbf5v9srkif-python3.6-pynmea2-1.12.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.pynmea2, python3.pkgs.pynmea2

Partial log (click to expand)

warning: no files found matching 'LICENSE.txt'
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'pynmea2.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

@dotlambda
Copy link
Member

Ran 0 tests in 0.000s

You'll probably have to set

checkPhase = ''
  py.test
'';

@dotlambda dotlambda changed the title pynmea2: init at 1.12.0 pythonPackages.pynmea2: init at 1.12.0 May 22, 2018
@oxzi
Copy link
Member Author

oxzi commented May 23, 2018

Using pytest solved this issue and works for both Python 2 and 3. Thanks @dotlambda.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.pynmea2 python3.pkgs.pynmea2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.pynmea2, python3.pkgs.pynmea2

Partial log (click to expand)

test/test_proprietary.py ..............                                  [ 30%]
test/test_pynmea.py ..................                                   [ 60%]
test/test_rdi.py .                                                       [ 61%]
test/test_stream.py .....                                                [ 70%]
test/test_sxn.py ..                                                      [ 73%]
test/test_types.py ................                                      [100%]

========================== 60 passed in 0.35 seconds ===========================
/nix/store/j69j2sngfkn7rizcp8l2wq3ni80cpp0z-python2.7-pynmea2-1.12.0
/nix/store/k67dm5c6wznp5g0avvmy5yd63q9dzar4-python3.6-pynmea2-1.12.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.pynmea2, python3.pkgs.pynmea2

Partial log (click to expand)

test/test_proprietary.py ..............                                  [ 30%]
test/test_pynmea.py ..................                                   [ 60%]
test/test_rdi.py .                                                       [ 61%]
test/test_stream.py .....                                                [ 70%]
test/test_sxn.py ..                                                      [ 73%]
test/test_types.py ................                                      [100%]

========================== 60 passed in 5.57 seconds ===========================
/nix/store/01kqi2iyhp90i5widr48xwlfi99qblmn-python2.7-pynmea2-1.12.0
/nix/store/r770gx5nriap4lxyskp1wn5l40drhhwq-python3.6-pynmea2-1.12.0

@dotlambda dotlambda merged commit b656e03 into NixOS:master May 23, 2018
@oxzi oxzi deleted the pynmea2-1.12.0 branch June 13, 2018 11:30
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

3 participants