diff options
Diffstat (limited to 'pkgs/development/python-modules')
9 files changed, 213 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/bitcoin-price-api/default.nix b/pkgs/development/python-modules/bitcoin-price-api/default.nix new file mode 100644 index 000000000000..3f43318f08a6 --- /dev/null +++ b/pkgs/development/python-modules/bitcoin-price-api/default.nix @@ -0,0 +1,25 @@ +{ lib, buildPythonPackage, fetchPypi +, dateutil, requests }: + +buildPythonPackage rec { + pname = "bitcoin-price-api"; + version = "0.0.4"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "bc68076f9632aaa9a8009d916d67a709c1e045dd904cfc7a3e8be33960d32029"; + }; + + propagatedBuildInputs = [ dateutil requests ]; + + # No tests in archive + doCheck = false; + + meta = { + homepage = "http://github.com/dursk/bitcoin-price-api"; + description = "Price APIs for bitcoin exchanges"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ bhipple ]; + }; +} diff --git a/pkgs/development/python-modules/confluent-kafka/default.nix b/pkgs/development/python-modules/confluent-kafka/default.nix new file mode 100644 index 000000000000..bd5d8b7dca64 --- /dev/null +++ b/pkgs/development/python-modules/confluent-kafka/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi, isPy3k, rdkafka, requests, avro3k, avro}: + +buildPythonPackage rec { + name = "${pname}-${version}"; + version = "0.9.4"; + pname = "confluent-kafka"; + + src = fetchPypi { + inherit pname version; + sha256 = "1v8apw9f8l01ql42jg1sfqv41yxvcbxn1a3ar01y0ni428swq6wk"; + }; + + buildInputs = [ rdkafka requests ] ++ (if isPy3k then [ avro3k ] else [ avro ]) ; + + # Tests fail for python3 under this pypi release + doCheck = if isPy3k then false else true; + + meta = with stdenv.lib; { + description = "Confluent's Apache Kafka client for Python"; + homepage = "https://github.com/confluentinc/confluent-kafka-python"; + license = licenses.asl20; + maintainers = with maintainers; [ mlieberman85 ]; + }; +} diff --git a/pkgs/development/python-modules/jsbeautifier/default.nix b/pkgs/development/python-modules/jsbeautifier/default.nix new file mode 100644 index 000000000000..fa4ba7bffb5d --- /dev/null +++ b/pkgs/development/python-modules/jsbeautifier/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, buildPythonApplication, EditorConfig, pytest, six }: + +buildPythonApplication rec { + name = "jsbeautifier-1.6.14"; + + propagatedBuildInputs = [ six ]; + + buildInputs = [ EditorConfig pytest ]; + + src = fetchurl { + url = "mirror://pypi/j/jsbeautifier/${name}.tar.gz"; + sha256 = "50b2af556aa1da7283a6a92eaa699668312cb91f2ba6b78a4422b1d42af964a2"; + }; + + meta = with stdenv.lib; { + homepage = "http://jsbeautifier.org"; + description = "JavaScript unobfuscator and beautifier."; + license = licenses.mit; + maintainers = with maintainers; [ apeyroux ]; + }; + } diff --git a/pkgs/development/python-modules/metaphone/default.nix b/pkgs/development/python-modules/metaphone/default.nix new file mode 100644 index 000000000000..b72789369f26 --- /dev/null +++ b/pkgs/development/python-modules/metaphone/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, isPy3k, fetchPypi, nose }: + +buildPythonPackage rec { + pname = "Metaphone"; + version = "0.6"; + name = "metaphone-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "09ysaczwh2rlsqq9j5fz7m4pq2fs0axp5vvivrpfrdvclvffl2xd"; + }; + + disabled = isPy3k; + + buildInputs = [ nose ]; + + meta = with stdenv.lib; { + homepage = https://github.com/oubiwann/metaphone; + description = "A Python implementation of the metaphone and double metaphone algorithms"; + license = licenses.bsd3; + maintainers = with maintainers; [ ris ]; + }; +} diff --git a/pkgs/development/python-modules/pika-pool/default.nix b/pkgs/development/python-modules/pika-pool/default.nix new file mode 100644 index 000000000000..93933c435230 --- /dev/null +++ b/pkgs/development/python-modules/pika-pool/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi +, pika +}: + +buildPythonPackage rec { + pname = "pika-pool"; + version = "0.1.3"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "f3985888cc2788cdbd293a68a8b5702a9c955db6f7b8b551aeac91e7f32da397"; + }; + + # Tests require database connections + doCheck = false; + + propagatedBuildInputs = [ pika ]; + meta = with stdenv.lib; { + homepage = "https://github.com/bninja/pika-pool"; + license = licenses.bsdOriginal; + description = "Pools for pikas."; + }; +} diff --git a/pkgs/development/python-modules/pyproj/default.nix b/pkgs/development/python-modules/pyproj/default.nix index eff6f4368583..8b15c63fb206 100644 --- a/pkgs/development/python-modules/pyproj/default.nix +++ b/pkgs/development/python-modules/pyproj/default.nix @@ -1,11 +1,12 @@ { lib , buildPythonPackage , fetchPypi -, proj , python +, nose2 +, proj ? null }: -buildPythonPackage rec { +buildPythonPackage (rec { pname = "pyproj"; version = "1.9.5.1"; name = "${pname}-${version}"; @@ -15,14 +16,19 @@ buildPythonPackage rec { sha256 = "53fa54c8fa8a1dfcd6af4bf09ce1aae5d4d949da63b90570ac5ec849efaf3ea8"; }; - buildInputs = [ proj ]; + buildInputs = [ nose2 ]; - # Could not get tests working - doCheck = false; + checkPhase = '' + runHook preCheck + pushd unittest # changing directory should ensure we're importing the global pyproj + ${python.interpreter} test.py && ${python.interpreter} -c "import doctest, pyproj, sys; sys.exit(doctest.testmod(pyproj)[0])" + popd + runHook postCheck + ''; meta = { description = "Python interface to PROJ.4 library"; homepage = http://github.com/jswhit/pyproj; license = with lib.licenses; [ isc ]; }; -} +} // (if proj == null then {} else { PROJ_DIR = proj; })) diff --git a/pkgs/development/python-modules/pysrt/default.nix b/pkgs/development/python-modules/pysrt/default.nix new file mode 100644 index 000000000000..076838425a42 --- /dev/null +++ b/pkgs/development/python-modules/pysrt/default.nix @@ -0,0 +1,31 @@ +{ stdenv +, buildPythonApplication +, fetchFromGitHub +, chardet +, nose +}: + +buildPythonApplication rec { + name = "pysrt-${version}"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "byroot"; + repo = "pysrt"; + rev = "v${version}"; + sha256 = "0rwjaf26885vxhxnas5d8zwasvj7x88y4y2pdivjd4vdcpqrqdjn"; + }; + + buildInputs = [ nose ]; + checkPhase = '' + nosetests -v + ''; + + propagatedBuildInputs = [ chardet ]; + + meta = with stdenv.lib; { + homepage = https://github.com/byroot/pysrt; + license = licenses.gpl3; + description = "Python library used to edit or create SubRip files"; + }; +} diff --git a/pkgs/development/python-modules/rarfile/default.nix b/pkgs/development/python-modules/rarfile/default.nix new file mode 100644 index 000000000000..7231da9d3d07 --- /dev/null +++ b/pkgs/development/python-modules/rarfile/default.nix @@ -0,0 +1,29 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, nose, unrar, glibcLocales }: + +buildPythonPackage rec { + name = "rarfile-${version}"; + version = "3.0"; + + src = fetchFromGitHub { + owner = "markokr"; + repo = "rarfile"; + rev = "rarfile_3_0"; + sha256 = "07yliz6p1bxzhipnrgz133gl8laic35gl4rqfay7f1vc384ch7sn"; + }; + buildInputs = [ pytest nose glibcLocales ]; + + prePatch = '' + substituteInPlace rarfile.py \ + --replace 'UNRAR_TOOL = "unrar"' "UNRAR_TOOL = \"${unrar}/bin/unrar\"" + ''; + LC_ALL = "en_US.UTF-8"; + checkPhase = '' + py.test test -k "not test_printdir" + ''; + + meta = with stdenv.lib; { + description = "RAR archive reader for Python"; + homepage = https://github.com/markokr/rarfile; + license = licenses.isc; + }; +} diff --git a/pkgs/development/python-modules/rfc3986/default.nix b/pkgs/development/python-modules/rfc3986/default.nix new file mode 100644 index 000000000000..dde36e7592e6 --- /dev/null +++ b/pkgs/development/python-modules/rfc3986/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi, + pytest }: + +buildPythonPackage rec { + pname = "rfc3986"; + version = "0.4.1"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "5ac85eb132fae7bbd811fa48d11984ae3104be30d44d397a351d004c633a68d2"; + }; + + buildInputs = [ pytest ]; + checkPhase = '' + py.test + ''; + + meta = with stdenv.lib; { + homepage = "https://rfc3986.readthedocs.org"; + license = licenses.asl20; + description = "Validating URI References per RFC 3986"; + }; +} |