Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29009 from FRidh/python-fixes-2
Python: several fixes (2) (cherry picked from commit aabadda)
- Loading branch information
Showing
52 changed files
with
1,159 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ callPackage, lib, ... }: | ||
|
||
lib.overrideDerivation (callPackage ./generic-v3.nix { | ||
version = "3.3.0"; | ||
sha256 = "1258yz9flyyaswh3izv227kwnhwcxn4nwavdz9iznqmh24qmi59w"; | ||
}) (attrs: { NIX_CFLAGS_COMPILE = "-Wno-error"; }) |
40 changes: 40 additions & 0 deletions
40
pkgs/development/libraries/science/math/cudnn/8.0-6.0/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ stdenv | ||
, requireFile | ||
, cudatoolkit | ||
, fetchurl | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
version = "6.0"; | ||
cudatoolkit_version = "8.0"; | ||
|
||
name = "cudatoolkit-${cudatoolkit_version}-cudnn-${version}"; | ||
|
||
src = fetchurl { | ||
url = "http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/cudnn-8.0-linux-x64-v6.0.tgz"; | ||
sha256 = "173zpgrk55ri8if7s5yngsc89ajd6hz4pss4cdxlv6lcyh5122cv"; | ||
}; | ||
|
||
installPhase = '' | ||
function fixRunPath { | ||
p=$(patchelf --print-rpath $1) | ||
patchelf --set-rpath "$p:${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}" $1 | ||
} | ||
fixRunPath lib64/libcudnn.so | ||
mkdir -p $out | ||
cp -a include $out/include | ||
cp -a lib64 $out/lib64 | ||
''; | ||
|
||
propagatedBuildInputs = [ | ||
cudatoolkit | ||
]; | ||
|
||
meta = with stdenv.lib; { | ||
description = "NVIDIA CUDA Deep Neural Network library (cuDNN)"; | ||
homepage = https://developer.nvidia.com/cudnn; | ||
license = stdenv.lib.licenses.unfree; | ||
maintainers = with maintainers; [ jpbernardy ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ lib, buildPythonPackage, fetchPypi, isPy33, pythonOlder, | ||
asyncio | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "aioamqp"; | ||
name = "${pname}-${version}"; | ||
version = "0.10.0"; | ||
|
||
meta = { | ||
homepage = https://github.com/polyconseil/aioamqp; | ||
description = "AMQP implementation using asyncio"; | ||
license = lib.licenses.bsd3; | ||
}; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "0132921yy31ijb8w439zcz1gla4hiws4hx8zf6la4hjr01nsy666"; | ||
}; | ||
|
||
buildInputs = lib.optionals isPy33 [ asyncio ]; | ||
|
||
disabled = pythonOlder "3.3"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ lib, buildPythonPackage, fetchPypi, | ||
pytest, requests, requests_oauthlib, six | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "asana"; | ||
version = "0.6.2"; | ||
name = "${pname}-${version}"; | ||
|
||
meta = { | ||
description = "Python client library for Asana"; | ||
homepage = https://github.com/asana/python-asana; | ||
license = lib.licenses.mit; | ||
}; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "0skai72392n3i1c4bl3hn2kh5lj990qsbasdwkbjdcy6vq57jggf"; | ||
}; | ||
|
||
buildInputs = [ pytest ]; | ||
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 | ||
''; | ||
|
||
# ERROR: file not found: tests | ||
doCheck = false; | ||
|
||
checkPhase = '' | ||
py.test tests | ||
''; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
pkgs/development/python-modules/backports_weakref/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ stdenv | ||
, buildPythonPackage | ||
, fetchPypi | ||
, setuptools_scm | ||
# , backports | ||
, python | ||
}: | ||
|
||
buildPythonPackage rec { | ||
name = "${pname}-${version}"; | ||
pname = "backports.weakref"; | ||
version = "1.0rc1"; | ||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "14i8m3lspykdfpzf50grij3z286j9q8f32f2bnwdicv659qvy4w8"; | ||
}; | ||
|
||
buildInputs = [ setuptools_scm ]; | ||
# checkInputs = [ backports ]; | ||
|
||
# Requires backports package | ||
doCheck = false; | ||
|
||
checkPhase = '' | ||
${python.interpreter} -m unittest discover tests | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Backports of new features in Python’s weakref module"; | ||
license = licenses.psfl; | ||
maintainers = with maintainers; [ jpbernardy ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ stdenv, fetchPypi | ||
, buildPythonApplication, python, pythonAtLeast | ||
, mock, nose, pyhamcrest | ||
, glibcLocales, parse, parse-type, six | ||
}: | ||
buildPythonApplication rec { | ||
pname = "behave"; | ||
version = "1.2.5"; | ||
name = "${pname}-${version}"; | ||
|
||
disabled = pythonAtLeast "3.6"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "81b731ac5187e31e4aad2594944fa914943683a9818320846d037c5ebd6d5d0b"; | ||
}; | ||
|
||
checkInputs = [ mock nose pyhamcrest ]; | ||
buildInputs = [ glibcLocales ]; | ||
propagatedBuildInputs = [ parse parse-type six ]; | ||
|
||
postPatch = '' | ||
patchShebangs bin | ||
''; | ||
|
||
doCheck = true; | ||
|
||
checkPhase = '' | ||
export LANG="en_US.UTF-8" | ||
export LC_ALL="en_US.UTF-8" | ||
nosetests -x | ||
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' features/ | ||
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' tools/test-features/ | ||
${python.interpreter} bin/behave -f progress3 --stop --tags='~@xfail' issue.features/ | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = https://github.com/behave/behave; | ||
description = "behaviour-driven development, Python style"; | ||
license = licenses.bsd2; | ||
maintainers = with maintainers; [ alunduil ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
pkgs/development/python-modules/diff-match-patch/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ lib, buildPythonPackage, fetchPypi }: | ||
|
||
buildPythonPackage rec { | ||
pname = "diff-match-patch"; | ||
name = "${pname}-${version}"; | ||
version = "20121119"; | ||
|
||
meta = { | ||
homepage = https://code.google.com/p/google-diff-match-patch/; | ||
description = "Diff, Match and Patch libraries for Plain Text"; | ||
license = lib.licenses.asl20; | ||
}; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ lib, buildPythonPackage, fetchPypi, django }: | ||
|
||
buildPythonPackage rec { | ||
pname = "django-ipware"; | ||
name = "${pname}-${version}"; | ||
version = "1.1.6"; | ||
|
||
meta = { | ||
description = "A Django application to retrieve user's IP address"; | ||
homepage = https://github.com/un33k/django-ipware; | ||
license = lib.licenses.mit; | ||
}; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "00zah4g2h93nbsijz556j97v9qkn9sxcia1a2wrwdwnav2fhzack"; | ||
}; | ||
|
||
propagatedBuildInputs = [ django ]; | ||
|
||
# django.core.exceptions.ImproperlyConfigured: Requested setting IPWARE_TRUSTED_PROXY_LIST, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. | ||
doCheck = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ lib, buildPythonPackage, fetchPypi, | ||
django, jinja2, pytz, tox | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "django-jinja"; | ||
name = "${pname}-${version}"; | ||
version = "2.2.2"; | ||
|
||
meta = { | ||
description = "Simple and nonobstructive jinja2 integration with Django"; | ||
homepage = https://github.com/niwinz/django-jinja; | ||
license = lib.licenses.bsd3; | ||
}; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "099b99iprkvlsndrjmw4v3i3i60i9gm1aq5r88z15r7vgmv6sigj"; | ||
}; | ||
|
||
buildInputs = [ django pytz tox ]; | ||
propagatedBuildInputs = [ django jinja2 ]; | ||
|
||
# python installed: The directory '/homeless-shelter/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.,appdirs==1.4.3,Django==1.11.1,django-jinja==2.2.2,Jinja2==2.9.6,MarkupSafe==1.0,packaging==16.8,pyparsing==2.2.0,pytz==2017.2,six==1.10.0 | ||
doCheck = false; | ||
checkPhase = '' | ||
tox | ||
''; | ||
} |
24 changes: 24 additions & 0 deletions
24
pkgs/development/python-modules/django-pglocks/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ lib, buildPythonPackage, fetchPypi, django }: | ||
|
||
buildPythonPackage rec { | ||
pname = "django-pglocks"; | ||
name = "${pname}-${version}"; | ||
version = "1.0.2"; | ||
|
||
meta = { | ||
description = "PostgreSQL locking context managers and functions for Django."; | ||
homepage = https://github.com/Xof/django-pglocks; | ||
license = lib.licenses.mit; | ||
}; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "1ks4k0bk4457wfl3xgzr4v7xb0lxmnkhxwhlp0bbnmzipdafw1cl"; | ||
}; | ||
|
||
buildInputs = [ django ]; | ||
propagatedBuildInputs = [ django ]; | ||
|
||
# tests need a postgres database | ||
doCheck = false; | ||
} |
Oops, something went wrong.