python312Packages.zipfile2: 0.0.12 -> 0.0.12-unstable-2024-09-28, python312Packages.okonomiyaki: 1.4.0 -> 2.0.0 (#351662)

This commit is contained in:
Fabian Affolter
2024-10-28 08:36:45 +01:00
committed by GitHub
3 changed files with 94 additions and 62 deletions
@@ -1,64 +1,86 @@
{
buildPythonPackage,
stdenv,
fetchFromGitHub,
lib,
stdenv,
attrs,
buildPythonPackage,
distro,
fetchFromGitHub,
parameterized,
jsonschema,
six,
zipfile2,
hypothesis,
mock,
packaging,
pytestCheckHook,
pythonOlder,
setuptools,
testfixtures,
pythonAtLeast,
zipfile2,
}:
buildPythonPackage rec {
pname = "okonomiyaki";
version = "1.4.0";
format = "setuptools";
version = "2.0.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "enthought";
repo = pname;
repo = "okonomiyaki";
rev = "refs/tags/${version}";
hash = "sha256-MEll1H7l41m8uz2/WK/Ilm7Dubg0uqYwe+ZgakO1aXQ=";
hash = "sha256-JQZhw0H4iSdxoyS6ODICJz1vAZsOISQitX7wTgSS1xc=";
};
propagatedBuildInputs = [
distro
attrs
jsonschema
six
zipfile2
];
postPatch = ''
# Fixed for >= 2.0.0
substituteInPlace setup.cfg \
--replace-fail "long_description_content_type = rst" "long_description_content_type = text/x-rst"
'';
build-system = [ setuptools ];
optional-dependencies = {
all = [
attrs
distro
jsonschema
zipfile2
];
platforms = [
attrs
distro
];
formats = [
attrs
distro
jsonschema
zipfile2
];
};
nativeCheckInputs = [
packaging
parameterized
pytestCheckHook
testfixtures
] ++ lib.flatten (builtins.attrValues optional-dependencies);
preCheck =
''
substituteInPlace okonomiyaki/runtimes/tests/test_runtime.py \
--replace 'runtime_info = PythonRuntime.from_running_python()' 'raise unittest.SkipTest() #'
--replace-fail 'runtime_info = PythonRuntime.from_running_python()' 'raise unittest.SkipTest() #'
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace okonomiyaki/platforms/tests/test_pep425.py \
--replace 'self.assertEqual(platform_tag, self.tag.platform)' 'raise unittest.SkipTest()'
--replace-fail 'self.assertEqual(platform_tag, self.tag.platform)' 'raise unittest.SkipTest()'
'';
checkInputs = [
hypothesis
mock
packaging
testfixtures
];
pythonImportsCheck = [ "okonomiyaki" ];
meta = with lib; {
homepage = "https://github.com/enthought/okonomiyaki";
description = "Experimental library aimed at consolidating a lot of low-level code used for Enthought's eggs";
homepage = "https://github.com/enthought/okonomiyaki";
changelog = "https://github.com/enthought/okonomiyaki/releases/tag/${version}";
maintainers = with maintainers; [ genericnerdyusername ];
license = licenses.bsd3;
broken = pythonAtLeast "3.12"; # multiple tests are failing
};
}
@@ -1,42 +1,34 @@
{
buildPythonPackage,
fetchFromGitHub,
writeText,
lib,
attrs,
buildPythonPackage,
fetchFromGitHub,
mock,
okonomiyaki,
pytestCheckHook,
pythonOlder,
pyyaml,
setuptools,
six,
}:
let
version = "0.9.0";
versionFile = writeText "simplesat_ver" ''
version = '${version}'
full_version = '${version}'
git_revision = '0000000000000000000000000000000000000000'
is_released = True
msi_version = '${version}.000'
version_info = (${lib.versions.major version}, ${lib.versions.minor version}, ${lib.versions.patch version}, 'final', 0)
'';
in
buildPythonPackage rec {
pname = "simplesat";
inherit version;
version = "0.9.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "enthought";
repo = "sat-solver";
rev = "refs/tags/v${version}";
hash = "sha256-8sUOV42MLM3otG3EKvVzKKGAUpSlaTj850QZxZa62bE=";
hash = "sha256-/fBnpf1DtaF+wQYZztcB8Y20/ZMYxrF3fH5qRsMucL0=";
};
preConfigure = ''
cp ${versionFile} simplesat/_version.py
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "version = file: VERSION" "version = ${version}"
'';
build-system = [ setuptools ];
@@ -47,20 +39,26 @@ buildPythonPackage rec {
six
];
pythonImportsCheck = [ "simplesat" ];
nativeCheckInputs = [
mock
pytestCheckHook
pyyaml
];
pythonImportsCheck = [ "simplesat" ];
preCheck = ''
substituteInPlace simplesat/tests/test_pool.py \
--replace-fail "assertRaisesRegexp" "assertRaisesRegex"
'';
pytestFlagsArray = [ "simplesat/tests" ];
meta = with lib; {
homepage = "https://github.com/enthought/sat-solver";
description = "Prototype for SAT-based dependency handling";
maintainers = with maintainers; [ genericnerdyusername ];
homepage = "https://github.com/enthought/sat-solver";
changelog = "https://github.com/enthought/sat-solver/blob/v${version}/CHANGES.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ genericnerdyusername ];
};
}
@@ -1,31 +1,43 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
lib,
pythonAtLeast,
pytestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "zipfile2";
version = "0.0.12";
format = "setuptools";
version = "0.0.12-unstable-2024-09-28";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "cournape";
repo = pname;
rev = "v${version}";
hash = "sha256-BwcEgW4XrQqz0Jmtbyxf8q0mWTJXv2dL3Tk7N/IYuMI=";
repo = "zipfile2";
#rev = "refs/tags/v${version}";
rev = "8823f7253772e5c5811343306a591c00c764c6d0";
hash = "sha256-jDOyIj0sQS1dIsar4nyk5V2mme3Zc6VTms49/4n93ho=";
};
patches = [ ./no-setuid.patch ];
build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "zipfile2" ];
disabledTests = [
# PermissionError: [Errno 1] Operation not ...
"test_extract"
];
meta = with lib; {
homepage = "https://github.com/cournape/zipfile2";
description = "Backwards-compatible improved zipfile class";
maintainers = with maintainers; [ genericnerdyusername ];
homepage = "https://github.com/cournape/zipfile2";
changelog = "https://github.com/itziakos/zipfile2/releases/tag/v${version}";
license = licenses.psfl;
broken = pythonAtLeast "3.12"; # tests are failing because the signature of ZipInfo._decodeExtra changed
maintainers = with maintainers; [ genericnerdyusername ];
};
}