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.bjoern: init at 2.2.2 #45557

Merged
merged 1 commit into from Sep 18, 2018
Merged

pythonPackages.bjoern: init at 2.2.2 #45557

merged 1 commit into from Sep 18, 2018

Conversation

CMCDragonkai
Copy link
Member

Motivation for this change

Added bjoern. A screaming fast WSGI server!

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@CMCDragonkai
Copy link
Member Author

@GrahamcOfBorg build pythonPackages.bjoern python3Packages.bjoern

@dotlambda
Copy link
Member

@CMCDragonkai You'd have to add yourself to https://github.com/NixOS/ofborg/blob/released/config.known-users.json.

@GrahamcOfBorg build python2.pkgs.bjoern python3.pkgs.bjoern

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python2.pkgs.bjoern, python3.pkgs.bjoern

Partial log (click to expand)

writing manifest file 'bjoern.egg-info/SOURCES.txt'
running build_ext
copying build/lib.macosx-10.6-x86_64-3.6/_bjoern.cpython-36m-darwin.so ->

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

OK
/nix/store/iy318jsb00yjcp45saqps94pl74ha98w-python2.7-bjoern-2.2.2
/nix/store/4minzk63a03mhwk0xmlw5xw1c3sx0jpa-python3.6-bjoern-2.2.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.bjoern, python3.pkgs.bjoern

Partial log (click to expand)

writing manifest file 'bjoern.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-3.6/_bjoern.cpython-36m-x86_64-linux-gnu.so ->

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

OK
/nix/store/qpw398hxs2g1r1xlcy32d92fpk534zsg-python2.7-bjoern-2.2.2
/nix/store/f3i3imxp7plma0avv36j26yz2rxigixh-python3.6-bjoern-2.2.2

@dotlambda
Copy link
Member

Ran 0 tests in 0.000s

Please provide an appropriate checkPhase. In case there are no tests, please set doCheck = false and add a comment with the reason.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.bjoern, python3.pkgs.bjoern

Partial log (click to expand)

writing manifest file 'bjoern.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-aarch64-2.7/_bjoern.so ->

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

OK
/nix/store/vddl57mmpcqigm82advr7pnwaqblchq2-python2.7-bjoern-2.2.2
/nix/store/a15fpdh7zh5lxiwj1wi6l6vhh0k2jrda-python3.6-bjoern-2.2.2

@CMCDragonkai
Copy link
Member Author

As can be seen by the linked issue jonashaag/bjoern#140

There are only 2 automated tests, one of them doesn't work since I tried. And both are just scripts.

Both scripts involve binding to localhost 127.0.0.1. Is this OK for running tests? I suppose if the build is happening in a "container" namespace, I'm not sure if the network itself is namespaced as well.

@CMCDragonkai
Copy link
Member Author

@dotlambda The first test produces ugly messages that seem to a human user to cause errors, yet it appears that it's not considered a failure of the test itself. What do you think of such things? jonashaag/bjoern#140 (comment)

Also I'm assuming that if a command returned back a non-exit code of 0, the checkPhase would fail right?

@CMCDragonkai
Copy link
Member Author

@dotlambda I added one of the tests that doesn't cause ugly messages.

@CMCDragonkai
Copy link
Member Author

On author's recommendations, redirected STDERR to /dev/null.

buildInputs = [ libev ];

checkPhase = ''
python tests/keep-alive-behaviour.py 2>/dev/null
Copy link
Member

Choose a reason for hiding this comment

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

${python.interpreter}

@CMCDragonkai
Copy link
Member Author

@FRidh Done.

buildInputs = [ libev ];

checkPhase = ''
${python.interpreter} tests/keep-alive-behaviour.py 2>/dev/null
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure it's wise to use 2>/dev/null. Having some information when something goes wrong would be nice, wouldn't it?

Choose a reason for hiding this comment

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

The proper way to silence these messages is to pipe the test's subprocesses' stderr to /dev/null, as suggested in the linked GitHub issue.

@CMCDragonkai
Copy link
Member Author

CMCDragonkai commented Sep 11, 2018 via email

@CMCDragonkai
Copy link
Member Author

I'd like to get this merged. I wonder if there's any issues holding this up.

@FRidh FRidh merged commit 3155491 into NixOS:master Sep 18, 2018
@CMCDragonkai CMCDragonkai deleted the bjoern branch September 19, 2018 01:36
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

5 participants