Merge pull request #330741 from emilazy/push-rlvumrtyxrmk

python3Packages.nose3: drop
This commit is contained in:
Emily
2024-08-02 16:31:00 +01:00
committed by GitHub
7 changed files with 99 additions and 168 deletions
@@ -1,42 +0,0 @@
{
lib,
buildPythonPackage,
coverage,
fetchPypi,
isPyPy,
isPy311,
python,
pythonAtLeast,
stdenv,
}:
buildPythonPackage rec {
pname = "nose3";
version = "1.3.8";
format = "setuptools";
# https://github.com/jayvdb/nose3/issues/5
disabled = pythonAtLeast "3.12";
src = fetchPypi {
inherit pname version;
hash = "sha256-diquIsrbiYsAudT0u7n46H+ODd5sSaiM0MVU9OWSW3Y=";
};
propagatedBuildInputs = [ coverage ];
# PyPy hangs for unknwon reason
# Darwin and python 3.11 fail at various assertions and I didn't find an easy way to find skip those tests
doCheck = !isPyPy && !stdenv.isDarwin && !isPy311;
checkPhase = ''
${python.pythonOnBuildForHost.interpreter} selftest.py
'';
meta = with lib; {
description = "Fork of nose v1 not using lib2to3 for compatibility with Python 3";
homepage = "https://github.com/jayvdb/nose3";
license = licenses.lgpl3;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}
@@ -1,45 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
nose3,
pythonOlder,
semver,
}:
buildPythonPackage rec {
pname = "pkutils";
version = "3.0.2";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "reubano";
repo = "pkutils";
rev = "refs/tags/v${version}";
hash = "sha256-AK+xX+LPz6IVLZedsqMUm7G28ue0s3pXgIzxS4EHHLE=";
};
pythonRelaxDeps = [ "semver" ];
propagatedBuildInputs = [ semver ];
nativeCheckInputs = [ nose3 ];
checkPhase = ''
runHook preCheck
nosetests
runHook postCheck
'';
pythonImportsCheck = [ "pkutils" ];
meta = with lib; {
description = "Python packaging utility library";
homepage = "https://github.com/reubano/pkutils/";
license = licenses.mit;
maintainers = with maintainers; [ drewrisinger ];
};
}
+34 -19
View File
@@ -1,7 +1,13 @@
{ lib, fetchFromGitHub, python311 }:
{
lib,
fetchFromGitHub,
fetchpatch2,
python3,
nginx,
}:
let
python = python311.override {
python = python3.override {
packageOverrides = self: super: {
pyparsing = super.pyparsing.overridePythonAttrs rec {
version = "2.4.7";
@@ -11,9 +17,7 @@ let
rev = "pyparsing_${version}";
sha256 = "14pfy80q2flgzjcx8jkracvnxxnr59kjzp3kdm5nh232gk1v6g6h";
};
nativeBuildInputs = [
super.setuptools
];
nativeBuildInputs = [ super.setuptools ];
};
};
};
@@ -21,10 +25,7 @@ in
python.pkgs.buildPythonApplication rec {
pname = "gixy";
version = "0.1.20";
format = "setuptools";
# package is only compatible with python 2.7 and 3.5+
disabled = with python.pkgs; !(pythonAtLeast "3.5" || isPy27);
pyproject = true;
# fetching from GitHub because the PyPi source is missing the tests
src = fetchFromGitHub {
@@ -34,21 +35,34 @@ python.pkgs.buildPythonApplication rec {
sha256 = "14arz3fjidb8z37m08xcpih1391varj8s0v3gri79z3qb4zq5k6b";
};
postPatch = ''
sed -ie '/argparse/d' setup.py
'';
patches = [
# Migrate tests to pytest
# https://github.com/yandex/gixy/pull/146
(fetchpatch2 {
url = "https://github.com/yandex/gixy/compare/6f68624a7540ee51316651bda656894dc14c9a3e...b1c6899b3733b619c244368f0121a01be028e8c2.patch";
hash = "sha256-6VUF2eQ2Haat/yk8I5qIXhHdG9zLQgEXJMLfe25OKEo=";
})
];
propagatedBuildInputs = with python.pkgs; [
build-system = [ python.pkgs.setuptools ];
dependencies = with python.pkgs; [
cached-property
configargparse
pyparsing
jinja2
nose3
setuptools
six
];
meta = with lib; {
nativeCheckInputs = [ python.pkgs.pytestCheckHook ];
pythonRemoveDeps = [ "argparse" ];
passthru = {
inherit (nginx.passthru) tests;
};
meta = {
description = "Nginx configuration static analyzer";
mainProgram = "gixy";
longDescription = ''
@@ -56,8 +70,9 @@ python.pkgs.buildPythonApplication rec {
The main goal of Gixy is to prevent security misconfiguration and automate flaw detection.
'';
homepage = "https://github.com/yandex/gixy";
license = licenses.mpl20;
maintainers = [ maintainers.willibutz ];
platforms = platforms.unix;
sourceProvenance = [ lib.sourceTypes.fromSource ];
license = lib.licenses.mpl20;
maintainers = [ lib.maintainers.willibutz ];
platforms = lib.platforms.unix;
};
}
+50 -41
View File
@@ -1,27 +1,34 @@
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, python3Packages
, perl
, zip
, gitMinimal
, ffmpeg
{
lib,
fetchFromGitHub,
installShellFiles,
python3Packages,
perl,
ffmpeg,
}:
let
inherit (python3Packages)
python pytest nose3 cryptography pyyaml requests mock requests-mock
python-dateutil setuptools;
buildPythonApplication
setuptools
requests
pysocks
cryptography
pyyaml
pytestCheckHook
mock
requests-mock
;
version = "4.97.1";
in
stdenv.mkDerivation rec {
buildPythonApplication {
pname = "svtplay-dl";
inherit version;
pyproject = true;
src = fetchFromGitHub {
owner = "spaam";
@@ -30,47 +37,49 @@ stdenv.mkDerivation rec {
hash = "sha256-9h3hHRRL7DKeCpEXL5w72hYi1nTS+a+x5e9ArMmVgYQ=";
};
pythonPaths = [ cryptography pyyaml requests ];
buildInputs = [ python perl python-dateutil setuptools ] ++ pythonPaths;
nativeBuildInputs = [ gitMinimal zip makeWrapper ];
nativeCheckInputs = [ nose3 pytest mock requests-mock ];
build-system = [ setuptools ];
postPatch = ''
substituteInPlace scripts/run-tests.sh \
--replace 'PYTHONPATH=lib' 'PYTHONPATH=lib:$PYTHONPATH'
dependencies = [
requests
pysocks
cryptography
pyyaml
];
sed -i '/def test_sublang2\?(/ i\ @unittest.skip("accesses network")' \
lib/svtplay_dl/tests/test_postprocess.py
nativeBuildInputs = [
# For `pod2man(1)`.
perl
installShellFiles
];
nativeCheckInputs = [
pytestCheckHook
mock
requests-mock
];
pytestFlagsArray = [
"--doctest-modules"
"lib"
];
postBuild = ''
make svtplay-dl.1
'';
makeFlags = [ "PREFIX=$(out)" "SYSCONFDIR=$(out)/etc" "PYTHON=${python.interpreter}" ];
postInstall = ''
wrapProgram "$out/bin/svtplay-dl" \
--prefix PATH : "${ffmpeg}" \
--prefix PYTHONPATH : "$PYTHONPATH"
installManPage svtplay-dl.1
makeWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}")
'';
doCheck = python3Packages.pythonOlder "3.12";
checkPhase = ''
runHook preCheck
sh scripts/run-tests.sh -2
runHook postCheck
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
postInstallCheck = ''
$out/bin/svtplay-dl --help > /dev/null
runHook postInstallCheck
'';
meta = with lib; {
meta = {
homepage = "https://github.com/spaam/svtplay-dl";
description = "Command-line tool to download videos from svtplay.se and other sites";
license = licenses.mit;
license = lib.licenses.mit;
platforms = lib.platforms.unix;
mainProgram = "svtplay-dl";
};
+13 -17
View File
@@ -1,29 +1,25 @@
{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication {
pname = "grin";
version = "1.3.0";
version = "1.3.0-unstable-2023-08-30";
namePrefix = "";
pyproject = true;
src = fetchFromGitHub {
owner = "matthew-brett";
repo = pname;
rev = "1.3.0";
hash = "sha256-exKUy7LaDtpq0rJLSuNYsIcynpB4QLtLIE6T/ncB7RQ=";
repo = "grin";
rev = "00e11ebf17bbb37dc33d282eac1282c0bcc07e82";
hash = "sha256-0lrCOXFb2v0hCxWd9O7ysbn8CjPd8NHOJhARYzJJcYg=";
};
patches = [
# https://github.com/matthew-brett/grin/pull/4
(fetchpatch {
name = "replace-nose-with-nose3.patch";
url = "https://github.com/matthew-brett/grin/commit/ba473fa4f5da1b337ee80d7d31772a4e41ffa62d.patch";
hash = "sha256-CnWHynKSsXYjSsTLdPuwpcIndrCdq3cQYS8teg5EM0A=";
})
];
build-system = [ python3Packages.setuptools ];
nativeCheckInputs = with python3Packages; [
nose3
];
nativeCheckInputs = [ python3Packages.pytestCheckHook ];
meta = {
homepage = "https://github.com/matthew-brett/grin";
+2
View File
@@ -327,6 +327,7 @@ mapAliases ({
net2grid = gridnet; # add 2022-04-22
nghttp2 = throw "in 1.52.0 removed deprecated python bindings."; # added 2023-06-08
ninja-python = ninja; # add 2022-08-03
nose3 = throw "nose3 has been removed since it is unmaintained and does not work with Python 3.12"; # added 2024-07-28
nosejs = throw "nosejs has been removed since it has not been maintained for 15 years and there are no dependent packages"; # added 2024-05-21
nose-cov = throw "nose-cov has been removed, it was archived and unmaintained since 2012"; # added 2024-05-21
nosexcover = throw "nosexcover has been removed since it has not been maintained and there are no dependent packages"; # added 2024-05-21
@@ -360,6 +361,7 @@ mapAliases ({
pdfposter = throw "pdfposter was promoted to a top-level attribute"; # Added 2023-06-29
pdfminer = pdfminer-six; # added 2022-05-25
pep257 = pydocstyle; # added 2022-04-12
pkutils = throw "pkutils was removed as it was unused and is not applicable to modern Python build tools"; # added 2024-07-28
poetry = throw "poetry was promoted to a top-level attribute, use poetry-core to build Python packages"; # added 2023-01-09
poetry2conda = throw "poetry2conda was promoted to a top-level attribute"; # Added 2022-10-02
Polygon3 = polygon3; # Added 2023-08-08
-4
View File
@@ -9144,8 +9144,6 @@ self: super: with self; {
nose2pytest = callPackage ../development/python-modules/nose2pytest { };
nose3 = callPackage ../development/python-modules/nose3 { };
notebook = callPackage ../development/python-modules/notebook { };
notebook-shim = callPackage ../development/python-modules/notebook-shim { };
@@ -10470,8 +10468,6 @@ self: super: with self; {
pyzipper = callPackage ../development/python-modules/pyzipper { };
pkutils = callPackage ../development/python-modules/pkutils { };
plac = callPackage ../development/python-modules/plac { };
plaid-python = callPackage ../development/python-modules/plaid-python { };