mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 20:23:02 +00:00
ced21f5e1a
The `buildPython*` function computes name from `pname` and `version`. This change removes `name` attribute from all expressions in `pkgs/development/python-modules`. While at it, some other minor changes were made as well, such as replacing `fetchurl` calls with `fetchPypi`.
35 lines
850 B
Nix
35 lines
850 B
Nix
{ lib, buildPythonPackage, pytest, requests, requests_oauthlib, six
|
|
, fetchFromGitHub, responses, stdenv
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "asana";
|
|
version = "0.7.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "asana";
|
|
repo = "python-asana";
|
|
rev = "v${version}";
|
|
sha256 = "0786y3wxqxxhsb0kkpx4bfzif3dhvv3dmm6vnq58iyj94862kpxf";
|
|
};
|
|
|
|
checkInputs = [ pytest responses ];
|
|
propagatedBuildInputs = [ requests requests_oauthlib six ];
|
|
|
|
patchPhase = ''
|
|
echo > requirements.txt
|
|
sed -i "s/requests~=2.9.1/requests >=2.9.1/" setup.py
|
|
sed -i "s/requests_oauthlib~=0.6.1/requests_oauthlib >=0.6.1/" setup.py
|
|
'';
|
|
|
|
checkPhase = ''
|
|
py.test tests
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Python client library for Asana";
|
|
homepage = https://github.com/asana/python-asana;
|
|
license = licenses.mit;
|
|
};
|
|
}
|