Advertisement
cooperlees

Untitled

Nov 27th, 2019
2,925
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %define major_version 3.8
  2. %define version 3.8.0
  3.  
  4. Name:           python3
  5. Version:        %{version}
  6. Release:        cooper
  7. Summary:        Building latest %{major_version} Python
  8. License:        PSFL
  9. URL:            https://github.com/python/cpython
  10. Source0:        Python-%{version}.tgz
  11.  
  12. AutoReq:        no
  13. BuildRequires:  openssl-devel libffi-devel sqlite-devel zlib-devel
  14. # Requires:
  15.  
  16. %description
  17. Building the latest and greatest Python
  18.  
  19. # This is needed to prevent python byte code compilation errors on CentOS
  20. %global __os_install_post    \
  21.     /usr/lib/rpm/redhat/brp-compress \
  22.     %{!?__debug_package:\
  23.     /usr/lib/rpm/redhat/brp-strip %{__strip} \
  24.     /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
  25.     } \
  26.     /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
  27.     %{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \
  28. %{nil}
  29.  
  30. %prep
  31. zcat $RPM_SOURCE_DIR/Python-%{version}.tgz | tar -xvf -
  32.  
  33. %build
  34. cd Python-%{version}
  35. %configure --enable-optimizations --enable-ipv6 --enable-loadable-sqlite-extensions --with-ensurepip=upgrade
  36. make -j 4
  37.  
  38. %install
  39. cd Python-%{version}
  40. %make_install -j 4
  41.  
  42. %clean
  43. %{__rm} -rf %{buildroot}
  44.  
  45. %files
  46. /usr/bin/*
  47. /usr/include/python%{major_version}m/*
  48. /usr/lib/python%{major_version}/*
  49. /usr/lib64/*
  50. /usr/share/man/man1/*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement