Changeset 2478 in ProjectBuilder for projects/python-formats/pbconf/python-formats/rpm/python-formats.spec
- Timestamp:
- Feb 24, 2020, 2:10:19 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/python-formats/pbconf/python-formats/rpm/python-formats.spec
r2407 r2478 4 4 # Used if virtual name != real name (perl, ...) - replace PBPKG by PBREALPKG in the line below 5 5 %define srcname PBPKG 6 %define shortname formats 6 7 %define py3 PBPY3 8 %define py2 PBPY2 9 %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") 7 10 8 11 Summary: PBSUMMARY 9 12 10 Name: PB REALPKG13 Name: PBPKG 11 14 Version: PBVER 12 15 Release: PBTAGPBSUF … … 17 20 BuildArch: noarch 18 21 #PBPATCHSRC 19 Requires: PBDEP 20 BuildRequires: PBBDEP 22 23 %if %py2 24 #Requires: PBDEP 25 BuildRequires: PBBDEP 21 26 22 27 %description 23 28 PBDESC 24 29 python2 version 30 %endif 25 31 26 32 %if %py3 27 %package -n python3-PBREALPKG 28 Summary: %{summary} / Python 3 library 29 Requires: python3-PBREALPKG 30 BuildRequires: python3-setuptools 33 %if %py2 34 %package -n python3-%{shortname} 35 %endif 36 #Requires: PBDEP 37 BuildRequires: PBBDEP 31 38 32 %description -n python3-PBREALPKG 39 %if %py2 40 Summary: PBSUMMARY / Python3 version 41 %description -n python3-%{shortname} 42 %else 43 %description 44 %endif 33 45 PBDESC 34 46 python3 version … … 36 48 37 49 %prep 38 %setup -q -n %{srcname}-%{version}PBEXTDIR50 %setup -q -n PBPKG-%{version}PBEXTDIR 39 51 %if %py3 40 52 cd .. 41 cp -fr %{srcname}-%{version}PBEXTDIR python353 cp -fr PBPKG-%{version}PBEXTDIR python3 42 54 cd - 43 55 %endif … … 45 57 46 58 %build 59 %if %py2 47 60 %{__python} setup.py build 61 %endif 48 62 %if %py3 49 63 cd ../python3 50 %{__python3}setup.py build64 python3 setup.py build 51 65 cd - 52 66 %endif … … 54 68 %install 55 69 %{__rm} -rf %{buildroot} 70 %if %py2 56 71 %{__python} setup.py install -O1 --skip-build --root %{buildroot} 72 %endif 57 73 %if %py3 58 74 cd ../python3 59 %{__python3}setup.py install -O1 --skip-build --root %{buildroot}75 python3 setup.py install -O1 --skip-build --root %{buildroot} 60 76 cd - 61 77 %endif 62 78 79 %if %py2 63 80 %files 64 81 %doc README.rst 65 82 %{python_sitelib}/* 83 %endif 66 84 67 85 %if %py3 68 %files -n python3-PBREALPKG 86 %if %py2 87 %files -n python3-%{shortname} 88 %else 89 %files 90 %endif 69 91 %doc README.rst 70 92 %{python3_sitelib}/* … … 73 95 %changelog 74 96 PBLOG 75 76
Note:
See TracChangeset
for help on using the changeset viewer.