Group :: Development/Python3
RPM: python3-module-Enable
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
%define _unpackaged_files_terminate_build 1
%def_with docs
%define oname Enable
Name: python3-module-%oname
Version: 5.3.1
Release: alt1.1
Summary: Drawing and interaction packages
Group: Development/Python3
License: BSD and GPLv2
URL: https://github.com/enthought/enable
Source: %name-%version.tar
Patch: use_system_freetype.patch
BuildRequires: gcc-c++ swig
BuildRequires: libX11-devel libGL-devel libGLU-devel
BuildRequires: libfreetype-devel
BuildRequires: libopenblas-devel liblapack-devel
BuildRequires(pre): rpm-build-python3
BuildRequires: libnumpy-py3-devel
BuildRequires: python3-module-Cython
%if_with docs
BuildRequires: python3-module-sphinx
BuildRequires: python3-module-traits
BuildRequires: python3-module-sphinx-copybutton
%endif
%add_python3_req_skip macport mac_context hypothesis
%add_python3_req_skip wx.aui wx.glcanvas wx.grid wx.py.shell
%add_python3_self_prov_path %buildroot%python3_sitelibdir/kiva
%description
The Enable project provides two related multi-platform packages for
drawing GUI objects. The Enable package is a multi-platform object
drawing library built on top of Kiva. The core of Enable is a
container/component model for drawing and event notification. Kiva is a
multi-platform DisplayPDF vector drawing engine that supports multiple
output backends, including Windows, GTK, and Macintosh native windowing
systems, a variety of raster image formats, PDF, and Postscript.
%if_with docs
%package doc
Summary: Documentation for Enable project
Group: Development/Documentation
BuildArch: noarch
Conflicts: %name < %EVR
%description doc
The Enable project provides two related multi-platform packages for
drawing GUI objects. The Enable package is a multi-platform object
drawing library built on top of Kiva. The core of Enable is a
container/component model for drawing and event notification. Kiva is a
multi-platform DisplayPDF vector drawing engine that supports multiple
output backends, including Windows, GTK, and Macintosh native windowing
systems, a variety of raster image formats, PDF, and Postscript.
This package contains development documentation for Enable project.
%package pickles
Summary: Pickles for Enable project
Group: Development/Python3
%description pickles
The Enable project provides two related multi-platform packages for
drawing GUI objects. The Enable package is a multi-platform object
drawing library built on top of Kiva. The core of Enable is a
container/component model for drawing and event notification. Kiva is a
multi-platform DisplayPDF vector drawing engine that supports multiple
output backends, including Windows, GTK, and Macintosh native windowing
systems, a variety of raster image formats, PDF, and Postscript.
This package contains pickles for Enable project.
%endif
%prep
%setup
%patch -p1
#remove bundled freetype2 library
rm -rf kiva/agg/freetype2
%build
%add_optflags -fno-strict-aliasing
%python3_build
%if_with docs
# generate html docs
sphinx-build-3 docs/source html
sphinx-build-3 docs/source pickles
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif
%install
%python3_install
rm -fR %buildroot%python3_sitelibdir/enthought/kiva/mac
rm -f $(find %buildroot%python3_sitelibdir -name '*mac*.py*')
# remove shebangs from files
find %buildroot%python3_sitelibdir -type f -name '*.py' -exec \
sed -i -e '1!b' -e '/^\#\!\/usr\/bin\/env python$/d' '{}' +
%if_with docs
cp -fR pickles %buildroot%python3_sitelibdir/enable/
%endif
%check
# tests need display
%files
%doc image_LICENSE*.txt LICENSE.txt
%doc *.rst CHANGES.txt
%python3_sitelibdir/*
%if_with docs
%exclude %python3_sitelibdir/enable/pickles
%files doc
%doc docs
%files pickles
%dir %python3_sitelibdir/enable
%python3_sitelibdir/enable/pickles
%endif
%changelog
…
Todas as alterações você pod ver aqui
%def_with docs
%define oname Enable
Name: python3-module-%oname
Version: 5.3.1
Release: alt1.1
Summary: Drawing and interaction packages
Group: Development/Python3
License: BSD and GPLv2
URL: https://github.com/enthought/enable
Source: %name-%version.tar
Patch: use_system_freetype.patch
BuildRequires: gcc-c++ swig
BuildRequires: libX11-devel libGL-devel libGLU-devel
BuildRequires: libfreetype-devel
BuildRequires: libopenblas-devel liblapack-devel
BuildRequires(pre): rpm-build-python3
BuildRequires: libnumpy-py3-devel
BuildRequires: python3-module-Cython
%if_with docs
BuildRequires: python3-module-sphinx
BuildRequires: python3-module-traits
BuildRequires: python3-module-sphinx-copybutton
%endif
%add_python3_req_skip macport mac_context hypothesis
%add_python3_req_skip wx.aui wx.glcanvas wx.grid wx.py.shell
%add_python3_self_prov_path %buildroot%python3_sitelibdir/kiva
%description
The Enable project provides two related multi-platform packages for
drawing GUI objects. The Enable package is a multi-platform object
drawing library built on top of Kiva. The core of Enable is a
container/component model for drawing and event notification. Kiva is a
multi-platform DisplayPDF vector drawing engine that supports multiple
output backends, including Windows, GTK, and Macintosh native windowing
systems, a variety of raster image formats, PDF, and Postscript.
%if_with docs
%package doc
Summary: Documentation for Enable project
Group: Development/Documentation
BuildArch: noarch
Conflicts: %name < %EVR
%description doc
The Enable project provides two related multi-platform packages for
drawing GUI objects. The Enable package is a multi-platform object
drawing library built on top of Kiva. The core of Enable is a
container/component model for drawing and event notification. Kiva is a
multi-platform DisplayPDF vector drawing engine that supports multiple
output backends, including Windows, GTK, and Macintosh native windowing
systems, a variety of raster image formats, PDF, and Postscript.
This package contains development documentation for Enable project.
%package pickles
Summary: Pickles for Enable project
Group: Development/Python3
%description pickles
The Enable project provides two related multi-platform packages for
drawing GUI objects. The Enable package is a multi-platform object
drawing library built on top of Kiva. The core of Enable is a
container/component model for drawing and event notification. Kiva is a
multi-platform DisplayPDF vector drawing engine that supports multiple
output backends, including Windows, GTK, and Macintosh native windowing
systems, a variety of raster image formats, PDF, and Postscript.
This package contains pickles for Enable project.
%endif
%prep
%setup
%patch -p1
#remove bundled freetype2 library
rm -rf kiva/agg/freetype2
%build
%add_optflags -fno-strict-aliasing
%python3_build
%if_with docs
# generate html docs
sphinx-build-3 docs/source html
sphinx-build-3 docs/source pickles
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif
%install
%python3_install
rm -fR %buildroot%python3_sitelibdir/enthought/kiva/mac
rm -f $(find %buildroot%python3_sitelibdir -name '*mac*.py*')
# remove shebangs from files
find %buildroot%python3_sitelibdir -type f -name '*.py' -exec \
sed -i -e '1!b' -e '/^\#\!\/usr\/bin\/env python$/d' '{}' +
%if_with docs
cp -fR pickles %buildroot%python3_sitelibdir/enable/
%endif
%check
# tests need display
%files
%doc image_LICENSE*.txt LICENSE.txt
%doc *.rst CHANGES.txt
%python3_sitelibdir/*
%if_with docs
%exclude %python3_sitelibdir/enable/pickles
%files doc
%doc docs
%files pickles
%dir %python3_sitelibdir/enable
%python3_sitelibdir/enable/pickles
%endif
%changelog
…
Todas as alterações você pod ver aqui