python3Packages.conda: 4.3.16 -> 24.1.2
This commit is contained in:
parent
14d5b95cf6
commit
f4ab775434
51
pkgs/development/python-modules/conda/0001-conda_exe.patch
Normal file
51
pkgs/development/python-modules/conda/0001-conda_exe.patch
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
--- a/conda/base/context.py
|
||||||
|
+++ b/conda/base/context.py
|
||||||
|
@@ -754,7 +754,7 @@
|
||||||
|
|
||||||
|
@property
|
||||||
|
def conda_prefix(self):
|
||||||
|
- return abspath(sys.prefix)
|
||||||
|
+ return expand("~/.conda")
|
||||||
|
|
||||||
|
@property
|
||||||
|
@deprecated(
|
||||||
|
@@ -787,28 +787,17 @@
|
||||||
|
The vars can refer to each other if necessary since the dict is ordered.
|
||||||
|
None means unset it.
|
||||||
|
"""
|
||||||
|
- if context.dev:
|
||||||
|
- return {
|
||||||
|
- "CONDA_EXE": sys.executable,
|
||||||
|
- # do not confuse with os.path.join, we are joining paths with ; or : delimiters
|
||||||
|
- "PYTHONPATH": os.pathsep.join(
|
||||||
|
- (CONDA_SOURCE_ROOT, os.environ.get("PYTHONPATH", ""))
|
||||||
|
- ),
|
||||||
|
- "_CE_M": "-m",
|
||||||
|
- "_CE_CONDA": "conda",
|
||||||
|
- "CONDA_PYTHON_EXE": sys.executable,
|
||||||
|
- }
|
||||||
|
- else:
|
||||||
|
- bin_dir = "Scripts" if on_win else "bin"
|
||||||
|
- exe = "conda.exe" if on_win else "conda"
|
||||||
|
- # I was going to use None to indicate a variable to unset, but that gets tricky with
|
||||||
|
- # error-on-undefined.
|
||||||
|
- return {
|
||||||
|
- "CONDA_EXE": os.path.join(sys.prefix, bin_dir, exe),
|
||||||
|
- "_CE_M": "",
|
||||||
|
- "_CE_CONDA": "",
|
||||||
|
- "CONDA_PYTHON_EXE": sys.executable,
|
||||||
|
- }
|
||||||
|
+ import sys
|
||||||
|
+ return {
|
||||||
|
+ "CONDA_EXE": sys.executable,
|
||||||
|
+ # do not confuse with os.path.join, we are joining paths with ; or : delimiters
|
||||||
|
+ "PYTHONPATH": os.pathsep.join(
|
||||||
|
+ [CONDA_SOURCE_ROOT, os.environ.get("PYTHONPATH", "")] + [path for path in sys.path if "site-packages" in path]
|
||||||
|
+ ),
|
||||||
|
+ "_CE_M": "-m",
|
||||||
|
+ "_CE_CONDA": "conda",
|
||||||
|
+ "CONDA_PYTHON_EXE": sys.executable,
|
||||||
|
+ }
|
||||||
|
|
||||||
|
@memoizedproperty
|
||||||
|
def channel_alias(self):
|
|
@ -1,38 +1,83 @@
|
||||||
{ lib
|
{
|
||||||
, buildPythonPackage
|
lib,
|
||||||
, pythonAtLeast
|
buildPythonPackage,
|
||||||
, fetchPypi
|
pythonRelaxDepsHook,
|
||||||
, pycosat
|
hostPlatform,
|
||||||
, requests
|
fetchFromGitHub,
|
||||||
, ruamel-yaml
|
# build dependencies
|
||||||
, isPy3k
|
hatchling,
|
||||||
, enum34
|
hatch-vcs,
|
||||||
|
# runtime dependencies
|
||||||
|
archspec,
|
||||||
|
conda-libmamba-solver,
|
||||||
|
conda-package-handling,
|
||||||
|
distro,
|
||||||
|
jsonpatch,
|
||||||
|
packaging,
|
||||||
|
platformdirs,
|
||||||
|
pluggy,
|
||||||
|
pycosat,
|
||||||
|
requests,
|
||||||
|
ruamel-yaml,
|
||||||
|
tqdm,
|
||||||
|
truststore,
|
||||||
|
# runtime options
|
||||||
|
defaultEnvPath ? "~/.conda/envs", # default path to store conda environments
|
||||||
|
defaultPkgPath ? "~/.conda/pkgs", # default path to store download conda packages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Note: this installs conda as a library. The application cannot be used.
|
|
||||||
# This is likely therefore NOT what you're looking for.
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "conda";
|
pname = "conda";
|
||||||
version = "4.3.16";
|
version = "24.1.2";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
# this is a very outdated version of conda that isn't compatible with python 3.10+
|
src = fetchFromGitHub {
|
||||||
disabled = pythonAtLeast "3.10";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "a91ef821343dea3ba9670f3d10b36c1ace4f4c36d70c175d8fc8886e94285953";
|
owner = "conda";
|
||||||
|
repo = "conda";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-L/Y7Bb3R5YqXbjTN4CRPFnkgymVLrxuFmjVzpvt28dE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ pycosat requests ruamel-yaml ] ++ lib.optional (!isPy3k) enum34;
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
||||||
|
|
||||||
# No tests
|
build-system = [
|
||||||
doCheck = false;
|
hatchling
|
||||||
|
hatch-vcs
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
archspec
|
||||||
|
conda-libmamba-solver
|
||||||
|
conda-package-handling
|
||||||
|
distro
|
||||||
|
jsonpatch
|
||||||
|
packaging
|
||||||
|
platformdirs
|
||||||
|
pluggy
|
||||||
|
pycosat
|
||||||
|
requests
|
||||||
|
ruamel-yaml
|
||||||
|
tqdm
|
||||||
|
truststore
|
||||||
|
];
|
||||||
|
|
||||||
|
patches = [ ./0001-conda_exe.patch ];
|
||||||
|
|
||||||
|
makeWrapperArgs = [
|
||||||
|
"--set CONDA_EXE ${placeholder "out"}/bin/conda"
|
||||||
|
''--set-default CONDA_ENVS_PATH "${defaultEnvPath}"''
|
||||||
|
''--set-default CONDA_PKGS_DIRS "${defaultPkgPath}"''
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "conda" ];
|
||||||
|
|
||||||
|
# menuinst is currently not packaged
|
||||||
|
pythonRemoveDeps = lib.optionals (!hostPlatform.isWindows) [ "menuinst" ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "OS-agnostic, system-level binary package manager";
|
description = "OS-agnostic, system-level binary package manager";
|
||||||
homepage = "https://github.com/conda/conda";
|
homepage = "https://github.com/conda/conda";
|
||||||
license = lib.licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
|
maintainers = [ lib.maintainers.ericthemagician ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user