]>
Commit | Line | Data |
---|---|---|
948a1c19 | 1 | # |
3c706660 | 2 | # Conditional build: |
948a1c19 | 3 | %bcond_without tests # unit tests |
3c706660 MK |
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 | |
948a1c19 | 9 | Summary(pl.UTF-8): Pozostałe narzędzia IPythona |
3c706660 MK |
10 | Name: python-%{module} |
11 | Version: 0.2.0 | |
d1de1e6c | 12 | Release: 7 |
3c706660 MK |
13 | License: BSD |
14 | Group: Libraries/Python | |
948a1c19 JB |
15 | #Source0Download: https://github.com/ipython/ipython_genutils/releases |
16 | # TODO: https://github.com/ipython/ipython_genutils/archive/%{version}/%{module}-%{version}.tar.gz | |
3c706660 MK |
17 | Source0: https://github.com/ipython/ipython_genutils/archive/%{version}.tar.gz |
18 | # Source0-md5: 477e596a0e6e2f74ec08ec09687eeb6c | |
19 | URL: https://github.com/ipython/ipython_genutils | |
948a1c19 JB |
20 | %if %(locale -a | grep -q '^C\.utf8$'; echo $?) |
21 | BuildRequires: glibc-localedb-all | |
22 | %endif | |
3c706660 | 23 | %if %{with python2} |
948a1c19 | 24 | BuildRequires: python-modules >= 1:2.7 |
3c706660 | 25 | BuildRequires: python-setuptools |
948a1c19 JB |
26 | %if %{with tests} |
27 | BuildRequires: python-nose | |
28 | %endif | |
3c706660 MK |
29 | %endif |
30 | %if %{with python3} | |
948a1c19 | 31 | BuildRequires: python3-modules >= 1:3.3 |
3c706660 | 32 | BuildRequires: python3-setuptools |
948a1c19 JB |
33 | %if %{with tests} |
34 | BuildRequires: python3-nose | |
35 | %endif | |
3c706660 | 36 | %endif |
948a1c19 JB |
37 | BuildRequires: rpm-pythonprov |
38 | BuildRequires: rpmbuild(macros) >= 1.714 | |
39 | Requires: python-modules >= 1:2.7 | |
3c706660 MK |
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 | |
948a1c19 | 45 | by Jupyter and IPython projects during The Big Split(TM). As soon as |
3c706660 MK |
46 | possible, those packages will remove their dependency on this. |
47 | ||
948a1c19 JB |
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. | |
3c706660 MK |
53 | |
54 | %package -n python3-%{module} | |
948a1c19 JB |
55 | Summary: IPython vestigial utilities |
56 | Summary(pl.UTF-8): Pozostałe narzędzia IPythona | |
3c706660 | 57 | Group: Libraries/Python |
948a1c19 | 58 | Requires: python3-modules >= 1:3.3 |
3c706660 MK |
59 | |
60 | %description -n python3-%{module} | |
61 | This package shouldn't exist. It contains some common utilities shared | |
948a1c19 JB |
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. | |
3c706660 | 65 | |
948a1c19 JB |
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ć. | |
3c706660 MK |
71 | |
72 | %prep | |
73 | %setup -q -n %{module}-%{version} | |
3c706660 MK |
74 | |
75 | %build | |
76 | %if %{with python2} | |
948a1c19 JB |
77 | %py_build |
78 | ||
79 | %if %{with tests} | |
80 | LC_ALL=C.UTF-8 \ | |
81 | nosetests-%{py_ver} ipython_genutils | |
82 | %endif | |
3c706660 MK |
83 | %endif |
84 | ||
85 | %if %{with python3} | |
948a1c19 | 86 | %py3_build |
3c706660 | 87 | |
948a1c19 JB |
88 | %if %{with tests} |
89 | nosetests-%{py3_ver} ipython_genutils | |
90 | %endif | |
3c706660 MK |
91 | %endif |
92 | ||
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %if %{with python2} | |
97 | %py_install | |
98 | ||
3c706660 | 99 | %py_postclean |
89962a74 | 100 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/ipython_genutils/tests |
3c706660 MK |
101 | %endif |
102 | ||
103 | %if %{with python3} | |
104 | %py3_install | |
89962a74 JB |
105 | |
106 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/ipython_genutils/tests | |
3c706660 MK |
107 | %endif |
108 | ||
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %if %{with python2} | |
113 | %files | |
114 | %defattr(644,root,root,755) | |
948a1c19 JB |
115 | %doc COPYING.md README.md |
116 | %{py_sitescriptdir}/ipython_genutils | |
117 | %{py_sitescriptdir}/ipython_genutils-%{version}-py*.egg-info | |
3c706660 MK |
118 | %endif |
119 | ||
120 | %if %{with python3} | |
121 | %files -n python3-%{module} | |
122 | %defattr(644,root,root,755) | |
948a1c19 JB |
123 | %doc COPYING.md README.md |
124 | %{py3_sitescriptdir}/ipython_genutils | |
125 | %{py3_sitescriptdir}/ipython_genutils-%{version}-py*.egg-info | |
3c706660 | 126 | %endif |