Merge pull request #265256 from natsukium/line-profiler

python311Packages.line-profiler: 4.0.2 -> 4.1.2; rename from line_profiler
This commit is contained in:
OTABI Tomoya
2023-11-12 03:40:00 +09:00
committed by GitHub
5 changed files with 137 additions and 12 deletions
@@ -1,19 +1,19 @@
{ lib
, buildPythonPackage
, fetchPypi
, cython
, cython_3
, isPyPy
, ipython
, python
, scikit-build
, cmake
, pythonOlder
, pytestCheckHook
, ubelt
}:
buildPythonPackage rec {
pname = "line-profiler";
version = "4.0.2";
version = "4.1.2";
format = "setuptools";
disabled = pythonOlder "3.6" || isPyPy;
@@ -21,22 +21,23 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "line_profiler";
inherit version;
hash = "sha256-JejJ1CSNxIkFgBhR/4p1ucdIJ6CHHRGNEQTY5D1/sPw=";
hash = "sha256-qlZXiw/1p1b+GAs/2nvWfCe71Hiz0BJGEtjPAOSiHfI=";
};
nativeBuildInputs = [
cython
cython_3
cmake
scikit-build
];
propagatedBuildInputs = [
ipython
];
passthru.optional-dependencies = {
ipython = [ ipython ];
};
nativeCheckInputs = [
pytestCheckHook
];
ubelt
] ++ passthru.optional-dependencies.ipython;
dontUseCmakeConfigure = true;
@@ -44,8 +45,9 @@ buildPythonPackage rec {
rm -f _line_profiler.c
'';
checkPhase = ''
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s .
preCheck = ''
rm -r line_profiler
export PATH=$out/bin:$PATH
'';
pythonImportsCheck = [
@@ -0,0 +1,70 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, setuptools
, wheel
, numpy
, python-dateutil
, xxhash
, pytestCheckHook
, requests
, xdoctest
}:
buildPythonPackage rec {
pname = "ubelt";
version = "1.3.4";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Erotemic";
repo = "ubelt";
rev = "refs/tags/v${version}";
hash = "sha256-pvCmmdPRLupMUCiOvfa+JTX8NPFZ/UcXSPEaaDG3eTk=";
};
nativeBuildInputs = [
setuptools
wheel
];
passthru.optional-dependencies = {
optional = [
numpy
python-dateutil
xxhash
];
};
nativeCheckInputs = [
pytestCheckHook
requests
xdoctest
];
preCheck = ''
export HOME=$TMPDIR
'';
disabledTests = lib.optionals stdenv.isDarwin [
# fail due to sandbox environment
"CacheStamp.expired"
"userhome"
];
pythonImportsCheck = [ "ubelt" ];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "A Python utility library with a stdlib like feel and extra batteries. Paths, Progress, Dicts, Downloads, Caching, Hashing: ubelt makes it easy";
homepage = "https://github.com/Erotemic/ubelt";
changelog = "https://github.com/Erotemic/ubelt/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ natsukium ];
};
}
@@ -0,0 +1,48 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, setuptools
, wheel
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "xdoctest";
version = "1.1.2";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Erotemic";
repo = "xdoctest";
rev = "refs/tags/v${version}";
hash = "sha256-yTu5ldr9TkpYRP8hjgUPpexBVLjaK2gfPvISjMJLY74=";
};
nativeBuildInputs = [
setuptools
wheel
];
nativeCheckInputs = [
pytestCheckHook
];
preCheck = ''
export HOME=$TMPDIR
export PATH=$out/bin:$PATH
'';
pythonImportsCheck = [ "xdoctest" ];
meta = with lib; {
description = "A rewrite of Python's builtin doctest module (with pytest plugin integration) with AST instead of REGEX";
homepage = "https://github.com/Erotemic/xdoctest";
changelog = "https://github.com/Erotemic/xdoctest/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ natsukium ];
mainProgram = "xdoctest";
};
}
+1
View File
@@ -221,6 +221,7 @@ mapAliases ({
lazr_delegates = lazr-delegates; # added 2023-11-03
lazy_imports = lazy-imports; # added 2023-10-13
lektor = throw "lektor has been promoted to a top-level attribute"; # added 2023-08-01
line_profiler = line-profiler; # added 2023-11-04
logilab_astng = throw "logilab-astng has not been released since 2013 and is unmaintained"; # added 2022-11-29
logilab_common = logilab-common; # added 2022-11-21
loo-py = loopy; # added 2022-05-03
+5 -1
View File
@@ -6336,7 +6336,7 @@ self: super: with self; {
lineedit = callPackage ../development/python-modules/lineedit { };
line_profiler = callPackage ../development/python-modules/line_profiler { };
line-profiler = callPackage ../development/python-modules/line-profiler { };
linetable = callPackage ../development/python-modules/linetable { };
@@ -15159,6 +15159,8 @@ self: super: with self; {
uasiren = callPackage ../development/python-modules/uasiren { };
ubelt = callPackage ../development/python-modules/ubelt { };
uc-micro-py = callPackage ../development/python-modules/uc-micro-py { };
ucsmsdk = callPackage ../development/python-modules/ucsmsdk { };
@@ -15789,6 +15791,8 @@ self: super: with self; {
xdis = callPackage ../development/python-modules/xdis { };
xdoctest = callPackage ../development/python-modules/xdoctest { };
xdot = callPackage ../development/python-modules/xdot {
inherit (pkgs) graphviz;
};