]> git.pld-linux.org Git - packages/python-pymediainfo.git/blame - python-pymediainfo.spec
- release 4 (by relup.sh)
[packages/python-pymediainfo.git] / python-pymediainfo.spec
CommitLineData
05b31322
ER
1#
2# Conditional build:
3%bcond_with doc # don't build doc
4%bcond_with tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
c88f6c6c
JR
8%define module pymediainfo
9%define egg_name pymediainfo
05b31322
ER
10%define pypi_name pymediainfo
11Summary: A Python wrapper for the mediainfo library
9e87f416 12Summary(pl.UTF-8): Pythonowy interfejs do biblioteki mediainfo
05b31322
ER
13Name: python-%{pypi_name}
14Version: 2.2.0
342e8235 15Release: 4
05b31322
ER
16License: MIT
17Group: Libraries/Python
9e87f416
JB
18#Source0Download: https://pypi.org/simple/pymediainfo/
19Source0: https://files.pythonhosted.org/packages/source/p/pymediainfo/%{pypi_name}-%{version}.tar.gz
05b31322
ER
20# Source0-md5: 66602dc7015648e7735a2abae346deea
21URL: https://github.com/sbraz/pymediainfo
22BuildRequires: rpm-pythonprov
23BuildRequires: rpmbuild(macros) >= 1.714
24%if %{with python2}
25BuildRequires: python-devel
c88f6c6c 26BuildRequires: python-setuptools
05b31322 27%if %{with tests}
c88f6c6c
JR
28BuildRequires: python-pytest
29BuildRequires: python-pytest-runner
05b31322
ER
30%endif
31%endif
32%if %{with python3}
33BuildRequires: python3-devel
9e87f416 34BuildRequires: python3-setuptools
05b31322
ER
35%if %{with tests}
36BuildRequires: python3-pytest
37BuildRequires: python3-pytest-runner
05b31322
ER
38%endif
39%endif
9e87f416
JB
40%if %{with doc}
41BuildRequires: sphinx-pdg
42%endif
91f348ea 43Requires: libmediainfo
05b31322
ER
44BuildArch: noarch
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48This small package is a wrapper around the MediaInfo library.
49
9e87f416
JB
50%description -l pl.UTF-8
51Mały pakiet obudowujący bibliotekę MediaInfo.
52
05b31322
ER
53%package -n python3-%{pypi_name}
54Summary: A Python wrapper for the mediainfo library
9e87f416 55Summary(pl.UTF-8): Pythonowy interfejs do biblioteki mediainfo
05b31322 56Group: Libraries/Python
91f348ea 57Requires: libmediainfo
05b31322
ER
58
59%description -n python3-%{pypi_name}
60This small package is a wrapper around the MediaInfo library.
61
9e87f416
JB
62%description -n python3-%{pypi_name} -l pl.UTF-8
63Mały pakiet obudowujący bibliotekę MediaInfo.
64
05b31322
ER
65%prep
66%setup -q -n %{pypi_name}-%{version}
67
68# Remove bundled egg-info
69%{__rm} -r %{egg_name}.egg-info
70
71%build
72%if %{with python2}
73%py_build %{?with_tests:test}
91f348ea 74
05b31322
ER
75%if %{with doc}
76# generate html docs
77sphinx-build docs html
78# remove the sphinx-build leftovers
79%{__rm} -r html/.{doctrees,buildinfo}
80%endif
81%endif
82
83%if %{with python3}
84%py3_build %{?with_tests:test}
91f348ea 85
05b31322
ER
86%if %{with doc}
87# generate html docs
88python3-sphinx-build docs html
89# remove the sphinx-build leftovers
90%{__rm} -r html/.{doctrees,buildinfo}
91%endif
92%endif
93
94%install
95rm -rf $RPM_BUILD_ROOT
96%if %{with python2}
97%py_install
98%py_postclean
99%endif
100
101%if %{with python3}
102%py3_install
103%endif
104
105%clean
106rm -rf $RPM_BUILD_ROOT
107
108%if %{with python2}
109%files
110%defattr(644,root,root,755)
111%doc README.rst %{?with_doc:html}
112%{py_sitescriptdir}/%{module}
113%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
114%endif
115
116%if %{with python3}
117%files -n python3-%{pypi_name}
118%defattr(644,root,root,755)
119%doc README.rst %{?with_doc:html}
120%{py3_sitescriptdir}/%{module}
121%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
122%endif
This page took 0.0975 seconds and 4 git commands to generate.