]> git.pld-linux.org Git - packages/python-ipython_genutils.git/blob - python-ipython_genutils.spec
- don't package tests; release 4
[packages/python-ipython_genutils.git] / python-ipython_genutils.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 %define         module  ipython_genutils
8 Summary:        IPython vestigial utilities
9 Summary(pl.UTF-8):      Pozostałe narzędzia IPythona
10 Name:           python-%{module}
11 Version:        0.2.0
12 Release:        4
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://github.com/ipython/ipython_genutils/releases
16 # TODO:         https://github.com/ipython/ipython_genutils/archive/%{version}/%{module}-%{version}.tar.gz
17 Source0:        https://github.com/ipython/ipython_genutils/archive/%{version}.tar.gz
18 # Source0-md5:  477e596a0e6e2f74ec08ec09687eeb6c
19 URL:            https://github.com/ipython/ipython_genutils
20 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
21 BuildRequires:  glibc-localedb-all
22 %endif
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools
26 %if %{with tests}
27 BuildRequires:  python-nose
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.3
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-nose
35 %endif
36 %endif
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  rpmbuild(macros) >= 1.714
39 Requires:       python-modules >= 1:2.7
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 This package shouldn't exist. It contains some common utilities shared
45 by Jupyter and IPython projects during The Big Split(TM). As soon as
46 possible, those packages will remove their dependency on this.
47
48 %description -l pl.UTF-8
49 Ten pakiet nie powinien istnieć. Zawiera kilka wspólnych narzędzi
50 współdzielonych przez projekty Jupyter i IPython podczas Wielkiego
51 Podziału(TM). Projekty te będą miały usuniętą tę zależność w
52 najbliższym możliwym czasie.
53
54 %package -n python3-%{module}
55 Summary:        IPython vestigial utilities
56 Summary(pl.UTF-8):      Pozostałe narzędzia IPythona
57 Group:          Libraries/Python
58 Requires:       python3-modules >= 1:3.3
59
60 %description -n python3-%{module}
61 This package shouldn't exist. It contains some common utilities shared
62 by Jupyter and IPython projects during The Big Split(TM). As soon as
63 possible, those packages will remove their dependency on this and this
64 package will go away.
65
66 %description -n python3-%{module} -l pl.UTF-8
67 Ten pakiet nie powinien istnieć. Zawiera kilka wspólnych narzędzi
68 współdzielonych przez projekty Jupyter i IPython podczas Wielkiego
69 Podziału(TM). Projekty te będą miały usuniętą tę zależność w
70 najbliższym możliwym czasie, a ten pakiet przestanie istnieć.
71
72 %prep
73 %setup -q -n %{module}-%{version}
74
75 %build
76 %if %{with python2}
77 %py_build
78
79 %if %{with tests}
80 LC_ALL=C.UTF-8 \
81 nosetests-%{py_ver} ipython_genutils
82 %endif
83 %endif
84
85 %if %{with python3}
86 %py3_build
87
88 %if %{with tests}
89 nosetests-%{py3_ver} ipython_genutils
90 %endif
91 %endif
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 %if %{with python2}
97 %py_install
98
99 %py_postclean
100 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/ipython_genutils/tests
101 %endif
102
103 %if %{with python3}
104 %py3_install
105
106 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/ipython_genutils/tests
107 %endif
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %files
114 %defattr(644,root,root,755)
115 %doc COPYING.md README.md
116 %{py_sitescriptdir}/ipython_genutils
117 %{py_sitescriptdir}/ipython_genutils-%{version}-py*.egg-info
118 %endif
119
120 %if %{with python3}
121 %files -n python3-%{module}
122 %defattr(644,root,root,755)
123 %doc COPYING.md README.md
124 %{py3_sitescriptdir}/ipython_genutils
125 %{py3_sitescriptdir}/ipython_genutils-%{version}-py*.egg-info
126 %endif
This page took 0.118224 seconds and 3 git commands to generate.