update build requirements for python-numpy; rebuilt build with current python3 [release 2.0.1-2mamba;Mon Oct 21 2024]

This commit is contained in:
Silvan Calarco 2024-10-22 09:43:02 +02:00
parent c8fb7c3631
commit 68340adfc3
3 changed files with 125 additions and 45 deletions

View File

@ -1,15 +0,0 @@
https://bugs.gentoo.org/show_bug.cgi?id=467322
Patch-by: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
Fixes pkgconfig name for new json-c (since 0.11)
--- brushlib/SConscript.ORIG 2012-12-31 18:03:38.000000000 +0100
+++ brushlib/SConscript 2013-04-26 11:47:27.008232199 +0200
@@ -73,7 +73,7 @@
env.Append(CPPPATH='./')
-pkg_deps = ['json']
+pkg_deps = ['json-c']
libs = ['m']
linkflags = []

View File

@ -0,0 +1,98 @@
From 032a155b72f2b021f66a994050d83f07342d04af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Wed, 9 Nov 2022 11:24:33 +0700
Subject: [PATCH] python: fix for Python 3.11
- python 3 always open in universal mode, U is default mode in 3.0,
and removed in 3.11
- mypaint doesn't use ld?n?gettext, so bind_textdomain_codeset isn't
needed, that function is deprecated in 3.8 and is no-ops in 3.10 and
removed in 3.11
---
lib/gettext_setup.py | 25 ++-----------------------
setup.py | 2 +-
2 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/lib/gettext_setup.py b/lib/gettext_setup.py
index d4ce60a20..72cfaeddc 100644
--- a/lib/gettext_setup.py
+++ b/lib/gettext_setup.py
@@ -82,13 +82,11 @@ def init_gettext(localepath):
# yanked in over GI.
# https://bugzilla.gnome.org/show_bug.cgi?id=574520#c26
bindtextdomain = None
- bind_textdomain_codeset = None
textdomain = None
# Try the POSIX/Linux way first.
try:
bindtextdomain = locale.bindtextdomain
- bind_textdomain_codeset = locale.bind_textdomain_codeset
textdomain = locale.textdomain
except AttributeError:
logger.warning(
@@ -117,12 +115,6 @@ def init_gettext(localepath):
ctypes.c_char_p,
)
bindtextdomain.restype = ctypes.c_char_p
- bind_textdomain_codeset = libintl.bind_textdomain_codeset
- bind_textdomain_codeset.argtypes = (
- ctypes.c_char_p,
- ctypes.c_char_p,
- )
- bind_textdomain_codeset.restype = ctypes.c_char_p
textdomain = libintl.textdomain
textdomain.argtypes = (
ctypes.c_char_p,
@@ -177,35 +169,22 @@ def init_gettext(localepath):
# complete set from the same source.
# Required for translatable strings in GtkBuilder XML
# to be translated.
- if bindtextdomain and bind_textdomain_codeset and textdomain:
+ if bindtextdomain and textdomain:
assert os.path.exists(path)
assert os.path.isdir(path)
if sys.platform == 'win32':
p = bindtextdomain(dom.encode('utf-8'), path.encode('utf-8'))
- c = bind_textdomain_codeset(
- dom.encode('utf-8'), codeset.encode('utf-8')
- )
else:
p = bindtextdomain(dom, path)
- c = bind_textdomain_codeset(dom, codeset)
logger.debug("C bindtextdomain(%r, %r): %r", dom, path, p)
- logger.debug(
- "C bind_textdomain_codeset(%r, %r): %r",
- dom, codeset, c,
- )
# Call the implementations in Python's standard gettext module
# too. This has proper cross-platform support, but it only
# initializes the native Python "gettext" module.
# Required for marked strings in Python source to be translated.
# See http://docs.python.org/release/2.7/library/locale.html
p = gettext.bindtextdomain(dom, path)
- c = gettext.bind_textdomain_codeset(dom, codeset)
logger.debug("Python bindtextdomain(%r, %r): %r", dom, path, p)
- logger.debug(
- "Python bind_textdomain_codeset(%r, %r): %r",
- dom, codeset, c,
- )
- if bindtextdomain and bind_textdomain_codeset and textdomain:
+ if bindtextdomain and textdomain:
if sys.platform == 'win32':
d = textdomain(defaultdom.encode('utf-8'))
else:
diff --git a/setup.py b/setup.py
index 204236765..046db5880 100644
--- a/setup.py
+++ b/setup.py
@@ -679,7 +679,7 @@ def _install_script(self, src, header):
self.announce("installing %s as %s" % (src, targ_basename), level=2)
if self.dry_run:
return []
- with open(src, "rU") as in_fp:
+ with open(src, "r") as in_fp:
with open(targ, "w") as out_fp:
line = in_fp.readline().rstrip()
if line.startswith("#!"):

View File

@ -1,26 +1,39 @@
Name: mypaint
Version: 2.0.1
Release: 1mamba
Release: 2mamba
Summary: A fast and easy open-source graphics application for digital painters
Group: Graphical Desktop/Applications/Graphics
Vendor: openmamba
Distribution: openmamba
Packager: Ercole 'ercolinux' Carpanetto <ercole69@gmail.com>
URL: http://mypaint.intilinux.com/
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://mypaint.org/
Source: https://github.com/mypaint/mypaint.git/v%{version}/mypaint-%{version}.tar.bz2
Source1: mypaint.desktop
#Source2: http://david.revoy.free.fr/forums/Mypaint/Mypaint_Deevad-brush-V2.zip
Patch0: mypaint-1.1.0-json-c-0.11.patch
Patch0: mypaint-2.0.1-python-3.11.patch
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libat-spi2-core-devel
BuildRequires: libcairo-devel
BuildRequires: libgcc
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libglib-devel
BuildRequires: libgomp-devel
BuildRequires: libgtk3-devel
BuildRequires: libharfbuzz-devel
BuildRequires: libjson-c-devel
BuildRequires: liblcms2-devel
BuildRequires: libmypaint-devel
BuildRequires: libpango-devel
BuildRequires: libpng-devel
BuildRequires: libstdc++6-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: libjson-c-devel >= 0.12
BuildRequires: python-numeric
BuildRequires: swig
Requires: mypaint-brushes
Requires: pycairo-py3
Requires: pygobject-py3
Requires: python-numpy-py3
%description
MyPaint is a fast and easy open-source graphics application for digital painters. It lets you focus on the art instead of the program. You work on your canvas with minimum distractions, bringing up the interface only when you need it.Main features:
@ -30,21 +43,11 @@ MyPaint is a fast and easy open-source graphics application for digital painters
* unlimited canvas (you never have to resize)
* basic layer support
%package devel
Group: Development/Libraries
Summary: Static libraries and headers for lib%{name}
Requires: %{name} = %{version}-%{release}
%description devel
MyPaint is a fast and easy open-source graphics application for digital painters. It lets you focus on the art instead of the program. You work on your canvas with minimum distractions, bringing up the interface only when you need it.
This packages provides static libraries and headers needed for development.
%debug_package
%prep
%setup -q
#%patch0 -p0
cp %{SOURCE1} desktop/
%patch 0 -p1 -b .python-3.11
%build
CFLAGS="%{optflags}" %{__python3} setup.py build
@ -54,23 +57,13 @@ CFLAGS="%{optflags}" %{__python3} setup.py build
%{__python3} setup.py install \
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{python3_inc} \
--install-lib=%{python3_sitearch} \
--record=%{name}.filelist
#unzip %{SOURCE2}
#install -D Mypaint_Deevad-brush-V2/* %{buildroot}%{_datadir}/mypaint/brushes/
install -D desktop/mypaint.desktop %{buildroot}%{_datadir}/applications/
%find_lang %{name}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
gtk-update-icon-cache -tf %{_datadir}/icons/hicolor
:
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/mypaint
@ -90,9 +83,13 @@ gtk-update-icon-cache -tf %{_datadir}/icons/hicolor
%{_datadir}/icons/hicolor/24x24/actions/mypaint-*.svg
%{_datadir}/icons/hicolor/scalable/apps/org.mypaint.MyPaint.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.mypaint.MyPaint-symbolic.svg
%{_libdir}/python3.7/site-packages/*
%dir %{_prefix}/lib/mypaint
%{_prefix}/lib/mypaint/*
%changelog
* Mon Oct 21 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.1-2mamba
- update build requirements for python-numpy; rebuilt build with current python3
* Sun Sep 06 2020 Automatic Build System <autodist@mambasoft.it> 2.0.1-1mamba
- automatic version update by autodist