!20 delete useless files and support python3.10
From: @eaglegai Reviewed-by: @yanan-rock Signed-off-by: @yanan-rock
This commit is contained in:
commit
787ece826d
33
backport-support-3.10.patch
Normal file
33
backport-support-3.10.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 09b9701a17618939fa0746ff532449f933213a68 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||||
|
Date: Thu, 15 Apr 2021 11:32:15 +0200
|
||||||
|
Subject: [PATCH] Python modules check: Assert exit code, not empty output
|
||||||
|
|
||||||
|
Distutils is deprecated in Python 3.10+:
|
||||||
|
https://www.python.org/dev/peps/pep-0632/
|
||||||
|
|
||||||
|
When importing it, there is a warning:
|
||||||
|
|
||||||
|
DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
|
||||||
|
|
||||||
|
The configure script falsely assumed this is an error.
|
||||||
|
Instead, we now check for the exit code, which is more explicit.
|
||||||
|
|
||||||
|
In the long term, we need to migrate away from distutils, this is a stopgap measure only.
|
||||||
|
---
|
||||||
|
Bindings/Python/bindings.m4 | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Bindings/Python/bindings.m4 b/Bindings/Python/bindings.m4
|
||||||
|
index 784418f0c..ee28525fc 100644
|
||||||
|
--- a/Bindings/Python/bindings.m4
|
||||||
|
+++ b/Bindings/Python/bindings.m4
|
||||||
|
@@ -40,7 +40,7 @@ else
|
||||||
|
for python_module in sys distutils.sysconfig
|
||||||
|
do
|
||||||
|
python_error="`"${PYTHON}" -c "import ${python_module};" 2>&1`"
|
||||||
|
- if test -n "${python_error}"
|
||||||
|
+ if test $? -ne 0
|
||||||
|
then
|
||||||
|
AC_MSG_WARN([Python module not found: ${python_module}: ${python_error}])
|
||||||
|
PYTHON_OK=false
|
||||||
16
brltty.spec
16
brltty.spec
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
Name: brltty
|
Name: brltty
|
||||||
Version: 6.1
|
Version: 6.1
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: Braille display driver for Linux/Unix
|
Summary: Braille display driver for Linux/Unix
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://brltty.app/
|
URL: http://brltty.app/
|
||||||
@ -21,7 +21,9 @@ Patch0: brltty-6.1-loadLibrary.patch
|
|||||||
Patch1: brltty-5.0-libspeechd.patch
|
Patch1: brltty-5.0-libspeechd.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRequires: brltty tcl-brltty byacc glibc-kernheaders bluez-libs-devel systemd gettext
|
Patch2: backport-support-3.10.patch
|
||||||
|
|
||||||
|
BuildRequires: byacc glibc-kernheaders bluez-libs-devel systemd gettext
|
||||||
BuildRequires: python3-devel autoconf at-spi2-core-devel alsa-lib-devel
|
BuildRequires: python3-devel autoconf at-spi2-core-devel alsa-lib-devel
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
|
|
||||||
@ -163,8 +165,6 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a
|
|||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
cp -p %{name}.lang ../
|
cp -p %{name}.lang ../
|
||||||
cp -a %{_libdir}/libbrlapi.so.* %{buildroot}%{_libdir}
|
|
||||||
cp -a %{_libdir}/tcl8.6/brlapi-* %{buildroot}%{_libdir}/tcl8.6
|
|
||||||
|
|
||||||
/usr/bin/2to3 -wn ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
|
/usr/bin/2to3 -wn ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
|
||||||
sed -i 's|/usr/bin/python|/usr/bin/python3|g' ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
|
sed -i 's|/usr/bin/python|/usr/bin/python3|g' ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
|
||||||
@ -244,7 +244,6 @@ fi
|
|||||||
|
|
||||||
%files -n tcl-%{name}
|
%files -n tcl-%{name}
|
||||||
%{tcl_sitearch}/brlapi-%{api_ver}
|
%{tcl_sitearch}/brlapi-%{api_ver}
|
||||||
%{tcl_sitearch}/brlapi-0.6.7
|
|
||||||
|
|
||||||
%files -n python3-%{name}
|
%files -n python3-%{name}
|
||||||
%{python3_sitearch}/brlapi.cpython-*.so
|
%{python3_sitearch}/brlapi.cpython-*.so
|
||||||
@ -269,6 +268,13 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 15 2022 gaihuiying <eaglegai@163.com> - 6.1-5
|
||||||
|
- Type:bugfix
|
||||||
|
- Id:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:delete useless files
|
||||||
|
fix to support python3.10
|
||||||
|
|
||||||
* Thu Jul 22 2021 lijingyuan <lijingyuan3@huawei.com> - 6.1-4
|
* Thu Jul 22 2021 lijingyuan <lijingyuan3@huawei.com> - 6.1-4
|
||||||
- Type:requirement
|
- Type:requirement
|
||||||
- Id:NA
|
- Id:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user