]> git.pld-linux.org Git - packages/python-hurry.filesize.git/blob - python-hurry.filesize.spec
rebuild with tests and docs
[packages/python-hurry.filesize.git] / python-hurry.filesize.spec
1 # Conditional build:
2 %bcond_without  tests   # unit tests
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module          hurry.filesize
7 %define         egg_name        hurry.filesize
8 %define         pypi_name       hurry.filesize
9 Summary:        Python library for human readable file sizes (or anything sized in bytes)
10 Name:           python-%{pypi_name}
11 Version:        0.9
12 Release:        7
13 License:        ZPL v2.1
14 Group:          Libraries/Python
15 Source0:        https://pypi.debian.net/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5:  8549ccd09bb31b5ff1e8e8c1eacc7794
17 URL:            https://pypi.org/project/hurry.filesize/
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python-modules
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules
26 BuildRequires:  python3-setuptools
27 %endif
28 Requires:       python-modules
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Python library for human readable file sizes (or anything sized in
34 bytes).
35
36 %package -n python3-%{pypi_name}
37 Summary:        Python library for human readable file sizes (or anything sized in bytes)
38 Group:          Libraries/Python
39 Requires:       python3-modules
40
41 %description -n python3-%{pypi_name}
42 Python library for human readable file sizes (or anything sized in
43 bytes).
44
45 %prep
46 %setup -q -n %{pypi_name}-%{version}
47
48 %build
49 %if %{with python2}
50 %py_build %{?with_tests:test}
51 %endif
52
53 %if %{with python3}
54 %py3_build %{?with_tests:test}
55 %endif
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59
60 %if %{with python2}
61 %py_install
62
63 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
64 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
65
66 %py_postclean
67 %endif
68
69 %if %{with python3}
70 %py3_install
71 %endif
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %if %{with python2}
77 %files
78 %defattr(644,root,root,755)
79 %doc CHANGES.txt
80 %dir %{py_sitescriptdir}/hurry
81 %{py_sitescriptdir}/hurry/filesize
82 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
83 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.pth
84 %endif
85
86 %if %{with python3}
87 %files -n python3-%{pypi_name}
88 %defattr(644,root,root,755)
89 %doc CHANGES.txt
90 %dir %{py3_sitescriptdir}/hurry
91 %{py3_sitescriptdir}/hurry/filesize
92 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
93 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.pth
94 %endif
This page took 0.092113 seconds and 3 git commands to generate.