From a81e174c702b0c8874bd11d6c734b944a05367d2 Mon Sep 17 00:00:00 2001 From: zhangguowei <14744141+zhang-guowei0207@user.noreply.gitee.com> Date: Fri, 6 Feb 2026 08:17:06 +0000 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8RPATH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangguowei <14744141+zhang-guowei0207@user.noreply.gitee.com> --- python-pyproj.spec | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/python-pyproj.spec b/python-pyproj.spec index 9852f6c..01619d9 100644 --- a/python-pyproj.spec +++ b/python-pyproj.spec @@ -2,7 +2,7 @@ %global pypi_name pyproj %global _description %{expand: -ython wrapper to provide python interfaces to Proj. \ +Python wrapper to provide python interfaces to Proj. \ Performs cartographic transformations between geographic (Lat/Lon) \ and map projection (x/y) coordinates. Can also transform directly \ from one map projection coordinate system to another. \ @@ -28,6 +28,7 @@ BuildRequires: python3-wheel BuildRequires: python3-setuptools BuildRequires: python3-setuptools_scm BuildRequires: chrpath +BuildRequires: python-rpm-macros %description %_description @@ -47,19 +48,23 @@ Help documents for the %{name} API %autosetup -n %{pypi_name}-%{version} %build +# 设置编译标志,减少 RPATH 问题 +export CFLAGS="%{optflags} -Wl,--disable-new-dtags" +export LDFLAGS="-Wl,--disable-new-dtags,-z,now" %pyproject_build %install %pyproject_install +# 清理 Python 扩展模块中的 RPATH +find %{buildroot} -type f -name "*.so" -exec chrpath -d {} \; 2>/dev/null || true + %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{python3_sitearch}/pyproj/ %{python3_sitearch}/%{pypi_name}-%{version}.dist-info/ -%{_usr}/lib/debug/%{python3_sitearch}/pyproj/ %{_bindir}/pyproj -%{_usr}/src/debug/python-pyproj-*/ %files help %doc docs @@ -71,11 +76,4 @@ Help documents for the %{name} API Add is_deprecated and get_non_deprecated() to CRS Add runtime & compiled PROJ versions Add Windows system path to delvewheel add-path - Adds codespell to pre-commit hooks - -* Thu Mar 07 2024 jiangxinyu - 3.6.1-1 -- Update package to version 3.6.1 - Fixed typo 'ellisoidal' ->'ellipsoidal' - -* Fri Aug 18 2023 li-miaomiao_zhr - 3.6.0-1 -- Package init + Adds codespell to pre-commit hooks \ No newline at end of file -- Gitee