forked from pool/python-morecvutils
- The buildservice doesn't use the coveralls package - Clean some script-interpreter issues reported by rpmlint OBS-URL: https://build.opensuse.org/request/show/946819 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-morecvutils?expand=0&rev=7
91 lines
2.8 KiB
RPMSpec
91 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package python-morecvutils
|
|
#
|
|
# Copyright (c) 2022 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
|
%define pythons python3
|
|
Name: python-morecvutils
|
|
Version: 1.0.2
|
|
Release: 0
|
|
Summary: Computer Vision utilities
|
|
License: MIT
|
|
URL: https://github.com/scivision/morecvutils
|
|
Source: https://github.com/scivision/morecvutils/archive/v%{version}.tar.gz#/morecvutils-%{version}.tar.gz
|
|
BuildRequires: %{python_module pip >= 10}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: ffmpeg
|
|
Requires: gstreamer-plugins-good
|
|
Requires: python-imageio
|
|
Requires: python-imageio-ffmpeg
|
|
Requires: python-numpy
|
|
Requires: python-opencv
|
|
BuildArch: noarch
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module imageio-ffmpeg}
|
|
BuildRequires: %{python_module imageio}
|
|
BuildRequires: %{python_module numpy}
|
|
BuildRequires: %{python_module opencv}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: ffmpeg
|
|
BuildRequires: gstreamer-plugins-good
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
Computer Vision utilities, Cohen-Sutherland line clipping,
|
|
OpenCV plot helpers for Optical Flow and Blob Analysis,
|
|
and AVI codec helpers.
|
|
|
|
%prep
|
|
%setup -q -n morecvutils-%{version}
|
|
# no main section: no interpreter
|
|
sed -i '1{/env python/d}' morecvutils/calcOptFlow.py
|
|
# remove executable bits from Demo files
|
|
chmod -x Demo* OpticalFlow_Python_vs_Matlab.py
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%{python_expand # main section present: make executable and patch shebang
|
|
chmod +x %{buildroot}%{$python_sitelib}/morecvutils/getaviprop.py
|
|
sed -i '1{s/env python.*/$python/}' %{buildroot}%{$python_sitelib}/morecvutils/getaviprop.py
|
|
}
|
|
%{?python_compileall}
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
# Don't put demos in bindir
|
|
rm %{buildroot}%{_bindir}/Demo*
|
|
rm %{buildroot}%{_bindir}/OpticalFlow_Python_vs_Matlab.py
|
|
|
|
%check
|
|
# test uses AVC/AAC file
|
|
%pytest -k "not test_avi"
|
|
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%doc Demo*
|
|
%doc OpticalFlow_Python_vs_Matlab.py
|
|
%license LICENSE.txt
|
|
%{python_sitelib}/morecvutils
|
|
%{python_sitelib}/morecvutils-%{version}*-info
|
|
|
|
%changelog
|