]> git.pld-linux.org Git - packages/python-bitmath.git/blame - python-bitmath.spec
- release 10 (by relup.sh)
[packages/python-bitmath.git] / python-bitmath.spec
CommitLineData
2942bcd1
AM
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module bitmath
8Summary: Module for representing file sizes with different prefix notations
9Name: python-%{module}
34d7d096 10Version: 1.0.6
06d84368 11Release: 10
2942bcd1
AM
12License: BSD
13Group: Libraries/Python
14Source0: https://github.com/tbielawa/bitmath/archive/%{version}-1.tar.gz
34d7d096 15# Source0-md5: b589c9ceb7f518da043e089d519e8579
2942bcd1
AM
16URL: https://github.com/tbielawa/bitmath
17BuildRequires: rpm-pythonprov
ebb9d032 18BuildRequires: rpmbuild(macros) >= 1.710
2942bcd1
AM
19%if %{with python2}
20BuildRequires: python-distribute
21%endif
22%if %{with python3}
23BuildRequires: python3-distribute
24BuildRequires: python3-modules
25%endif
26Requires: python-modules
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31bitmath simplifies many facets of interacting with file sizes in
32various units. Examples include: converting between SI and NIST prefix
33units (GiB to kB), converting between units of the same type (SI to
34SI, or NIST to NIST), basic arithmetic operations (subtracting 42KiB
35from 50GiB), rich comparison operations (1024 Bytes == 1KiB), bitwise
36operations (<<, >>, &, |, ^), and sorting.
37
38In addition to the conversion and math operations, bitmath provides
39human readable representations of values which are suitable for use in
40interactive shells as well as larger scripts and applications.
41
42%package -n python3-%{module}
43Summary: Module for representing file sizes with different prefix notations
44Group: Libraries/Python
45
46%description -n python3-%{module}
47bitmath simplifies many facets of interacting with file sizes in
48various units. Examples include: converting between SI and NIST prefix
49units (GiB to kB), converting between units of the same type (SI to
50SI, or NIST to NIST), basic arithmetic operations (subtracting 42KiB
51from 50GiB), rich comparison operations (1024 Bytes == 1KiB), bitwise
52operations (<<, >>, &, |, ^), and sorting.
53
54In addition to the conversion and math operations, bitmath provides
55human readable representations of values which are suitable for use in
56interactive shells as well as larger scripts and applications.
57
58%package apidocs
59Summary: %{module} API documentation
60Summary(pl.UTF-8): Dokumentacja API %{module}
61Group: Documentation
62
63%description apidocs
64API documentation for %{module}.
65
66%description apidocs -l pl.UTF-8
67Dokumentacja API %{module}.
68
69%prep
70%setup -q -n %{module}-%{version}-1
71
72%build
73%if %{with python2}
b0821b19 74%py_build %{?with_tests:test}
2942bcd1
AM
75%endif
76
77%if %{with python3}
b0821b19 78%py3_build %{?with_tests:test}
2942bcd1
AM
79%endif
80
81%if %{with doc}
82cd docs
83%{__make} -j1 html
84rm -rf _build/html/_sources
85%endif
86
87%install
88rm -rf $RPM_BUILD_ROOT
89
90%if %{with python2}
b0821b19 91%py_install
2942bcd1
AM
92
93%py_postclean
94%endif
95
96%if %{with python3}
b0821b19 97%py3_install
2942bcd1
AM
98%endif
99
100%clean
101rm -rf $RPM_BUILD_ROOT
102
103%if %{with python2}
104%files
105%defattr(644,root,root,755)
106%doc README.md
107%dir %{py_sitescriptdir}/%{module}
108%{py_sitescriptdir}/%{module}/*.py[co]
109%if "%{py_ver}" > "2.4"
110%{py_sitescriptdir}/%{module}-%{version}*.egg-info
111%endif
112%endif
113
114%if %{with python3}
115%files -n python3-%{module}
116%defattr(644,root,root,755)
117%doc README.md
118%{py3_sitescriptdir}/%{module}
119%{py3_sitescriptdir}/%{module}-%{version}*-py*.egg-info
120%endif
121
122%if %{with doc}
123%files apidocs
124%defattr(644,root,root,755)
125%doc docs/_build/html/*
126%endif
This page took 0.113814 seconds and 4 git commands to generate.