Advertisement
david_david

python-virtualenv-clone.spec

Jan 7th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. %define module virtualenv-clone
  2.  
  3. Name: python-%{module}
  4. Version: 0.2.4
  5. Release: %mkrel 1
  6. Summary: Script to clone virtualenvs
  7. License: MIT
  8. Group: Development/Python
  9. Url: http://github.com/edwardgeorge/virtualenv-clone
  10. Source: virtualenv-clone-%{version}.tar.bz2
  11. BuildArch: noarch
  12. BuildRequires: python-devel
  13. BuildRequires: python-setuptools
  14. BuildRequires: python-virtualenv
  15.  
  16. Requires: python-virtualenv
  17.  
  18. %description
  19. virtualenv cloning script.
  20.  
  21. A script for cloning a non-relocatable virtualenv.
  22.  
  23. Virtualenv provides a way to make virtualenv's relocatable which could then
  24. be copied as we wanted. However making a virtualenv relocatable this way
  25. breaks the no-site-packages isolation of the virtualenv as well as other
  26. aspects that come with relative paths and '/usr/bin/env' shebangs that may
  27. be undesirable.
  28.  
  29. Also, the .pth and .egg-link rewriting doesn't seem to work as intended.
  30. This attempts to overcome these issues and provide a way to easily clone an
  31. existing virtualenv.
  32.  
  33. #-----------------------------------------------------------
  34.  
  35. %package -n python3-%{module}
  36. Summary: Script to clone virtualenvs
  37. Group: Development/Python
  38. BuildArch: noarch
  39. BuildRequires: python3-devel
  40. BuildRequires: python3-setuptools
  41. BuildRequires: python3-virtualenv
  42.  
  43. Requires: python3-virtualenv
  44.  
  45. %description -n python3-%{module}
  46. virtualenv cloning script.
  47.  
  48. A script for cloning a non-relocatable virtualenv.
  49.  
  50. Virtualenv provides a way to make virtualenv's relocatable which could then
  51. be copied as we wanted. However making a virtualenv relocatable this way
  52. breaks the no-site-packages isolation of the virtualenv as well as other
  53. aspects that come with relative paths and '/usr/bin/env' shebangs that may
  54. be undesirable.
  55.  
  56. Also, the .pth and .egg-link rewriting doesn't seem to work as intended.
  57. This attempts to overcome these issues and provide a way to easily clone an
  58. existing virtualenv.
  59.  
  60. This is the Python 3 build of %{module}.
  61.  
  62. #-----------------------------------------------------------
  63.  
  64. %prep
  65. %setup -q -n %{module}-%{version}
  66.  
  67. cp -a . %{py3dir}
  68.  
  69. %build
  70. pushd %{py3dir}
  71. %{__python3} setup.py build
  72. popd
  73.  
  74. %{__python} setup.py build
  75.  
  76. %install
  77. pushd %{py3dir}
  78. %{__python3} setup.py install --root=%{buildroot} --skip-build
  79. mv %{buildroot}%{_bindir}/virtualenv-clone %{buildroot}%{_bindir}/python3-virtualenv-clone
  80. popd
  81.  
  82. %{__python} setup.py install --root=%{buildroot} --skip-build
  83.  
  84. %files
  85. %{python_sitelib}/
  86. %{_bindir}/virtualenv-clone
  87.  
  88. %files -n python3-%{module}
  89. %{python3_sitelib}/
  90. %{_bindir}/python3-virtualenv-clone
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement