forked from pool/python-wxPython
Accepting request 944031 from home:bnavigator:branches:X11:wxWidgets
- Reduce complexity by not rewriting subpackages at all. Multibuild flavors now must be a superset of all existing python3 flavors. - The difference of a single whitespace character is significant OBS-URL: https://build.opensuse.org/request/show/944031 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=31
This commit is contained in:
@@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 5 11:12:25 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Reduce complexity by not rewriting subpackages at all.
|
||||||
|
Multibuild flavors now must be a superset of all existing
|
||||||
|
python3 flavors.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 4 22:28:51 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- The difference of a single whitespace character is significant
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 4 13:58:38 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Tue Jan 4 13:58:38 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@@ -26,17 +26,21 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%flavor" == ""
|
||||||
|
# factory-auto requires the main build_flavor to match the specfile name
|
||||||
%define pprefix python
|
%define pprefix python
|
||||||
%define psuffix %{nil}
|
%define python_module() no-build-without-multibuild-flavor
|
||||||
%if 0%{suse_version} >= 1550
|
ExclusiveArch: donotbuild
|
||||||
# Tumbleweed has a varying number of python3 flavors. Ideally, the flavor
|
%else
|
||||||
# selection here and in _multibuild is in sync with the Factory prjconf
|
|
||||||
# definition for pythons, but if it is not, we build missing flavors in -other
|
|
||||||
# and do not build flavors which are not yet or not anymore in the buildset.
|
|
||||||
%define pprefix %flavor
|
%define pprefix %flavor
|
||||||
%define psuffix -mb
|
%if 0%{suse_version} >= 1599
|
||||||
%if "%flavor" != "python36" || %{with test}
|
# Tumbleweed has a varying number of python3 flavors. The flavor
|
||||||
# No numpy for Python 3.6
|
# selection here and in _multibuild must be kept in sync with the Factory
|
||||||
|
# prjconf definition for pythons. If a skip is missing, all builds fail.
|
||||||
|
# Extraneous build_flavors and skips are excluded automatically so future
|
||||||
|
# additions can be included here early and old flavors can be removed some time
|
||||||
|
# after the global drop in Factory.
|
||||||
|
%if "%flavor" != "python36"
|
||||||
%define skip_python36 1
|
%define skip_python36 1
|
||||||
%endif
|
%endif
|
||||||
%if "%flavor" != "python38"
|
%if "%flavor" != "python38"
|
||||||
@@ -48,31 +52,30 @@
|
|||||||
%if "%flavor" != "python310"
|
%if "%flavor" != "python310"
|
||||||
%define skip_python310 1
|
%define skip_python310 1
|
||||||
%endif
|
%endif
|
||||||
%if "%flavor" == ""
|
%else
|
||||||
%define pprefix python
|
# SLE/Leap: python3 only
|
||||||
%define psuffix -other
|
%if "%flavor" != "python3"
|
||||||
|
%define pythons %{nil}
|
||||||
|
%else
|
||||||
|
%define pythons python3
|
||||||
|
%define python3_provides %{nil}
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
# The obs server-side interpreter cannot use lua or rpm shrink
|
# The obs server-side interpreter cannot use lua or rpm shrink
|
||||||
%if "%pythons" == "" || "%pythons" == " " || "%pythons" == " " || "%pythons" == " " || "%flavor" == "python3"
|
%if "%pythons" == "" || "%pythons" == " " || "%pythons" == " " || "%pythons" == " " || "%pythons" == " "
|
||||||
ExclusiveArch: donotbuild
|
ExclusiveArch: donotbuild
|
||||||
%define python_module() all-python-flavors-skipped-in-flavorless-multibuild
|
%define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version}
|
||||||
%endif
|
|
||||||
%else
|
%else
|
||||||
# The SLE/Leap python3 package is built without subpackage rewriting in its own flavor
|
%define python_files() -n %flavor-%{**}
|
||||||
%if "%flavor" == "python3"
|
%define python_module() %flavor-%{**}
|
||||||
%define pprefix python3
|
%define python_exec python%{expand:%%%{flavor}_bin_suffix}
|
||||||
%define pythons python3
|
%define python_version %{expand:%%%{flavor}_version}
|
||||||
%define python_files() -n python3-%{**}
|
%define python_sitearch %{expand:%%%{flavor}_sitearch}
|
||||||
%define python_module() python3-%{**}
|
%define python_provides %{expand:%%%{flavor}_provides}
|
||||||
%define python_version %python3_version
|
|
||||||
%define python_sitearch %python3_sitearch
|
|
||||||
%else
|
|
||||||
ExclusiveArch: donotbuild
|
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define plainpython python
|
|
||||||
|
|
||||||
Name: %{pprefix}-wxPython%{psuffix}
|
Name: %{pprefix}-wxPython
|
||||||
Version: 4.1.1
|
Version: 4.1.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: The "Phoenix" variant of the wxWidgets Python bindings
|
Summary: The "Phoenix" variant of the wxWidgets Python bindings
|
||||||
@@ -121,6 +124,18 @@ BuildRequires: pkgconfig(webkit2gtk-4.0)
|
|||||||
BuildRequires: pkgconfig(x11)
|
BuildRequires: pkgconfig(x11)
|
||||||
BuildRequires: pkgconfig(xtst)
|
BuildRequires: pkgconfig(xtst)
|
||||||
%endif
|
%endif
|
||||||
|
Requires: %{pprefix}-six
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun):update-alternatives
|
||||||
|
Conflicts: %{pprefix}-wxWidgets
|
||||||
|
Provides: %{pprefix}-wxWidgets = %{version}
|
||||||
|
%if "%{python_provides}" != ""
|
||||||
|
# for TW primary flavor provider
|
||||||
|
Conflicts: %{python_provides}-wxWidgets
|
||||||
|
Provides: %{python_provides}-wxPython = %{version}-%{release}
|
||||||
|
Provides: %{python_provides}-wxWidgets = %{version}
|
||||||
|
Obsoletes: %{python_provides}-wxPython < %{version}-%{release}
|
||||||
|
%endif
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module numpy}
|
BuildRequires: %{python_module numpy}
|
||||||
BuildRequires: %{python_module pytest-xdist}
|
BuildRequires: %{python_module pytest-xdist}
|
||||||
@@ -132,16 +147,6 @@ BuildRequires: wxWidgets-lang
|
|||||||
BuildRequires: xorg-x11-server
|
BuildRequires: xorg-x11-server
|
||||||
BuildRequires: pkgconfig(cppunit)
|
BuildRequires: pkgconfig(cppunit)
|
||||||
%endif
|
%endif
|
||||||
%if 0%{suse_version} >= 1550
|
|
||||||
%define python_subpackage_only 1
|
|
||||||
%python_subpackages
|
|
||||||
%else
|
|
||||||
Requires: %{pprefix}-six
|
|
||||||
Requires(post): update-alternatives
|
|
||||||
Requires(postun):update-alternatives
|
|
||||||
Conflicts: %{pprefix}-wxWidgets
|
|
||||||
Provides: %{pprefix}-wxWidgets = %{version}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Phoenix is a reimplementation of wxPython. Like the "classic"
|
Phoenix is a reimplementation of wxPython. Like the "classic"
|
||||||
@@ -156,42 +161,18 @@ platform specific code.
|
|||||||
Summary: Languages for package %{name}
|
Summary: Languages for package %{name}
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: %{plainpython}(abi) = %python_version
|
Requires: python(abi) = %python_version
|
||||||
Supplements: (bundle-lang-other and %{name})
|
Supplements: (bundle-lang-other and %{name})
|
||||||
Provides: %{name}-lang-all = %{version}
|
Provides: %{name}-lang-all = %{version}
|
||||||
|
%if "%{python_provides}" != ""
|
||||||
|
# for TW primary flavor provider
|
||||||
|
Provides: %{python_provides}-wxPython-lang = %{version}-%{release}
|
||||||
|
Obsoletes: %{python_provides}-wxPython-lang < %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description lang
|
%description lang
|
||||||
Provides translations to the package %{name}.
|
Provides translations to the package %{name}.
|
||||||
|
|
||||||
%package -n python-wxPython%{?nosub}
|
|
||||||
# extra definition for %%python_subpackage_only mechanism, keep in sync with main definitions.
|
|
||||||
Summary: The "Phoenix" variant of the wxWidgets Python bindings
|
|
||||||
Requires: python-six
|
|
||||||
Requires(post): update-alternatives
|
|
||||||
Requires(postun):update-alternatives
|
|
||||||
Conflicts: python-wxWidgets
|
|
||||||
Provides: python-wxWidgets = %{version}
|
|
||||||
|
|
||||||
%description -n python-wxPython
|
|
||||||
Phoenix is a reimplementation of wxPython. Like the "classic"
|
|
||||||
wxPython, Phoenix wraps the wxWidgets C++ toolkit and provides access
|
|
||||||
to the user interface portions of the wxWidgets API, enabling Python
|
|
||||||
applications to have a GUI on Windows, macOS or Unix-like systems,
|
|
||||||
with a native look and feel and requiring very little (if any)
|
|
||||||
platform specific code.
|
|
||||||
|
|
||||||
%package -n python-wxPython-lang
|
|
||||||
# We cannot use %%lang_package here. Editra translations use noarch incompatible path.
|
|
||||||
Summary: Languages for package %{pprefix}-wxPython
|
|
||||||
Group: System/Libraries
|
|
||||||
Requires: python-wxPython = %{version}
|
|
||||||
Requires: %{plainpython}(abi) = %python_version
|
|
||||||
Supplements: (bundle-lang-other and python-wxPython)
|
|
||||||
Provides: python-wxPython-lang-all = %{version}
|
|
||||||
|
|
||||||
%description -n python-wxPython-lang
|
|
||||||
Provides translations to the package %pprefix-wxPython.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n wxPython-%{version} -p1
|
%autosetup -n wxPython-%{version} -p1
|
||||||
|
|
||||||
@@ -203,15 +184,12 @@ echo "# empty module" >> wx/lib/pubsub/core/itopicdefnprovider.py
|
|||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
export DOXYGEN=%{_bindir}/doxygen
|
export DOXYGEN=%{_bindir}/doxygen
|
||||||
%python_expand $python build.py build %{wx_args}
|
%python_exec build.py build %{wx_args}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_expand $python build.py install %{wx_args} --destdir=%{buildroot} --extra_setup="-O1 --force"
|
%python_exec build.py install %{wx_args} --destdir=%{buildroot} --extra_setup="-O1 --force"
|
||||||
# build.py install helpfully installs built shared libraries for all versions,
|
|
||||||
# so remove those for other versions.
|
|
||||||
%{python_expand find %{buildroot}%{$python_sitearch} -name *.so ! -name *cpython-%{$python_version_nodots}*so -delete}
|
|
||||||
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%fdupes %{buildroot}%{_libdir}
|
||||||
|
|
||||||
%python_clone -a %{buildroot}%{_bindir}/helpviewer
|
%python_clone -a %{buildroot}%{_bindir}/helpviewer
|
||||||
%python_clone -a %{buildroot}%{_bindir}/img2png
|
%python_clone -a %{buildroot}%{_bindir}/img2png
|
||||||
@@ -226,20 +204,7 @@ export DOXYGEN=%{_bindir}/doxygen
|
|||||||
%python_clone -a %{buildroot}%{_bindir}/wxdocs
|
%python_clone -a %{buildroot}%{_bindir}/wxdocs
|
||||||
%python_clone -a %{buildroot}%{_bindir}/wxget
|
%python_clone -a %{buildroot}%{_bindir}/wxget
|
||||||
|
|
||||||
# Note: find_lang only works for one python flavor per multibuild,
|
|
||||||
# cannot use python_find_lang in python_subpackage_only mode.
|
|
||||||
%find_lang wxstd
|
%find_lang wxstd
|
||||||
%{python_expand #
|
|
||||||
echo "%%dir %{$python_sitearch}/wx/locale/
|
|
||||||
%%dir %{$python_sitearch}/wx/locale/*
|
|
||||||
%%dir %{$python_sitearch}/wx/locale/*/LC_MESSAGES" >> wxstd.lang
|
|
||||||
}
|
|
||||||
%if "%psuffix" == "-other"
|
|
||||||
if [ $(echo %pythons | wc -w) -gt 1 ]; then
|
|
||||||
# could not collect for only one flavor, package locale files unmarked
|
|
||||||
echo "" > wxstd.lang
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
@@ -266,22 +231,13 @@ mv wx wx_temp
|
|||||||
mv wx_temp wx
|
mv wx_temp wx
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?python_subpackage_only}
|
|
||||||
%post -n python-wxPython
|
|
||||||
%{python_install_alternative pywxrc helpviewer img2png img2py img2xpm pycrust pyshell pyslices pyslicesshell wxdemo wxdocs wxget}
|
|
||||||
|
|
||||||
%postun -n python-wxPython
|
|
||||||
%{python_uninstall_alternative pywxrc}
|
|
||||||
%else
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{python_install_alternative pywxrc helpviewer img2png img2py img2xpm pycrust pyshell pyslices pyslicesshell wxdemo wxdocs wxget}
|
%python_install_alternative pywxrc helpviewer img2png img2py img2xpm pycrust pyshell pyslices pyslicesshell wxdemo wxdocs wxget
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%{python_uninstall_alternative pywxrc}
|
%python_uninstall_alternative pywxrc
|
||||||
%endif
|
|
||||||
|
|
||||||
%files %{python_files wxPython}
|
%files
|
||||||
%license LICENSE.txt license/*.txt
|
%license LICENSE.txt license/*.txt
|
||||||
%doc CHANGES.rst README.rst TODO.rst
|
%doc CHANGES.rst README.rst TODO.rst
|
||||||
%python_alternative %{_bindir}/helpviewer
|
%python_alternative %{_bindir}/helpviewer
|
||||||
@@ -300,9 +256,9 @@ mv wx_temp wx
|
|||||||
%{python_sitearch}/wx/
|
%{python_sitearch}/wx/
|
||||||
%exclude %{python_sitearch}/wx/locale/
|
%exclude %{python_sitearch}/wx/locale/
|
||||||
|
|
||||||
%files %{python_files wxPython-lang} -f wxstd.lang
|
%files lang -f wxstd.lang
|
||||||
%if "%psuffix" == "-other"
|
%dir %{python_sitearch}/wx/locale/
|
||||||
%{python_sitearch}/wx/locale/
|
%dir %{python_sitearch}/wx/locale/*
|
||||||
%endif
|
%dir %{python_sitearch}/wx/locale/*/LC_MESSAGES
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user