Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ec9a23332f06
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c6ea7d3a66e0
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 30, 2017

  1. treq: 17.3.1

    - enables and fixes tests
    - makes docs properly
    - used fetchpypi
    - tested nixos python 27/34
    Fernando J Pando committed May 30, 2017
    Copy the full SHA
    50b0e5b View commit details
  2. Merge pull request #26222 from nand0p/treq-fixes

    treq: 17.3.1 fixes
    FRidh authored May 30, 2017
    Copy the full SHA
    c6ea7d3 View commit details
Showing with 22 additions and 20 deletions.
  1. +22 −20 pkgs/development/python-modules/treq/default.nix
42 changes: 22 additions & 20 deletions pkgs/development/python-modules/treq/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
{ stdenv, fetchurl, buildPythonPackage, service-identity, requests,
six, mock, twisted, incremental, coreutils, gnumake, pep8, sphinx,
openssl, pyopenssl }:
{ stdenv, fetchPypi, buildPythonPackage, service-identity, requests, six,
mock, twisted, incremental, pep8, sphinx, openssl, pyopenssl, tox }:

buildPythonPackage rec {
name = "${pname}-${version}";
pname = "treq";
version = "17.3.1";

src = fetchurl {
url = "mirror://pypi/t/${pname}/${name}.tar.gz";
sha256 = "313af6dedecfdde2750968dc17653b6147cf2340b3479d70031cf741f5be0cf6";
src = fetchPypi {
inherit pname version;
sha256 = "1xhcpvsl3xqw0dq9sixk80iwyiv17djigp3815sy5pfgvvggcfii";
};

buildInputs = [
pep8
mock
];

propagatedBuildInputs = [
service-identity
requests
twisted
@@ -26,20 +20,28 @@ buildPythonPackage rec {
six
openssl
pyopenssl
tox
];

checkPhase = ''
${pep8}/bin/pep8 --ignore=E902 treq
trial treq
'';
checkInputs = [
pep8
mock
];

doCheck = false;
# Failure: twisted.web._newclient.RequestTransmissionFailed: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]>]
postPatch = ''
rm -fv src/treq/test/test_treq_integration.py
'';

postBuild = ''
${coreutils}/bin/mkdir -pv treq
${coreutils}/bin/echo "${version}" | ${coreutils}/bin/tee treq/_version
cd docs && ${gnumake}/bin/make html && cd ..
# build documentation and install in $out
tox -e docs
mkdir -pv $out/docs
cp -rv docs/* $out/docs/
'';

checkPhase = ''
${pep8}/bin/pep8 --ignore=E902 treq
trial treq
'';

meta = with stdenv.lib; {