diff options
Diffstat (limited to 'pkgs/development/python-modules')
14 files changed, 314 insertions, 54 deletions
diff --git a/pkgs/development/python-modules/adafruit-platformdetect/default.nix b/pkgs/development/python-modules/adafruit-platformdetect/default.nix new file mode 100644 index 000000000000..f03d3fd64e7b --- /dev/null +++ b/pkgs/development/python-modules/adafruit-platformdetect/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "Adafruit-PlatformDetect"; + version = "2.27.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0rnmy74rjjcyni5sr8h1djffpj7wngn2wqckl5vknp2smaihp34l"; + }; + + nativeBuildInputs = [ setuptools-scm ]; + + # Project has not published tests yet + doCheck = false; + pythonImportsCheck = [ "adafruit_platformdetect" ]; + + meta = with lib; { + description = "Platform detection for use by Adafruit libraries"; + homepage = "https://github.com/adafruit/Adafruit_Python_PlatformDetect"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/adafruit-pureio/default.nix b/pkgs/development/python-modules/adafruit-pureio/default.nix new file mode 100644 index 000000000000..36bafb0f7a07 --- /dev/null +++ b/pkgs/development/python-modules/adafruit-pureio/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "Adafruit-PureIO"; + version = "1.1.8"; + + src = fetchPypi { + pname = "Adafruit_PureIO"; + inherit version; + sha256 = "1mfa6sfz7qwgajz3lqw0s69ivvwbwvblwkjzbrwdrxjbma4jaw66"; + }; + + nativeBuildInputs = [ setuptools-scm ]; + + # Physical SMBus is not present + doCheck = false; + pythonImportsCheck = [ "Adafruit_PureIO" ]; + + meta = with lib; { + description = "Python interface to Linux IO including I2C and SPI"; + homepage = "https://github.com/adafruit/Adafruit_Python_PureIO"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/asgi-csrf/default.nix b/pkgs/development/python-modules/asgi-csrf/default.nix index eabb3d525cae..4988a04e8e44 100644 --- a/pkgs/development/python-modules/asgi-csrf/default.nix +++ b/pkgs/development/python-modules/asgi-csrf/default.nix @@ -1,8 +1,17 @@ -{ lib, stdenv, buildPythonPackage, isPy27, fetchFromGitHub, itsdangerous, python-multipart -, pytestCheckHook, starlette, httpx, pytest-asyncio }: +{ lib +, buildPythonPackage +, isPy27 +, fetchFromGitHub +, itsdangerous +, python-multipart +, pytestCheckHook +, starlette +, httpx +, pytest-asyncio +}: buildPythonPackage rec { - version = "0.7.1"; + version = "0.8"; pname = "asgi-csrf"; disabled = isPy27; @@ -11,7 +20,7 @@ buildPythonPackage rec { owner = "simonw"; repo = pname; rev = version; - sha256 = "1hhqrb9r46y6i3d3w6hc9zm6yyikdyd2k5pcbyw0r9fl959yi4hf"; + sha256 = "sha256-0I/p9SjVVZhJQeR7s1R3tooP9XMNLPlcxl0dBSzsVaw="; }; propagatedBuildInputs = [ @@ -26,10 +35,7 @@ buildPythonPackage rec { starlette ]; - # tests fail while importing a private module from httpx - # E ModuleNotFoundError: No module named 'httpx._content_streams' - # https://github.com/simonw/asgi-csrf/issues/18 - doCheck = false; + doCheck = false; # asgi-lifespan missing pythonImportsCheck = [ "asgi_csrf" ]; diff --git a/pkgs/development/python-modules/binho-host-adapter/default.nix b/pkgs/development/python-modules/binho-host-adapter/default.nix new file mode 100644 index 000000000000..2249a28a5547 --- /dev/null +++ b/pkgs/development/python-modules/binho-host-adapter/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pyserial +}: + +buildPythonPackage rec { + pname = "binho-host-adapter"; + version = "0.1.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "0mp8xa1qwaww2k5g2nqg7mcivzsbfw2ny1l9yjsi73109slafv8y"; + }; + + propagatedBuildInputs = [ pyserial ]; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "binhoHostAdapter" ]; + + meta = with lib; { + description = "Python library for Binho Multi-Protocol USB Host Adapters"; + homepage = "https://github.com/adafruit/Adafruit_Python_PlatformDetect"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/bitbox02/default.nix b/pkgs/development/python-modules/bitbox02/default.nix index e9cf4b36a49c..ce62fd6dce04 100644 --- a/pkgs/development/python-modules/bitbox02/default.nix +++ b/pkgs/development/python-modules/bitbox02/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "bitbox02"; - version = "5.1.0"; + version = "5.2.0"; src = fetchPypi { inherit pname version; - sha256 = "0hnjjjarr4q22wh03zyyqfhsizzsvg46030kks3qkzbsv29vqqh5"; + sha256 = "52b0b617660601939b30c8b588c28910946448b1b6d69ca231d5e3e47a322b71"; }; propagatedBuildInputs = [ base58 ecdsa hidapi noiseprotocol protobuf semver typing-extensions ]; diff --git a/pkgs/development/python-modules/fortiosapi/default.nix b/pkgs/development/python-modules/fortiosapi/default.nix new file mode 100644 index 000000000000..8b0425c38817 --- /dev/null +++ b/pkgs/development/python-modules/fortiosapi/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, oyaml +, packaging +, paramiko +, pexpect +, requests +}: + +buildPythonPackage rec { + pname = "fortiosapi"; + version = "1.0.5"; + + src = fetchFromGitHub { + owner = "fortinet-solutions-cse"; + repo = pname; + rev = "v${version}"; + sha256 = "0679dizxcd4sk1b4h6ss8qsbjb3c8qyijlp4gzjqji91w6anzg9k"; + }; + + propagatedBuildInputs = [ + pexpect + requests + paramiko + packaging + oyaml + ]; + + # Tests require a local VM + doCheck = false; + pythonImportsCheck = [ "fortiosapi" ]; + + meta = with lib; { + description = "Python module to work with Fortigate/Fortios devices"; + homepage = "https://github.com/fortinet-solutions-cse/fortiosapi"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/geojson-client/default.nix b/pkgs/development/python-modules/geojson-client/default.nix new file mode 100644 index 000000000000..7e683e204834 --- /dev/null +++ b/pkgs/development/python-modules/geojson-client/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, geojson +, haversine +, pytz +, requests +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "geojson-client"; + version = "0.5"; + + src = fetchFromGitHub { + owner = "exxamalte"; + repo = "python-geojson-client"; + rev = "v${version}"; + sha256 = "1cc6ymbn45dv7xdl1r8bbizlmsdbxjmsfza442yxmmm19nxnnqjv"; + }; + + propagatedBuildInputs = [ + geojson + haversine + pytz + requests + ]; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "geojson_client" ]; + + meta = with lib; { + description = "Python module for convenient access to GeoJSON feeds"; + homepage = "https://github.com/exxamalte/python-geojson-client"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/haversine/default.nix b/pkgs/development/python-modules/haversine/default.nix new file mode 100644 index 000000000000..7f5e462d1b3c --- /dev/null +++ b/pkgs/development/python-modules/haversine/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "haversine"; + version = "2.3.0"; + + src = fetchFromGitHub { + owner = "mapado"; + repo = pname; + rev = "v${version}"; + sha256 = "1c3yf9162b2b7l1lsw3ffd1linnc542qvljpgwxp6y5arrmljqnv"; + }; + + checkInputs = [ + numpy + pytestCheckHook + ]; + + pythonImportsCheck = [ "haversine" ]; + + meta = with lib; { + description = "Python module the distance between 2 points on earth"; + homepage = "https://github.com/mapado/haversine"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/johnnycanencrypt/default.nix b/pkgs/development/python-modules/johnnycanencrypt/default.nix index f0ee4a6bd99c..77789fa44dbe 100644 --- a/pkgs/development/python-modules/johnnycanencrypt/default.nix +++ b/pkgs/development/python-modules/johnnycanencrypt/default.nix @@ -61,6 +61,12 @@ rustPlatform.buildRustPackage rec { numpy ]; + # Remove with the next release after 0.5.0. This change is required + # for compatibility with maturin 0.9.0. + postPatch = '' + sed '/project-url = /d' -i Cargo.toml + ''; + buildPhase = '' runHook preBuild maturin build --release --manylinux off --strip --cargo-extra-args="-j $NIX_BUILD_CORES --frozen" diff --git a/pkgs/development/python-modules/pyatmo/default.nix b/pkgs/development/python-modules/pyatmo/default.nix index 22acf8725260..6bea15df386f 100644 --- a/pkgs/development/python-modules/pyatmo/default.nix +++ b/pkgs/development/python-modules/pyatmo/default.nix @@ -12,20 +12,20 @@ buildPythonPackage rec { pname = "pyatmo"; - version = "4.2.1"; + version = "4.2.2"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "jabesq"; - repo = "netatmo-api-python"; + repo = "pyatmo"; rev = "v${version}"; - sha256 = "12lmjhqjn71a358nkpzl3dwgiwmmz4lcv9f0qf69ngznpiirk28m"; + sha256 = "sha256-3IxDDLa8KMHVkHAeTmdNVRPc5aKzF3VwL2kKnG8Fp7I="; }; postPatch = '' substituteInPlace setup.cfg \ - --replace "oauthlib~=3.1.0" "oauthlib" \ - --replace "requests~=2.23.0" "requests" + --replace "oauthlib~=3.1" "oauthlib" \ + --replace "requests~=2.24" "requests" ''; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pybotvac/default.nix b/pkgs/development/python-modules/pybotvac/default.nix index 06ebf85ffe8c..ca093ba8e8bb 100644 --- a/pkgs/development/python-modules/pybotvac/default.nix +++ b/pkgs/development/python-modules/pybotvac/default.nix @@ -1,18 +1,33 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi, requests }: +{ lib +, buildPythonPackage +, fetchPypi +, requests +, requests_oauthlib +, voluptuous +}: buildPythonPackage rec { pname = "pybotvac"; - version = "0.0.18"; + version = "0.0.20"; src = fetchPypi { inherit pname version; - sha256 = "e983c9ffc0734c2e5a7c2adf5d0d0dfe399d94157c590ef70fad765f882c341f"; + sha256 = "sha256-1NnTSO4vO3Ryt4vYD5ZTQGr241GqA2KsGRBVowSTCzM="; }; - propagatedBuildInputs = [ requests ]; + propagatedBuildInputs = [ + requests + requests_oauthlib + voluptuous + ]; + + # no tests + doCheck = false; + + pythonImportsCheck = [ "pybotvac" ]; meta = with lib; { - description = "Python package for controlling Neato pybotvac Connected vacuum robot"; + description = "Python module for interacting with Neato Botvac Connected vacuum robots"; homepage = "https://github.com/stianaske/pybotvac"; license = licenses.mit; maintainers = with maintainers; [ elseym ]; diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index 338b8f44e03d..26bf5dc1c4b8 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -15,18 +15,35 @@ let inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34; - sip = (pythonPackages.sip.override { sip-module = "PyQt5.sip"; }).overridePythonAttrs(oldAttrs: { - # If we install sip in another folder, then we need to create a __init__.py as well - # if we want to be able to import it with Python 2. - # Python 3 could rely on it being an implicit namespace package, however, - # PyQt5 we made an explicit namespace package so sip should be as well. - postInstall = '' - cat << EOF > $out/${python.sitePackages}/PyQt5/__init__.py - from pkgutil import extend_path - __path__ = extend_path(__path__, __name__) - EOF - ''; - }); + sip = if isPy3k then + pythonPackages.sip_5 + else + (pythonPackages.sip.override { sip-module = "PyQt5.sip"; }).overridePythonAttrs(oldAttrs: { + # If we install sip in another folder, then we need to create a __init__.py as well + # if we want to be able to import it with Python 2. + # Python 3 could rely on it being an implicit namespace package, however, + # PyQt5 we made an explicit namespace package so sip should be as well. + postInstall = '' + cat << EOF > $out/${python.sitePackages}/PyQt5/__init__.py + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) + EOF + ''; + }); + + pyqt5_sip = buildPythonPackage rec { + pname = "PyQt5_sip"; + version = "12.8.1"; + + src = pythonPackages.fetchPypi { + inherit pname version; + sha256 = "30e944db9abee9cc757aea16906d4198129558533eb7fadbe48c5da2bd18e0bd"; + }; + + # There is no test code and the check phase fails with: + # > error: could not create 'PyQt5/sip.cpython-38-x86_64-linux-gnu.so': No such file or directory + doCheck = false; + }; in buildPythonPackage rec { pname = "PyQt5"; @@ -69,8 +86,7 @@ in buildPythonPackage rec { propagatedBuildInputs = [ dbus-python - sip - ] ++ lib.optional (!isPy3k) enum34; + ] ++ (if isPy3k then [ pyqt5_sip ] else [ sip enum34 ]); patches = [ # Fix some wrong assumptions by ./configure.py @@ -103,7 +119,7 @@ in buildPythonPackage rec { runHook postConfigure ''; - postInstall = '' + postInstall = lib.optionalString (!isPy3k) '' ln -s ${sip}/${python.sitePackages}/PyQt5/sip.* $out/${python.sitePackages}/PyQt5/ for i in $out/bin/*; do wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH" @@ -116,26 +132,21 @@ in buildPythonPackage rec { EOF ''; - installCheckPhase = let - modules = [ - "PyQt5" - "PyQt5.QtCore" - "PyQt5.QtQml" - "PyQt5.QtWidgets" - "PyQt5.QtGui" - ] + # Checked using pythonImportsCheck + doCheck = false; + + pythonImportsCheck = [ + "PyQt5" + "PyQt5.QtCore" + "PyQt5.QtQml" + "PyQt5.QtWidgets" + "PyQt5.QtGui" + ] ++ lib.optional withWebSockets "PyQt5.QtWebSockets" ++ lib.optional withWebKit "PyQt5.QtWebKit" ++ lib.optional withMultimedia "PyQt5.QtMultimedia" ++ lib.optional withConnectivity "PyQt5.QtConnectivity" - ; - imports = lib.concatMapStrings (module: "import ${module};") modules; - in '' - echo "Checking whether modules can be imported..." - ${python.interpreter} -c "${imports}" - ''; - - doCheck = true; + ; enableParallelBuilding = true; diff --git a/pkgs/development/python-modules/sip/5.x.nix b/pkgs/development/python-modules/sip/5.x.nix new file mode 100644 index 000000000000..cebffd5765bd --- /dev/null +++ b/pkgs/development/python-modules/sip/5.x.nix @@ -0,0 +1,26 @@ +{ lib, fetchPypi, buildPythonPackage, packaging, toml }: + +buildPythonPackage rec { + pname = "sip"; + version = "5.5.0"; + + src = fetchPypi { + pname = "sip"; + inherit version; + sha256 = "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"; + }; + + propagatedBuildInputs = [ packaging toml ]; + + # There aren't tests + doCheck = false; + + pythonImportsCheck = [ "sipbuild" ]; + + meta = with lib; { + description = "Creates C++ bindings for Python modules"; + homepage = "http://www.riverbankcomputing.co.uk/"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ eduardosm ]; + }; +} diff --git a/pkgs/development/python-modules/wasmer/default.nix b/pkgs/development/python-modules/wasmer/default.nix index 0bb60d6b9e30..62c8a2a06b71 100644 --- a/pkgs/development/python-modules/wasmer/default.nix +++ b/pkgs/development/python-modules/wasmer/default.nix @@ -8,7 +8,7 @@ }: let pname = "wasmer"; - version = "1.0.0-beta1"; + version = "1.0.0"; wheel = rustPlatform.buildRustPackage rec { inherit pname version; @@ -17,10 +17,10 @@ let owner = "wasmerio"; repo = "wasmer-python"; rev = version; - sha256 = "0302lcfjlw7nz18nf86z6swhhpp1qnpwcsm2fj4avl22rsv0h78j"; + hash = "sha256-I1GfjLaPYMIHKh2m/5IQepUsJNiVUEJg49wyuuzUYtY="; }; - cargoHash = "sha256-Rq5m9Lu6kePvohfhODLMOpGPFtCh0woTsQY2TufoiNQ="; + cargoHash = "sha256-txOOia1C4W+nsXuXp4EytEn82CFfSmiOYwRLC4WPImc="; nativeBuildInputs = [ maturin python ]; |