From 931e4927c6ebc7f661b80bc1716e39fed54de759 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Nov 2021 18:24:20 +0100 Subject: [PATCH 1/4] python3Packages.pkginfo: 1.7.1 -> 1.8.1 python3Packages.pkginfo: 1.7.1 -> 1.8.1 --- .../python-modules/pkginfo/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pkginfo/default.nix b/pkgs/development/python-modules/pkginfo/default.nix index 6bfed6305a8a..19e8cddcb1ad 100644 --- a/pkgs/development/python-modules/pkginfo/default.nix +++ b/pkgs/development/python-modules/pkginfo/default.nix @@ -1,21 +1,23 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchPypi +}: buildPythonPackage rec { pname = "pkginfo"; - version = "1.7.1"; + version = "1.8.1"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "e7432f81d08adec7297633191bbf0bd47faf13cd8724c3a13250e51d542635bd"; + sha256 = "sha256-ZRdf+iyAciBnOkHDcVc6yaHqGxn/1e75FiePQoMZk08="; }; doCheck = false; # I don't know why, but with doCheck = true it fails. meta = with lib; { - homepage = "https://pypi.python.org/pypi/pkginfo"; - license = licenses.mit; - description = "Query metadatdata from sdists / bdists / installed packages"; - + description = "Query metadatdata from sdists, bdists or installed packages"; + homepage = "https://pythonhosted.org/pkginfo/"; longDescription = '' This package provides an API for querying the distutils metadata written in the PKG-INFO file inside a source distriubtion (an sdist) @@ -24,5 +26,7 @@ buildPythonPackage rec { *.egg-info stored in a “development checkout” (e.g, created by running setup.py develop). ''; + license = licenses.mit; + maintainers = with maintainers; [ ]; }; } From 33632479f8588671ec5e9e95def1d5b63a8621bc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Nov 2021 18:25:52 +0100 Subject: [PATCH 2/4] python3Packages.pkginfo: enable tests --- pkgs/development/python-modules/pkginfo/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pkginfo/default.nix b/pkgs/development/python-modules/pkginfo/default.nix index 19e8cddcb1ad..87f11d912345 100644 --- a/pkgs/development/python-modules/pkginfo/default.nix +++ b/pkgs/development/python-modules/pkginfo/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, pytestCheckHook }: buildPythonPackage rec { @@ -13,7 +14,13 @@ buildPythonPackage rec { sha256 = "sha256-ZRdf+iyAciBnOkHDcVc6yaHqGxn/1e75FiePQoMZk08="; }; - doCheck = false; # I don't know why, but with doCheck = true it fails. + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pkginfo" + ]; meta = with lib; { description = "Query metadatdata from sdists, bdists or installed packages"; From 3ef4ee2ec987188e85be0c90b2c3af7ceab0e096 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 22 Nov 2021 09:07:31 +0100 Subject: [PATCH 3/4] python3Packages.toggl-cli: fix build --- .../python-modules/toggl-cli/default.nix | 76 ++++++++++++++----- 1 file changed, 55 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/toggl-cli/default.nix b/pkgs/development/python-modules/toggl-cli/default.nix index 54f7e6ddf9ca..1bbac9ce9da1 100644 --- a/pkgs/development/python-modules/toggl-cli/default.nix +++ b/pkgs/development/python-modules/toggl-cli/default.nix @@ -1,12 +1,29 @@ -{ lib, buildPythonPackage, fetchPypi, pythonOlder, click -, click-completion, factory_boy, faker, inquirer, notify-py, pbr, pendulum -, ptable, pytestCheckHook, pytest-cov, pytest-mock, requests, twine -, validate-email }: +{ lib +, buildPythonPackage +, click +, click-completion +, factory_boy +, faker +, fetchPypi +, inquirer +, notify-py +, pbr +, pendulum +, ptable +, pytest-mock +, pytestCheckHook +, pythonOlder +, requests +, twine +, validate-email +}: buildPythonPackage rec { pname = "toggl-cli"; version = "2.4.2"; - disabled = pythonOlder "3.5"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { pname = "togglCli"; @@ -14,14 +31,39 @@ buildPythonPackage rec { sha256 = "1wgh231r16jyvaj1ch1pajvl9szflb4srs505pfdwdlqvz7rzww8"; }; + nativeBuildInputs = [ + pbr + twine + ]; + + propagatedBuildInputs = [ + click + click-completion + inquirer + notify-py + pbr + pendulum + ptable + requests + validate-email + ]; + + checkInputs = [ + pytestCheckHook + pytest-mock + faker + factory_boy + ]; + postPatch = '' substituteInPlace requirements.txt \ - --replace "notify-py==0.3.1" "notify-py>=0.3.1" + --replace "notify-py==0.3.1" "notify-py>=0.3.1" \ + --replace "click==7.1.2" "click>=7.1.2" \ + --replace "pbr==5.5.1" "pbr>=5.5.1" + substituteInPlace pytest.ini \ + --replace ' --cov toggl -m "not premium"' "" ''; - nativeBuildInputs = [ pbr twine ]; - checkInputs = [ pbr pytestCheckHook pytest-cov pytest-mock faker factory_boy ]; - preCheck = '' export TOGGL_API_TOKEN=your_api_token export TOGGL_PASSWORD=toggl_password @@ -36,22 +78,14 @@ buildPythonPackage rec { "test_now" ]; - propagatedBuildInputs = [ - click - click-completion - inquirer - notify-py - pendulum - ptable - requests - pbr - validate-email + pythonImportsCheck = [ + "toggl" ]; meta = with lib; { - homepage = "https://toggl.uhlir.dev/"; description = "Command line tool and set of Python wrapper classes for interacting with toggl's API"; + homepage = "https://toggl.uhlir.dev/"; license = licenses.mit; - maintainers = [ maintainers.mmahut ]; + maintainers = with maintainers; [ mmahut ]; }; } From 773e7702c1a8bb907fd3af5787e58a206c9213e8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 22 Nov 2021 09:19:10 +0100 Subject: [PATCH 4/4] python3Packages.typecode: disable failing test --- pkgs/development/python-modules/typecode/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/typecode/default.nix b/pkgs/development/python-modules/typecode/default.nix index fbd907365c22..16ee927e849b 100644 --- a/pkgs/development/python-modules/typecode/default.nix +++ b/pkgs/development/python-modules/typecode/default.nix @@ -15,6 +15,7 @@ buildPythonPackage rec { pname = "typecode"; version = "21.6.1"; + format = "setuptools"; src = fetchPypi { inherit pname version; @@ -43,6 +44,8 @@ buildPythonPackage rec { disabledTests = [ "TestFileTypesDataDriven" + # AssertionError: assert 'application/x-bytecode.python'... + "test_compiled_python_1" ]; pythonImportsCheck = [