Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions pkgs/development/python-modules/pluggy/default.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
{ buildPythonPackage
, lib
, fetchPypi
, fetchFromGitHub
, setuptools-scm
, pythonOlder
, importlib-metadata
, callPackage
}:

buildPythonPackage rec {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pname = "pluggy";
version = "1.0.0";
version = "1.2.0";
format = "pyproject";

src = fetchPypi {
inherit pname version;
sha256 = "4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159";
src = fetchFromGitHub {
owner = "pytest-dev";
repo = "pluggy";
rev = "refs/tags/${version}";
hash = "sha256-SzJu7ITdmUgusn8sz6fRBpxTMQncWIViP5NCAj4q4GM=";
};

nativeBuildInputs = [ setuptools-scm ];

env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
importlib-metadata
];

# To prevent infinite recursion with pytest
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
};

meta = {
changelog = "https://github.com/pytest-dev/pluggy/blob/${src.rev}/CHANGELOG.rst";
description = "Plugin and hook calling mechanisms for Python";
homepage = "https://github.com/pytest-dev/pluggy";
license = lib.licenses.mit;
Expand Down
20 changes: 20 additions & 0 deletions pkgs/development/python-modules/pluggy/tests.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ buildPythonPackage
, pluggy
, pytestCheckHook
}:

buildPythonPackage {
pname = "pluggy-tests";
inherit (pluggy) version;
format = "other";

inherit (pluggy) src;

dontBuild = true;
dontInstall = true;

nativeCheckInputs = [
pluggy
pytestCheckHook
];
}

This file was deleted.

18 changes: 7 additions & 11 deletions pkgs/development/python-modules/virtualenv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
, hatch-vcs
, hatchling
, importlib-metadata
, importlib-resources
, platformdirs
, pytest-freezegun
, pytest-mock
, pytest-timeout
, pytestCheckHook
, time-machine
}:

buildPythonPackage rec {
pname = "virtualenv";
version = "20.19.0";
version = "20.24.0";
format = "pyproject";

disabled = pythonOlder "3.6";
disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
hash = "sha256-N6ZAuoLtQLImWZxSLUEeS+XtszmgwN4DDA3HtkbWFZA=";
hash = "sha256-4qfO+dqIDWk7kz23ZUNndU8U4gZQ3GDo7nOFVx+Fk6M=";
};

nativeBuildInputs = [
Expand All @@ -40,23 +40,19 @@ buildPythonPackage rec {
distlib
filelock
platformdirs
] ++ lib.optionals (pythonOlder "3.7") [
importlib-resources
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];

patches = lib.optionals (isPy27) [
./0001-Check-base_prefix-and-base_exec_prefix-for-Python-2.patch
];

nativeCheckInputs = [
cython
flaky
pytest-freezegun
pytest-mock
pytest-timeout
pytestCheckHook
] ++ lib.optionals (!isPyPy) [
time-machine
];

preCheck = ''
Expand Down Expand Up @@ -91,7 +87,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "A tool to create isolated Python environments";
homepage = "http://www.virtualenv.org";
changelog = "https://github.com/pypa/virtualenv/releases/tag/${version}";
changelog = "https://github.com/pypa/virtualenv/blob/${version}/docs/changelog.rst";
license = licenses.mit;
maintainers = with maintainers; [ goibhniu ];
};
Expand Down