Use local mirrors for pip
This commit is contained in:
parent
3deead6495
commit
97af46142e
5
pip.huaweicloud.conf
Normal file
5
pip.huaweicloud.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[global]
|
||||||
|
index-url = https://repo.huaweicloud.com/repository/pypi/simple
|
||||||
|
|
||||||
|
[install]
|
||||||
|
trusted-host = https://repo.huaweicloud.com
|
||||||
8
pip.loongarch.conf
Normal file
8
pip.loongarch.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[global]
|
||||||
|
timeout = 60
|
||||||
|
index-url = https://pypi.loongnix.cn/loongson/pypi
|
||||||
|
extra-index-url = https://pypi.org/simple
|
||||||
|
[install]
|
||||||
|
trusted-host =
|
||||||
|
pypi.loongnix.cn
|
||||||
|
pypi.org
|
||||||
@ -6,11 +6,13 @@ pip is the package installer for Python. You can use pip to install packages fro
|
|||||||
%global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d})
|
%global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d})
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 23.1.2
|
Version: 23.1.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A tool for installing and managing Python packages
|
Summary: A tool for installing and managing Python packages
|
||||||
License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
|
License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
|
||||||
URL: http://www.pip-installer.org
|
URL: http://www.pip-installer.org
|
||||||
Source0: %{pypi_source}
|
Source0: %{pypi_source}
|
||||||
|
Source1: pip.huaweicloud.conf
|
||||||
|
Source2: pip.loongarch.conf
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Patch1: remove-existing-dist-only-if-path-conflicts.patch
|
Patch1: remove-existing-dist-only-if-path-conflicts.patch
|
||||||
Patch6000: dummy-certifi.patch
|
Patch6000: dummy-certifi.patch
|
||||||
@ -103,9 +105,16 @@ rm %{buildroot}%{python3_sitelib}/pip-%{version}.dist-info/RECORD
|
|||||||
mkdir -p %{buildroot}%{python_wheeldir}
|
mkdir -p %{buildroot}%{python_wheeldir}
|
||||||
install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
||||||
|
|
||||||
|
# Set default pip mirror via pip.conf
|
||||||
|
%ifarch loongarch64
|
||||||
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pip.conf
|
||||||
|
%else
|
||||||
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pip.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-%{srcname}
|
%files -n python%{python3_pkgversion}-%{srcname}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
|
%config(noreplace) %{_sysconfdir}/pip.conf
|
||||||
%{_bindir}/pip
|
%{_bindir}/pip
|
||||||
%{_bindir}/pip3
|
%{_bindir}/pip3
|
||||||
%{_bindir}/pip-3*
|
%{_bindir}/pip-3*
|
||||||
@ -124,6 +133,9 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
|||||||
%{python_wheeldir}/%{python_wheelname}
|
%{python_wheeldir}/%{python_wheelname}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jul 30 2023 Funda Wang <fundawang@yeah.net> - 23.1.2-2
|
||||||
|
- Use local mirrors for pip
|
||||||
|
|
||||||
* Fri Jun 9 2023 dillon chen <dillon.chen@gmail.com> - 23.1.2-1
|
* Fri Jun 9 2023 dillon chen <dillon.chen@gmail.com> - 23.1.2-1
|
||||||
- upgrade version to 23.1.2
|
- upgrade version to 23.1.2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user