]> git.pld-linux.org Git - packages/python-imagesize.git/blob - python-imagesize.spec
- updated to 1.1.0
[packages/python-imagesize.git] / python-imagesize.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Python 2 module to get image size from PNG/JPEG/JPEG2000/GIF file
8 Summary(pl.UTF-8):      Moduł Pythona 2 do pobierania rozmiaru obrazu z pliku PNG/JPEG/JPEG2000/GIF
9 Name:           python-imagesize
10 Version:        1.1.0
11 Release:        1
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/imagesize/
15 Source0:        https://files.pythonhosted.org/packages/source/i/imagesize/imagesize-%{version}.tar.gz
16 # Source0-md5:  2f89749b05e07c79c46330dbc62f1e02
17 URL:            https://pypi.org/project/imagesize/
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.6
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules >= 1:3.3
26 BuildRequires:  python3-setuptools
27 %endif
28 Requires:       python-modules >= 1:2.6
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 This module analyzes JPEG/JPEG2000/PNG/GIF image header and returns
34 image size.
35
36 %description -l pl.UTF-8
37 Ten moduł analizuje nagłówek pliku JPEG/JPEG2000/PNG/GIF i zwraca
38 rozmiary obrazka.
39
40 %package -n python3-imagesize
41 Summary:        Python 3 module to get image size from PNG/JPEG/JPEG2000/GIF file
42 Summary(pl.UTF-8):      Moduł Pythona 3 do pobierania rozmiaru obrazu z pliku PNG/JPEG/JPEG2000/GIF
43 Group:          Libraries/Python
44 Requires:       python3-modules >= 1:3.3
45
46 %description -n python3-imagesize
47 This module analyzes JPEG/JPEG2000/PNG/GIF image header and returns
48 image size.
49
50 %description -n python3-imagesize -l pl.UTF-8
51 Ten moduł analizuje nagłówek pliku JPEG/JPEG2000/PNG/GIF i zwraca
52 rozmiary obrazka.
53
54 %prep
55 %setup -q -n imagesize-%{version}
56
57 %build
58 %if %{with python2}
59 %py_build %{?with_tests:test}
60 %endif
61
62 %if %{with python3}
63 %py3_build %{?with_tests:test}
64 %endif
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68
69 %if %{with python2}
70 %py_install
71
72 %py_postclean
73 %endif
74
75 %if %{with python3}
76 %py3_install
77 %endif
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %if %{with python2}
83 %files
84 %defattr(644,root,root,755)
85 %doc LICENSE.rst README.rst
86 %{py_sitescriptdir}/imagesize.py[co]
87 %{py_sitescriptdir}/imagesize-%{version}-py*.egg-info
88 %endif
89
90 %if %{with python3}
91 %files -n python3-imagesize
92 %defattr(644,root,root,755)
93 %doc LICENSE.rst README.rst
94 %{py3_sitescriptdir}/imagesize.py
95 %{py3_sitescriptdir}/__pycache__/imagesize.cpython-*.py[co]
96 %{py3_sitescriptdir}/imagesize-%{version}-py*.egg-info
97 %endif
This page took 0.108984 seconds and 3 git commands to generate.