Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe713a5e1a | ||
|
|
2d66c05852 | ||
|
|
fe4f3921b7 | ||
|
|
40c87d87b8 |
3 changed files with 127 additions and 104 deletions
72
conda-py3.10.patch
Normal file
72
conda-py3.10.patch
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
diff -up conda-4.6.14/conda/common/path.py.~1~ conda-4.6.14/conda/common/path.py
|
||||
--- conda-4.6.14/conda/common/path.py.~1~ 2022-03-09 12:35:19.791274886 -0700
|
||||
+++ conda-4.6.14/conda/common/path.py 2022-03-09 12:35:34.386212879 -0700
|
||||
@@ -180,6 +180,8 @@ def get_python_site_packages_short_path(
|
||||
return 'lib/python%s/site-packages' % py_ver
|
||||
|
||||
|
||||
+_VERSION_REGEX = re.compile(r"[0-9]+\.[0-9]+")
|
||||
+
|
||||
def get_major_minor_version(string, with_dot=True):
|
||||
# returns None if not found, otherwise two digits as a string
|
||||
# should work for
|
||||
@@ -189,10 +191,31 @@ def get_major_minor_version(string, with
|
||||
# - lib/python34/site-packages/
|
||||
# the last two are dangers because windows doesn't have version information there
|
||||
assert isinstance(string, string_types)
|
||||
- digits = tuple(take(2, (c for c in string if c.isdigit())))
|
||||
- if len(digits) == 2:
|
||||
- return '.'.join(digits) if with_dot else ''.join(digits)
|
||||
- return None
|
||||
+ if string.startswith("lib/python"):
|
||||
+ pythonstr = string.split("/")[1]
|
||||
+ start = len("python")
|
||||
+ if len(pythonstr) < start + 2:
|
||||
+ return None
|
||||
+ maj_min = pythonstr[start], pythonstr[start+1:]
|
||||
+ elif string.startswith("bin/python"):
|
||||
+ pythonstr = string.split("/")[1]
|
||||
+ start = len("python")
|
||||
+ if len(pythonstr) < start + 3:
|
||||
+ return None
|
||||
+ assert pythonstr[start+1] == "."
|
||||
+ maj_min = pythonstr[start], pythonstr[start+2:]
|
||||
+ else:
|
||||
+ match = _VERSION_REGEX.match(string)
|
||||
+ if match:
|
||||
+ version = match.group(0).split(".")
|
||||
+ maj_min = version[0], version[1]
|
||||
+ else:
|
||||
+ digits = "".join([c for c in string if c.isdigit()])
|
||||
+ if len(digits) < 2:
|
||||
+ return None
|
||||
+ maj_min = digits[0], digits[1:]
|
||||
+
|
||||
+ return ".".join(maj_min) if with_dot else "".join(maj_min)
|
||||
|
||||
|
||||
def get_bin_directory_short_path():
|
||||
diff -up conda-4.6.14/tests/common/test_path.py.~1~ conda-4.6.14/tests/common/test_path.py
|
||||
--- conda-4.6.14/tests/common/test_path.py.~1~ 2019-04-17 14:21:14.000000000 -0600
|
||||
+++ conda-4.6.14/tests/common/test_path.py 2022-03-09 12:35:34.361212985 -0700
|
||||
@@ -118,8 +118,20 @@ def test_get_major_minor_version_no_dot(
|
||||
assert get_major_minor_version("lib/python34/site-packages/") == "3.4"
|
||||
assert get_major_minor_version("python3") is None
|
||||
|
||||
+ assert get_major_minor_version("3.10.0") == "3.10"
|
||||
+ assert get_major_minor_version("310") == "3.10"
|
||||
+ assert get_major_minor_version("bin/python3.10") == "3.10"
|
||||
+ assert get_major_minor_version("lib/python310/site-packages/") == "3.10"
|
||||
+ assert get_major_minor_version("python3") is None
|
||||
+
|
||||
assert get_major_minor_version("3.5.2", False) == "35"
|
||||
assert get_major_minor_version("27", False) == "27"
|
||||
assert get_major_minor_version("bin/python2.7", False) == "27"
|
||||
assert get_major_minor_version("lib/python34/site-packages/", False) == "34"
|
||||
assert get_major_minor_version("python3", False) is None
|
||||
+
|
||||
+ assert get_major_minor_version("3.10.0", False) == "310"
|
||||
+ assert get_major_minor_version("310", False) == "310"
|
||||
+ assert get_major_minor_version("bin/python3.10", False) == "310"
|
||||
+ assert get_major_minor_version("lib/python310/site-packages/", False) == "310"
|
||||
+ assert get_major_minor_version("python3", False) is None
|
||||
157
conda.spec
157
conda.spec
|
|
@ -1,9 +1,8 @@
|
|||
%{!?_with_bootstrap: %global bootstrap 0}
|
||||
%global with_python2 0%{?fedora} && 0%{?fedora} < 30
|
||||
|
||||
Name: conda
|
||||
Version: 4.6.13
|
||||
Release: 1%{?dist}
|
||||
Version: 4.6.14
|
||||
Release: 2%{?dist}
|
||||
Summary: Cross-platform, Python-agnostic binary package manager
|
||||
|
||||
License: BSD and ASL 2.0 and LGPLv2+ and MIT
|
||||
|
|
@ -20,20 +19,23 @@ Patch1: conda_gateways_disk_create.patch
|
|||
Patch2: setup.patch
|
||||
Patch3: conda-tests.patch
|
||||
|
||||
Patch10001: 0001-Fix-toolz-imports.patch
|
||||
Patch10002: 0002-Adjust-ruamel.yaml-imports.patch
|
||||
Patch10003: 0003-Drop-fs-path-encoding-manipulation-under-python2.patch
|
||||
Patch10004: 0004-Do-not-try-to-run-usr-bin-python.patch
|
||||
Patch10005: 0005-Fix-failing-tests-in-test_api.py.patch
|
||||
Patch11: 0001-Fix-toolz-imports.patch
|
||||
Patch12: 0002-Adjust-ruamel.yaml-imports.patch
|
||||
Patch13: 0003-Drop-fs-path-encoding-manipulation-under-python2.patch
|
||||
Patch14: 0004-Do-not-try-to-run-usr-bin-python.patch
|
||||
Patch15: 0005-Fix-failing-tests-in-test_api.py.patch
|
||||
# Backport https://github.com/conda/conda/pull/10970
|
||||
Patch16: conda-py3.10.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: python%{python3_pkgversion}-conda = %{version}-%{release}
|
||||
# Removed upstream in favour of calling "conda activate" in version 4.4.0
|
||||
Obsoletes: conda-activate < 4.4
|
||||
Obsoletes: conda-activate < 4.4
|
||||
|
||||
%?python_enable_dependency_generator
|
||||
|
||||
BuildRequires: /usr/bin/pathfix.py
|
||||
BuildRequires: sed
|
||||
|
||||
%global _description \
|
||||
|
|
@ -45,61 +47,13 @@ entirely in Python.
|
|||
|
||||
%description %_description
|
||||
|
||||
%global _py2_reqs \
|
||||
python2-crypto \
|
||||
python2-pycosat >= 0.6.3 \
|
||||
python2-ruamel-yaml \
|
||||
python2-mock \
|
||||
python2-responses
|
||||
|
||||
%global _py2_bund \
|
||||
bundled(python2-appdirs) = 1.2.0 \
|
||||
bundled(python2-auxlib) \
|
||||
bundled(python2-boltons) = 16.5.1 \
|
||||
bundled(python2-six) = 1.10.0 \
|
||||
bundled(python2-toolz) = 0.8.2 \
|
||||
bundled(python2-urllib3) = 1.19.1
|
||||
|
||||
%global py2_reqs %(c="%_py2_reqs"; echo "$c" | xargs)
|
||||
%global py3_reqs %(c="%_py2_reqs"; echo "$c" | sed s/python2/python%{python3_pkgversion}/ | xargs)
|
||||
|
||||
%global py2_bund %(c="%_py2_bund"; echo "$c" | xargs)
|
||||
%global py3_bund %(c="%_py2_bund"; echo "$c" | sed s/python2/python%{python3_pkgversion}/ | xargs)
|
||||
|
||||
%if %with_python2
|
||||
%package -n python2-conda
|
||||
Summary: %{summary}
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: %py2_reqs
|
||||
BuildRequires: python2-requests
|
||||
# When this is present, vendored toolz should not be used
|
||||
%if 0%{?fedora}
|
||||
# EPEL does not have new enough cytoolz
|
||||
BuildRequires: python2-cytoolz
|
||||
%endif
|
||||
# For tests
|
||||
BuildRequires: python2-enum34
|
||||
BuildRequires: python2-futures
|
||||
BuildRequires: python2-pytest-cov
|
||||
|
||||
# Keep manual Requires for now:
|
||||
# automatically generated Requires are missing a few modules.
|
||||
# Having both is still useful because the automatic ones have
|
||||
# version requirements.
|
||||
Requires: %py2_reqs
|
||||
Requires: python2-enum34
|
||||
Requires: python2-futures
|
||||
%if 0%{?fedora}
|
||||
# EPEL does not have new enough cytoolz
|
||||
Requires: python2-cytoolz
|
||||
%endif
|
||||
Provides: %py2_bund
|
||||
%{?python_provide:%python_provide python2-conda}
|
||||
|
||||
%description -n python2-conda %_description
|
||||
%endif
|
||||
%global _py3_reqs \
|
||||
python%{python3_pkgversion}-crypto \
|
||||
python%{python3_pkgversion}-distro >= 1.0.4 \
|
||||
python%{python3_pkgversion}-pycosat >= 0.6.3 \
|
||||
python%{python3_pkgversion}-requests \
|
||||
python%{python3_pkgversion}-ruamel-yaml
|
||||
%global py3_reqs %(c="%_py3_reqs"; echo "$c" | xargs)
|
||||
|
||||
%package -n python%{python3_pkgversion}-conda
|
||||
Summary: %{summary}
|
||||
|
|
@ -107,24 +61,30 @@ Summary: %{summary}
|
|||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
BuildRequires: %py3_reqs
|
||||
BuildRequires: python%{python3_pkgversion}-requests
|
||||
BuildRequires: python%{python3_pkgversion}-yaml
|
||||
# When this is present, vendored toolz should not be used
|
||||
%if 0%{?fedora}
|
||||
# EPEL does not have new enough cytoolz
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
# EPEL7 does not have new enough cytoolz
|
||||
BuildRequires: python%{python3_pkgversion}-cytoolz >= 0.8.2
|
||||
%endif
|
||||
# For tests
|
||||
BuildRequires: python%{python3_pkgversion}-mock
|
||||
BuildRequires: python%{python3_pkgversion}-pytest-cov
|
||||
BuildRequires: python%{python3_pkgversion}-responses
|
||||
|
||||
Requires: %py3_reqs
|
||||
Requires: python%{python3_pkgversion}-requests
|
||||
Requires: python%{python3_pkgversion}-yaml
|
||||
%if 0%{?fedora}
|
||||
# EPEL does not have new enough cytoolz
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
# EPEL7 does not have new enough cytoolz
|
||||
Requires: python%{python3_pkgversion}-cytoolz >= 0.8.2
|
||||
%endif
|
||||
Provides: %py3_bund
|
||||
Provides: bundled(python%{python3_pkgversion}-appdirs) = 1.2.0
|
||||
Provides: bundled(python%{python3_pkgversion}-auxlib)
|
||||
Provides: bundled(python%{python3_pkgversion}-boltons) = 16.5.1
|
||||
Provides: bundled(python%{python3_pkgversion}-six) = 1.10.0
|
||||
Provides: bundled(python%{python3_pkgversion}-toolz) = 0.8.2
|
||||
Provides: bundled(python%{python3_pkgversion}-urllib3) = 1.19.1
|
||||
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-conda}
|
||||
|
||||
%description -n python%{python3_pkgversion}-conda %_description
|
||||
|
|
@ -147,34 +107,26 @@ sed -r -i 's/\btest_list\b/_disabled_\0/' tests/test_cli.py
|
|||
sed -r -i '1 {/#![/]usr[/]bin[/]env/d}' conda/_vendor/appdirs.py
|
||||
|
||||
# Replaced by cytools, byte compilation fails under python3.7
|
||||
%if 0%{?fedora}
|
||||
# EPEL does not have new enough cytoolz
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
# EPEL7 does not have new enough cytoolz
|
||||
# We need to keep __init__.py which does the dispatch between vendored and non-vendored
|
||||
rm conda/_vendor/toolz/[a-zA-Z]*
|
||||
%endif
|
||||
|
||||
# Use system versions
|
||||
rm -r conda/_vendor/distro.py
|
||||
find conda -name \*.py | xargs sed -i -e 's/^\( *\)from .*_vendor\.\(\(distro\).*\) import/\1from \2 import/'
|
||||
|
||||
|
||||
%build
|
||||
# build conda executable
|
||||
%define py_setup utils/setup-testing.py
|
||||
%if %with_python2
|
||||
%py2_build
|
||||
%endif
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
# install conda executable
|
||||
%define py_setup utils/setup-testing.py
|
||||
%if 0%{?fedora}
|
||||
%if %with_python2
|
||||
%py2_install
|
||||
%endif
|
||||
%py3_install
|
||||
%else
|
||||
%py3_install
|
||||
%if %with_python2
|
||||
%py2_install
|
||||
%endif
|
||||
%endif
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/conda/condarc.d
|
||||
cat >%{buildroot}%{_datadir}/conda/condarc.d/defaults.yaml <<EOF
|
||||
|
|
@ -192,6 +144,14 @@ sed -r -i '1i CONDA_EXE=%{_bindir}/conda' %{buildroot}/etc/profile.d/conda.sh
|
|||
sed -r -i -e '1i set _CONDA_EXE=%{_bindir}/conda\nset _CONDA_ROOT=' \
|
||||
-e 's/CONDA_PFX=.*/CONDA_PFX=/' %{buildroot}/etc/profile.d/conda.csh
|
||||
|
||||
# install the scripts
|
||||
mkdir -p %{buildroot}%{python3_sitelib}/conda/shell
|
||||
cp -rp conda/shell/{bin,etc} %{buildroot}%{python3_sitelib}/conda/shell/
|
||||
|
||||
# fix shebangs
|
||||
pathfix.py -i %{__python3} -pn %{name} %{buildroot}%{python3_sitelib}/conda/shell/bin/conda
|
||||
|
||||
|
||||
%check
|
||||
export PATH=%{buildroot}%{_bindir}:$PATH
|
||||
|
||||
|
|
@ -202,11 +162,6 @@ py.test-%{python3_version} -vv -m "not integration" \
|
|||
-k 'not test_create_advanced_pip' \
|
||||
--ignore tests/core/test_initialize.py %{?el7:|| :}
|
||||
|
||||
%if %with_python2
|
||||
# Run python2 tests later, since they are more likely to fail stupidly.
|
||||
# Some tests fail because py2 does not default to utf-8.
|
||||
py.test-%{python2_version} -vv -m "not integration" -k "not test_unicode"
|
||||
%endif
|
||||
|
||||
%files
|
||||
%{_bindir}/conda
|
||||
|
|
@ -214,18 +169,6 @@ py.test-%{python2_version} -vv -m "not integration" -k "not test_unicode"
|
|||
/etc/profile.d/conda.sh
|
||||
/etc/profile.d/conda.csh
|
||||
|
||||
%if %with_python2
|
||||
%files -n python2-conda
|
||||
%license LICENSE.txt
|
||||
%doc CHANGELOG.md README.rst
|
||||
%{python2_sitelib}/conda/
|
||||
%{python2_sitelib}/conda_env/
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%exclude %{python2_sitelib}/test_data/
|
||||
%{_localstatedir}/cache/conda/
|
||||
%{_datadir}/conda/
|
||||
%endif
|
||||
|
||||
%files -n python%{python3_pkgversion}-conda
|
||||
%license LICENSE.txt
|
||||
%doc CHANGELOG.md README.rst
|
||||
|
|
@ -238,6 +181,14 @@ py.test-%{python2_version} -vv -m "not integration" -k "not test_unicode"
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 09 2022 Orion Poplawski <orion@cora.nwra.com> - 4.6.14-2
|
||||
- Backport fix for python 3.10 support
|
||||
|
||||
* Sun Dec 15 2019 Orion Poplawski <orion@nwra.com> - 4.6.14-1
|
||||
- Update 4.6.14
|
||||
- Make "conda shell.bash hook" work (bz#1737165)
|
||||
- Unbundle more libraries
|
||||
|
||||
* Tue Apr 16 2019 Orion Poplawski <orion@nwra.com> - 4.6.13-1
|
||||
- Update to 4.6.13
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (conda-4.6.13.tar.gz) = 8f0ad3cac26e88740ffc94f980546827388151746d8fad133b131dc893d8bb4a2840fb4f08e6c98759b1d919e8d24b05c93acd76bfc16ae5d487f699ea5ce20d
|
||||
SHA512 (conda-4.6.14.tar.gz) = 046faac0f82e3cd2f417725fe6074ccc561e126c0af11a3a46a3f32f7a535d11d3d337fbdc1f5a61ca8dc2235f6421ac8425b1a7aa7ce326cb9e2e6c18ce5a10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue