]> git.pld-linux.org Git - packages/python-ipython_genutils.git/blob - python-ipython_genutils.spec
cf48087b3f4c97aba8e308182e2b6c80f5f4ad13
[packages/python-ipython_genutils.git] / python-ipython_genutils.spec
1 # Conditional build:
2 %bcond_with     doc     # don't build doc
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  ipython_genutils
8 Summary:        IPython vestigial utilities
9 # Summary(pl.UTF-8):    -
10 Name:           python-%{module}
11 Version:        0.2.0
12 Release:        2
13 License:        BSD
14 Group:          Libraries/Python
15 Source0:        https://github.com/ipython/ipython_genutils/archive/%{version}.tar.gz
16 # Source0-md5:  477e596a0e6e2f74ec08ec09687eeb6c
17 URL:            https://github.com/ipython/ipython_genutils
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 # when using /usr/bin/env or other in-place substitutions
29 #BuildRequires: sed >= 4.0
30 # replace with other requires if defined in setup.py
31 Requires:       python-modules
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 This package shouldn't exist. It contains some common utilities shared
37 by Jupyter and IPython projects during The Big Splitâ„¢. As soon as
38 possible, those packages will remove their dependency on this.
39
40 # %%description -l pl.UTF-8
41
42 %package -n python3-%{module}
43 Summary:        -
44 Summary(pl.UTF-8):      -
45 Group:          Libraries/Python
46 Requires:       python3-modules
47
48 %description -n python3-%{module}
49 This package shouldn't exist. It contains some common utilities shared
50 by Jupyter and IPython projects during The Big Splitâ„¢. As soon as
51 possible, those packages will remove their dependency on this.
52
53 # %%description -n python3-%{module} -l pl.UTF-8
54
55 %package apidocs
56 Summary:        %{module} API documentation
57 Summary(pl.UTF-8):      Dokumentacja API %{module}
58 Group:          Documentation
59
60 %description apidocs
61 API documentation for %{module}.
62
63 %description apidocs -l pl.UTF-8
64 Dokumentacja API %{module}.
65
66 %prep
67 %setup -q -n %{module}-%{version}
68 #%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
69
70 %build
71 %if %{with python2}
72 %py_build %{?with_tests:test}
73 %endif
74
75 %if %{with python3}
76 %py3_build %{?with_tests:test}
77 %endif
78
79 %if %{with doc}
80 cd docs
81 %{__make} -j1 html
82 rm -rf _build/html/_sources
83 %endif
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %py_install
90
91 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
92 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
93
94 %py_postclean
95 %endif
96
97 %if %{with python3}
98 %py3_install
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %doc README.md
108 %{py_sitescriptdir}/%{module}
109 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
110 %endif
111
112 %if %{with python3}
113 %files -n python3-%{module}
114 %defattr(644,root,root,755)
115 %doc README.md
116 %{py3_sitescriptdir}/%{module}
117 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
118 %endif
119
120 %if %{with doc}
121 %files apidocs
122 %defattr(644,root,root,755)
123 %doc docs/_build/html/*
124 %endif
This page took 0.049636 seconds and 2 git commands to generate.