-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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 #28884 from FRidh/python-fixes
Python: several fixes
- Loading branch information
Showing
71 changed files
with
1,365 additions
and
761 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,30 @@ | ||
{lib, buildPythonPackage, fetchPypi, isPy3k, incremental, ipaddress, twisted | ||
, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof | ||
, geoip, nose}: | ||
|
||
buildPythonPackage rec { | ||
name = "${pname}-${version}"; | ||
pname = "GeoIP"; | ||
version = "1.3.2"; | ||
|
||
checkInputs = [ nose ]; | ||
propagatedBuildInputs = [ | ||
geoip | ||
]; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "1rphxf3vrn8wywjgr397f49s0s22m83lpwcq45lm0h2p45mdm458"; | ||
}; | ||
|
||
# Tests cannot be run because they require data that isn't included in the | ||
# release tarball. | ||
checkPhase = "true"; | ||
|
||
meta = { | ||
description = "MaxMind GeoIP Legacy Database - Python API"; | ||
homepage = http://www.maxmind.com/; | ||
maintainers = with lib.maintainers; [ jluttine ]; | ||
license = lib.licenses.lgpl21Plus; | ||
}; | ||
} |
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,36 @@ | ||
{ lib | ||
, buildPythonPackage | ||
, fetchPypi | ||
, pythonOlder | ||
, chardet | ||
, multidict | ||
, async-timeout | ||
, yarl | ||
, pytest | ||
, gunicorn | ||
, pytest-raisesregexp | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "aiohttp"; | ||
version = "2.2.5"; | ||
name = "${pname}-${version}"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "af5bfdd164256118a0a306b3f7046e63207d1f8cba73a67dcc0bd858dcfcd3bc"; | ||
}; | ||
|
||
disabled = pythonOlder "3.4"; | ||
|
||
doCheck = false; # Too many tests fail. | ||
|
||
checkInputs = [ pytest gunicorn pytest-raisesregexp ]; | ||
propagatedBuildInputs = [ async-timeout chardet multidict yarl ]; | ||
|
||
meta = { | ||
description = "Http client/server for asyncio"; | ||
license = with lib.licenses; [ asl20 ]; | ||
homepage = https://github.com/KeepSafe/aiohttp/; | ||
}; | ||
} |
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,28 @@ | ||
{ lib, stdenv, buildPythonPackage, fetchPypi, pytest, hypothesis, zope_interface | ||
, pympler, coverage, six, clang }: | ||
|
||
buildPythonPackage rec { | ||
name = "${pname}-${version}"; | ||
pname = "attrs"; | ||
version = "17.2.0"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"; | ||
}; | ||
|
||
# macOS needs clang for testing | ||
buildInputs = [ | ||
pytest hypothesis zope_interface pympler coverage six | ||
] ++ lib.optionals (stdenv.isDarwin) [ clang ]; | ||
|
||
checkPhase = '' | ||
py.test | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Python attributes without boilerplate"; | ||
homepage = https://github.com/hynek/attrs; | ||
license = licenses.mit; | ||
}; | ||
} |
22 changes: 22 additions & 0 deletions
22
pkgs/development/python-modules/backports_unittest-mock/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,22 @@ | ||
{ stdenv, buildPythonPackage, fetchPypi, setuptools_scm, mock }: | ||
|
||
buildPythonPackage rec { | ||
name = "${pname}-${version}"; | ||
pname = "backports.unittest_mock"; | ||
version = "1.3"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "0xdkx5wf5a2w2zd2pshk7z2cvbv6db64c1x6v9v1a18ja7bn9nf6"; | ||
}; | ||
|
||
propagatedBuildInputs = [ mock ]; | ||
|
||
buildInputs = [ setuptools_scm ]; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Provides a function install() which makes the mock module"; | ||
homepage = https://github.com/jaraco/backports.unittest_mock; | ||
license = licenses.mit; | ||
}; | ||
} |
24 changes: 24 additions & 0 deletions
24
pkgs/development/python-modules/beautifulsoup4/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 @@ | ||
{ stdenv, buildPythonPackage, fetchPypi, nose }: | ||
|
||
buildPythonPackage rec { | ||
name = "${pname}-${version}"; | ||
pname = "beautifulsoup4"; | ||
version = "4.6.0"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "12cf0ygpz9srpfh9gx2f9ba0swa1rzypv3sm4r0hmjyw6b4nm2w0"; | ||
}; | ||
|
||
buildInputs = [ nose ]; | ||
checkPhase = '' | ||
nosetests build | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = http://crummy.com/software/BeautifulSoup/bs4/; | ||
description = "HTML and XML parser"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ domenkozar ]; | ||
}; | ||
} |
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 | ||
, numpy | ||
, pandas | ||
}: | ||
|
||
|
||
buildPythonPackage rec { | ||
pname = "bkcharts"; | ||
version = "0.2"; | ||
name = "${pname}-${version}"; | ||
|
||
src = fetchPypi { | ||
inherit version pname; | ||
sha256 = "a5eaa8e78853dcecaa46345812e4fabe9cd3b96330ebf0809f640a4a0556d72e"; | ||
}; | ||
|
||
propagatedBuildInputs = [ numpy pandas ]; | ||
|
||
# Circular test dependency on bokeh | ||
doCheck = false; | ||
|
||
meta = { | ||
description = "High level chart types built on top of Bokeh"; | ||
homepage = http://github.com/bokeh/bkcharts; | ||
license = lib.licenses.bsd3; | ||
}; | ||
} |
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,82 @@ | ||
{ lib | ||
, buildPythonPackage | ||
, fetchPypi | ||
, isPyPy | ||
, mock | ||
, pytest | ||
, flask | ||
, jinja2 | ||
, markupsafe | ||
, werkzeug | ||
, itsdangerous | ||
, dateutil | ||
, requests | ||
, six | ||
, pygments | ||
, pystache | ||
, markdown | ||
, pyyaml | ||
, pyzmq | ||
, tornado | ||
, colorama | ||
, isPy3k | ||
, futures | ||
, websocket_client | ||
, numpy | ||
, pandas | ||
, greenlet | ||
, python | ||
, bkcharts | ||
, pillow | ||
, selenium | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "bokeh"; | ||
name = "${pname}${version}"; | ||
version = "0.12.7"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "2c42c95bf1a418c758dbff8446b4f5e5fc72ac10ea5da4e6b5010067396d0880"; | ||
}; | ||
|
||
disabled = isPyPy; | ||
|
||
# Some test that uses tornado fails | ||
# doCheck = false; | ||
|
||
checkInputs = [ mock pytest pillow selenium ]; | ||
|
||
propagatedBuildInputs = [ | ||
flask | ||
jinja2 | ||
markupsafe | ||
werkzeug | ||
itsdangerous | ||
dateutil | ||
requests | ||
six | ||
pygments | ||
pystache | ||
markdown | ||
pyyaml | ||
pyzmq | ||
tornado | ||
colorama | ||
bkcharts | ||
] | ||
++ lib.optionals ( !isPy3k ) [ futures ] | ||
++ lib.optionals ( !isPy3k && !isPyPy ) [ websocket_client ] | ||
++ lib.optionals ( !isPyPy ) [ numpy pandas greenlet ]; | ||
|
||
checkPhase = '' | ||
${python.interpreter} -m unittest discover -s bokeh/tests | ||
''; | ||
|
||
meta = { | ||
description = "Statistical and novel interactive HTML plots for Python"; | ||
homepage = "http://github.com/bokeh/bokeh"; | ||
license = lib.licenses.bsd3; | ||
}; | ||
} |
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,22 @@ | ||
{ stdenv, buildPythonPackage, fetchPypi | ||
, pytest, pytestrunner, hypothesis }: | ||
|
||
buildPythonPackage rec { | ||
name = "${pname}-${version}"; | ||
pname = "chardet"; | ||
version = "3.0.4"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"; | ||
}; | ||
|
||
buildInputs = [ pytest pytestrunner hypothesis ]; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = https://github.com/chardet/chardet; | ||
description = "Universal encoding detector"; | ||
license = licenses.lgpl2; | ||
maintainers = with maintainers; [ domenkozar ]; | ||
}; | ||
} |
Oops, something went wrong.