python312Packages.cx-freeze: 8.0.0 -> 8.2.0
Changelog: https://github.com/marcelotduarte/cx_Freeze/releases/tag/8.2.0
This commit is contained in:
@@ -2,39 +2,48 @@
|
|||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
|
||||||
|
# build-system
|
||||||
|
setuptools,
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
filelock,
|
||||||
|
packaging,
|
||||||
|
tomli,
|
||||||
|
typing-extensions,
|
||||||
|
|
||||||
distutils,
|
distutils,
|
||||||
fetchPypi,
|
|
||||||
pythonOlder,
|
pythonOlder,
|
||||||
ncurses,
|
ncurses,
|
||||||
packaging,
|
|
||||||
setuptools,
|
|
||||||
filelock,
|
|
||||||
patchelf,
|
patchelf,
|
||||||
tomli,
|
|
||||||
importlib-metadata,
|
|
||||||
typing-extensions,
|
|
||||||
dmgbuild,
|
dmgbuild,
|
||||||
|
|
||||||
|
# tests
|
||||||
|
ensureNewerSourcesForZipFilesHook,
|
||||||
|
pytest-mock,
|
||||||
|
pytestCheckHook,
|
||||||
|
versionCheckHook,
|
||||||
|
writableTmpDirAsHomeHook,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "cx-freeze";
|
pname = "cx-freeze";
|
||||||
version = "8.0.0";
|
version = "8.2.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
src = fetchFromGitHub {
|
||||||
|
owner = "marcelotduarte";
|
||||||
src = fetchPypi {
|
repo = "cx_Freeze";
|
||||||
pname = "cx_freeze";
|
tag = version;
|
||||||
inherit version;
|
hash = "sha256-xrSMW7z3XblwAuaC18Rju/XuBZvU+5+xAW+MO6u32EE=";
|
||||||
hash = "sha256-gOH4e7FS7Q+X98ZDXgI31Eqt6Zl5knxGJ3cTIqJdVQ0=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
patches = [
|
||||||
sed -i /patchelf/d pyproject.toml
|
# ValueError: '/nix/store/33ajdw6s479bg0ydhk0zqrxi6p989gbl-python3.12-pytest-8.3.5/lib/python3.12/site-packages'
|
||||||
# Build system requirements
|
# is not in the subpath of '/nix/store/fqm9bqqlmaqqr02qbalm1bazp810qfiw-python3-3.12.9'
|
||||||
substituteInPlace pyproject.toml \
|
./fix-tests-relative-path.patch
|
||||||
--replace-fail "setuptools>=70.1,<76" "setuptools"
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
build-system = [
|
build-system = [
|
||||||
setuptools
|
setuptools
|
||||||
@@ -42,9 +51,12 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
buildInputs = [ ncurses ];
|
buildInputs = [ ncurses ];
|
||||||
|
|
||||||
|
pythonRemoveDeps = [ "patchelf" ];
|
||||||
|
|
||||||
dependencies =
|
dependencies =
|
||||||
[
|
[
|
||||||
distutils
|
distutils
|
||||||
|
filelock
|
||||||
packaging
|
packaging
|
||||||
setuptools
|
setuptools
|
||||||
]
|
]
|
||||||
@@ -52,11 +64,11 @@ buildPythonPackage rec {
|
|||||||
tomli
|
tomli
|
||||||
]
|
]
|
||||||
++ lib.optionals (pythonOlder "3.10") [
|
++ lib.optionals (pythonOlder "3.10") [
|
||||||
importlib-metadata
|
|
||||||
typing-extensions
|
typing-extensions
|
||||||
]
|
]
|
||||||
++ lib.optional stdenv.hostPlatform.isLinux filelock
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin dmgbuild;
|
dmgbuild
|
||||||
|
];
|
||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
"--prefix"
|
"--prefix"
|
||||||
@@ -65,14 +77,81 @@ buildPythonPackage rec {
|
|||||||
(lib.makeBinPath [ patchelf ])
|
(lib.makeBinPath [ patchelf ])
|
||||||
];
|
];
|
||||||
|
|
||||||
# Fails to find Console even though it exists on python 3.x
|
pythonImportsCheck = [
|
||||||
doCheck = false;
|
"cx_Freeze"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
nativeCheckInputs = [
|
||||||
|
pytest-mock
|
||||||
|
pytestCheckHook
|
||||||
|
writableTmpDirAsHomeHook
|
||||||
|
versionCheckHook
|
||||||
|
];
|
||||||
|
versionCheckProgram = "${placeholder "out"}/bin/cxfreeze";
|
||||||
|
versionCheckProgramArg = "--version";
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
rm -rf cx_Freeze
|
||||||
|
'';
|
||||||
|
|
||||||
|
disabledTests =
|
||||||
|
[
|
||||||
|
# Require internet access
|
||||||
|
"test_bdist_appimage_target_name"
|
||||||
|
"test_bdist_appimage_target_name_and_version"
|
||||||
|
"test_bdist_appimage_target_name_and_version_none"
|
||||||
|
|
||||||
|
# Try to install a module: ValueError: ZIP does not support timestamps before 1980
|
||||||
|
"test___main__"
|
||||||
|
"test_bdist_appimage_simple"
|
||||||
|
"test_bdist_appimage_skip_build"
|
||||||
|
"test_bdist_deb_simple_pyproject"
|
||||||
|
"test_bdist_rpm_simple_pyproject"
|
||||||
|
"test_build"
|
||||||
|
"test_build_constants"
|
||||||
|
"test_build_exe_advanced"
|
||||||
|
"test_build_exe_asmodule"
|
||||||
|
"test_ctypes"
|
||||||
|
"test_cxfreeze"
|
||||||
|
"test_cxfreeze_debug_verbose"
|
||||||
|
"test_cxfreeze_deprecated_behavior"
|
||||||
|
"test_cxfreeze_deprecated_option"
|
||||||
|
"test_cxfreeze_include_path"
|
||||||
|
"test_cxfreeze_target_name_not_isidentifier"
|
||||||
|
"test_excludes"
|
||||||
|
"test_executable_namespace"
|
||||||
|
"test_executable_rename"
|
||||||
|
"test_executables"
|
||||||
|
"test_freezer_zip_filename"
|
||||||
|
"test_install"
|
||||||
|
"test_install_pyproject"
|
||||||
|
"test_multiprocessing"
|
||||||
|
"test_not_found_icon"
|
||||||
|
"test_parser"
|
||||||
|
"test_sqlite"
|
||||||
|
"test_ssl"
|
||||||
|
"test_tz"
|
||||||
|
"test_valid_icon"
|
||||||
|
"test_zip_exclude_packages"
|
||||||
|
"test_zip_include_packages"
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
|
# error: Path /nix/store/xzjghvsg4fhr2vv6h4scihsdrgk4i76w-python3-3.12.9/lib/libpython3.12.dylib
|
||||||
|
# is not a path referenced from DarwinFile
|
||||||
|
"test_bdist_dmg"
|
||||||
|
"test_bdist_dmg_custom_layout"
|
||||||
|
"test_bdist_mac"
|
||||||
|
"test_plist_items"
|
||||||
|
|
||||||
|
# AssertionError: assert names != []
|
||||||
|
"test_freezer_default_bin_includes"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
description = "Set of scripts and modules for freezing Python scripts into executables";
|
description = "Set of scripts and modules for freezing Python scripts into executables";
|
||||||
homepage = "https://marcelotduarte.github.io/cx_Freeze/";
|
homepage = "https://marcelotduarte.github.io/cx_Freeze";
|
||||||
changelog = "https://github.com/marcelotduarte/cx_Freeze/releases/tag/${version}";
|
changelog = "https://github.com/marcelotduarte/cx_Freeze/releases/tag/${version}";
|
||||||
license = licenses.psfl;
|
license = lib.licenses.psfl;
|
||||||
maintainers = [ ];
|
maintainers = [ ];
|
||||||
mainProgram = "cxfreeze";
|
mainProgram = "cxfreeze";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||||
|
index 04400a17..1facf55d 100644
|
||||||
|
--- a/tests/conftest.py
|
||||||
|
+++ b/tests/conftest.py
|
||||||
|
@@ -46,9 +46,7 @@ class TempPackage:
|
||||||
|
# environment
|
||||||
|
self.system_path: Path = Path(os.getcwd())
|
||||||
|
self.system_prefix: Path = Path(sys.prefix)
|
||||||
|
- self.relative_site = Path(pytest.__file__).parent.parent.relative_to(
|
||||||
|
- self.system_prefix
|
||||||
|
- )
|
||||||
|
+ self.relative_site = Path(pytest.__file__).resolve().parent.parent
|
||||||
|
|
||||||
|
# make a temporary directory and set it as current
|
||||||
|
name = request.node.name
|
||||||
Reference in New Issue
Block a user