source:
ProjectBuilder/projects/python-formats/pbconf/python-formats/rpm/python-formats.spec@
2478
Last change on this file since 2478 was 2478, checked in by , 4 years ago | |
---|---|
File size: 1.5 KB |
Rev | Line | |
---|---|---|
[2407] | 1 | # |
2 | # $Id$ | |
3 | # | |
4 | # Used if virtual name != real name (perl, ...) - replace PBPKG by PBREALPKG in the line below | |
5 | %define srcname PBPKG | |
[2478] | 6 | %define shortname formats |
[2407] | 7 | %define py3 PBPY3 |
[2478] | 8 | %define py2 PBPY2 |
9 | %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") | |
[2407] | 10 | |
11 | Summary: PBSUMMARY | |
12 | ||
[2478] | 13 | Name: PBPKG |
[2407] | 14 | Version: PBVER |
15 | Release: PBTAGPBSUF | |
16 | License: PBLIC | |
17 | Group: PBGRP | |
18 | Url: PBURL | |
19 | Source: PBREPO/PBSRC | |
20 | BuildArch: noarch | |
21 | #PBPATCHSRC | |
22 | ||
[2478] | 23 | %if %py2 |
24 | #Requires: PBDEP | |
25 | BuildRequires: PBBDEP | |
26 | ||
[2407] | 27 | %description |
28 | PBDESC | |
29 | python2 version | |
[2478] | 30 | %endif |
[2407] | 31 | |
32 | %if %py3 | |
[2478] | 33 | %if %py2 |
34 | %package -n python3-%{shortname} | |
35 | %endif | |
36 | #Requires: PBDEP | |
37 | BuildRequires: PBBDEP | |
[2407] | 38 | |
[2478] | 39 | %if %py2 |
40 | Summary: PBSUMMARY / Python3 version | |
41 | %description -n python3-%{shortname} | |
42 | %else | |
43 | %description | |
44 | %endif | |
[2407] | 45 | PBDESC |
46 | python3 version | |
47 | %endif | |
48 | ||
49 | %prep | |
[2478] | 50 | %setup -q -n PBPKG-%{version}PBEXTDIR |
[2407] | 51 | %if %py3 |
52 | cd .. | |
[2478] | 53 | cp -fr PBPKG-%{version}PBEXTDIR python3 |
[2407] | 54 | cd - |
55 | %endif | |
56 | #PBPATCHCMD | |
57 | ||
58 | %build | |
[2478] | 59 | %if %py2 |
[2407] | 60 | %{__python} setup.py build |
[2478] | 61 | %endif |
[2407] | 62 | %if %py3 |
63 | cd ../python3 | |
[2478] | 64 | python3 setup.py build |
[2407] | 65 | cd - |
66 | %endif | |
67 | ||
68 | %install | |
69 | %{__rm} -rf %{buildroot} | |
[2478] | 70 | %if %py2 |
[2407] | 71 | %{__python} setup.py install -O1 --skip-build --root %{buildroot} |
[2478] | 72 | %endif |
[2407] | 73 | %if %py3 |
74 | cd ../python3 | |
[2478] | 75 | python3 setup.py install -O1 --skip-build --root %{buildroot} |
[2407] | 76 | cd - |
77 | %endif | |
78 | ||
[2478] | 79 | %if %py2 |
[2407] | 80 | %files |
81 | %doc README.rst | |
82 | %{python_sitelib}/* | |
[2478] | 83 | %endif |
[2407] | 84 | |
85 | %if %py3 | |
[2478] | 86 | %if %py2 |
87 | %files -n python3-%{shortname} | |
88 | %else | |
89 | %files | |
90 | %endif | |
[2407] | 91 | %doc README.rst |
92 | %{python3_sitelib}/* | |
93 | %endif | |
94 | ||
95 | %changelog | |
96 | PBLOG |
Note:
See TracBrowser
for help on using the repository browser.