forked from pool/python-wxPython
Accepting request 610092 from home:TheBlackCat:branches:X11:wxWidgets
Initial version of the wxPython "phoenix" package. It is highly backwards-incompatible with the old 3.x version, so I have renamed it to "python-wxPython" to both comply with python package naming conventions and to allow the two to co-exist (although not be co-installed). I have also ported it to use the new python singlespec macros so one package can build both python2 and python3 rpms. OBS-URL: https://build.opensuse.org/request/show/610092 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=1
This commit is contained in:
commit
2d097db282
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
4
python-wxPython.changes
Normal file
4
python-wxPython.changes
Normal file
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 28 20:32:18 UTC 2018 - toddrme2178@gmail.com
|
||||
|
||||
- Initial version
|
223
python-wxPython.spec
Normal file
223
python-wxPython.spec
Normal file
@ -0,0 +1,223 @@
|
||||
#
|
||||
# spec file for package python-wxPython
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_with test
|
||||
%bcond_with syswx
|
||||
%define oldpython python
|
||||
%define X_display ":98"
|
||||
Name: python-wxPython
|
||||
Version: 4.0.1
|
||||
Release: 0
|
||||
License: GPL-2.0+
|
||||
Summary: Cross platform GUI toolkit for Python, "Phoenix" version
|
||||
Url: https://github.com/wxWidgets/Phoenix
|
||||
Group: Development/Languages/Python
|
||||
Source: https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gstreamer-plugins-base-devel
|
||||
BuildRequires: libjbig-devel
|
||||
BuildRequires: pkgconfig(cppunit)
|
||||
BuildRequires: pkgconfig(freeglut)
|
||||
BuildRequires: pkgconfig(gstreamer-1.0)
|
||||
BuildRequires: pkgconfig(gtk+-3.0)
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(liblzma)
|
||||
BuildRequires: pkgconfig(libmspack)
|
||||
BuildRequires: pkgconfig(libnotify)
|
||||
BuildRequires: pkgconfig(libpng16)
|
||||
BuildRequires: pkgconfig(libtiff-4)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(sm)
|
||||
BuildRequires: pkgconfig(webkit2gtk-4.0)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: xorg-x11-server
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module six}
|
||||
%endif
|
||||
Requires: python-six
|
||||
%ifpython2
|
||||
Provides: %{oldpython}-wxWidgets = %version
|
||||
Conflicts: otherproviders(%{oldpython}-wxWidgets)
|
||||
%endif
|
||||
Provides: python-wxWidgets = %version
|
||||
Conflicts: otherproviders(python-wxWidgets)
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%if %{with syswx}
|
||||
%define wx_args --use_syswx --gtk3 -v
|
||||
%else
|
||||
%define wx_args --gtk3 -v
|
||||
%endif
|
||||
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Welcome to wxPython's Project Phoenix! Phoenix is the improved next-generation
|
||||
wxPython, "better, stronger, faster than he was before." This new
|
||||
implementation is focused on improving speed, maintainability and
|
||||
extensibility. Just like "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 native GUI on Windows, Macs or
|
||||
Unix systems, with a native look and feel and requiring very little (if any)
|
||||
platform specific code.
|
||||
|
||||
For more information please refer to the
|
||||
`README file <https://github.com/wxWidgets/Phoenix/blob/wxPython-4.0.1/README.rst>`_,
|
||||
the `Migration Guide <http://docs.wxPython.org/MigrationGuide.html>`_,
|
||||
or the `wxPython API documentation <http://docs.wxPython.org/index.html>`_.
|
||||
|
||||
Archive files containing a copy of the wxPython documentation, the demo and
|
||||
samples, and also a set of MSVC .pdb files for Windows are available
|
||||
`here <https://extras.wxPython.org/wxPython4/extras/>`_.
|
||||
|
||||
The utility tools wxdocs and wxdemo will download the appropriate files with wxget,
|
||||
(if necessary), unpack them, (if necessary) and launch the appropriate version of
|
||||
the respective items. (Documents are launched in the default browser and demo is started
|
||||
with python).
|
||||
|
||||
%package lang
|
||||
# We cannot use %%lang_package here. Editra translations use noarch incompatible path.
|
||||
Summary: Languages for package %{name}
|
||||
Group: System/Localization
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python-base
|
||||
Provides: %{name}-lang-all = %{version}
|
||||
Supplements: packageand(bundle-lang-other:%{name})
|
||||
|
||||
%description lang
|
||||
Provides translations to the package %{name}.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Group: System/Localization
|
||||
Requires: %{name} = %{version}
|
||||
Requires: python-devel
|
||||
Requires: c++_compiler
|
||||
Requires: gstreamer-plugins-base-devel
|
||||
Requires: libjbig-devel
|
||||
Requires: pkgconfig(cppunit)
|
||||
Requires: pkgconfig(freeglut)
|
||||
Requires: pkgconfig(gstreamer-1.0)
|
||||
Requires: pkgconfig(gtk+-3.0)
|
||||
Requires: pkgconfig(libjpeg)
|
||||
Requires: pkgconfig(liblzma)
|
||||
Requires: pkgconfig(libmspack)
|
||||
Requires: pkgconfig(libnotify)
|
||||
Requires: pkgconfig(libpng16)
|
||||
Requires: pkgconfig(libtiff-4)
|
||||
Requires: pkgconfig(sdl2)
|
||||
Requires: pkgconfig(sm)
|
||||
Requires: pkgconfig(webkit2gtk-4.0)
|
||||
Requires: pkgconfig(x11)
|
||||
|
||||
%description devel
|
||||
Files needed to build software that uses %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n wxPython-%{version}
|
||||
sed -i -e '/^#!\//, 1d' wx/py/*.py
|
||||
sed -i -e '/^#!\//, 1d' wx/tools/*.py
|
||||
sed -i -e '/^#!\//, 1d' wx/py/tests/*.py
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
export DOXYGEN=%{_bindir}/doxygen
|
||||
%python_expand $python build.py build %{wx_args}
|
||||
|
||||
%install
|
||||
%python_expand $python build.py install %{wx_args} --destdir=%{buildroot} --extra_setup="-O1 --force"
|
||||
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%python_clone -a %{buildroot}%{_bindir}/helpviewer
|
||||
%python_clone -a %{buildroot}%{_bindir}/img2png
|
||||
%python_clone -a %{buildroot}%{_bindir}/img2py
|
||||
%python_clone -a %{buildroot}%{_bindir}/img2xpm
|
||||
%python_clone -a %{buildroot}%{_bindir}/pycrust
|
||||
%python_clone -a %{buildroot}%{_bindir}/pyshell
|
||||
%python_clone -a %{buildroot}%{_bindir}/pyslices
|
||||
%python_clone -a %{buildroot}%{_bindir}/pyslicesshell
|
||||
%python_clone -a %{buildroot}%{_bindir}/pywxrc
|
||||
%python_clone -a %{buildroot}%{_bindir}/wxdemo
|
||||
%python_clone -a %{buildroot}%{_bindir}/wxdocs
|
||||
%python_clone -a %{buildroot}%{_bindir}/wxget
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
#############################################
|
||||
### Launch a virtual framebuffer X server ###
|
||||
#############################################
|
||||
export DISPLAY=%{X_display}
|
||||
Xvfb %{X_display} >& Xvfb.log &
|
||||
trap "kill $! || true" EXIT
|
||||
sleep 10
|
||||
|
||||
rm -r build
|
||||
rm -r _build*
|
||||
|
||||
mv wx wx_temp
|
||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
||||
$python -B build.py test %{wx_args}
|
||||
}
|
||||
mv wx_temp wx
|
||||
%endif
|
||||
|
||||
%post
|
||||
%{python_install_alternative pywxrc helpviewer img2png img2py img2xpm pycrust pyshell pyslices pyslicesshell wxdemo wxdocs wxget}
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative pywxrc
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root)
|
||||
%doc CHANGES.rst LICENSE.txt README.rst TODO.rst license/*.txt
|
||||
%python_alternative %{_bindir}/helpviewer
|
||||
%python_alternative %{_bindir}/img2png
|
||||
%python_alternative %{_bindir}/img2py
|
||||
%python_alternative %{_bindir}/img2xpm
|
||||
%python_alternative %{_bindir}/pycrust
|
||||
%python_alternative %{_bindir}/pyshell
|
||||
%python_alternative %{_bindir}/pyslices
|
||||
%python_alternative %{_bindir}/pyslicesshell
|
||||
%python_alternative %{_bindir}/pywxrc
|
||||
%python_alternative %{_bindir}/wxdemo
|
||||
%python_alternative %{_bindir}/wxdocs
|
||||
%python_alternative %{_bindir}/wxget
|
||||
%{python_sitearch}/wxPython-%{version}-py*.egg-info
|
||||
%{python_sitearch}/wx/
|
||||
%exclude %{python_sitearch}/wx/locale/
|
||||
%exclude %{python_sitearch}/wx/*.so
|
||||
|
||||
%files %{python_files devel}
|
||||
%defattr(-,root,root)
|
||||
%{python_sitearch}/wx/*.so
|
||||
|
||||
%files %{python_files lang}
|
||||
%defattr(-,root,root)
|
||||
%{python_sitearch}/wx/locale/
|
||||
|
||||
%changelog
|
3
wxPython-4.0.1.tar.gz
Normal file
3
wxPython-4.0.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f8f2ac1a75368b9b103259addc77f4e3dfe729c6d70aa1fd0b7e9c5b6075c710
|
||||
size 67918134
|
Loading…
Reference in New Issue
Block a user