-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-photoidx.spec
90 lines (70 loc) · 2.19 KB
/
python-photoidx.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
%bcond_without tests
%global distname photoidx
Name: python3-%{distname}
Version: $version
Release: 0
Url: $url
Summary: $description
License: Apache-2.0
Group: Productivity/Graphics/Viewers
Source: %{distname}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python3-base >= 3.6
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-pytest
BuildRequires: python3-distutils-pytest
BuildRequires: python3-pytest-dependency
BuildRequires: python3-PyYAML
BuildRequires: python3-ExifRead >= 2.2.0
%endif
Provides: python3-photo = %{version}-%{release}
Obsoletes: python3-photo < %{version}-%{release}
Requires: python3-PyYAML
Requires: python3-ExifRead >= 2.2.0
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package maintains indices for photo collections. The index is
stored as a YAML file and contains metadata and tags describing the
photos. The photos are accessed read only.
This package provides a Python library and a command line tool for
creating and managing the index.
%package qt
Summary: Tools for managing photo collections
Provides: python3-photo-qt = %{version}-%{release}
Obsoletes: python3-photo-qt < %{version}-%{release}
Requires: python3-%{distname} = %{version}
Requires: python3-packaging
Requires: python3-pyside2
Recommends: python3-vignette >= 4.3.0
%description qt
This package maintains indices for photo collections. The index is
stored as a YAML file and contains metadata and tags describing the
photos. The photos are accessed read only.
This package provides an image viewer.
%prep
%setup -q -n %{distname}-%{version}
%build
python3 setup.py build
%install
python3 setup.py install --optimize=1 --prefix=%{_prefix} --root=%{buildroot}
%__mv %{buildroot}%{_bindir}/photo-idx.py %{buildroot}%{_bindir}/photo-idx
%__mv %{buildroot}%{_bindir}/imageview.py %{buildroot}%{_bindir}/imageview
%fdupes %{buildroot}
%if %{with tests}
%check
python3 setup.py test
%endif
%files
%defattr(-,root,root)
%doc README.rst CHANGES.rst
%license LICENSE.txt
%{python3_sitelib}/*
%exclude %{python3_sitelib}/photoidx/qt
%{_bindir}/photo-idx
%files qt
%defattr(-,root,root)
%{python3_sitelib}/photoidx/qt
%{_bindir}/imageview
%changelog