python-wheel-vl.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. %bcond_with bootstrap
  2. %bcond_with signatures
  3. %bcond_without tool
  4. %bcond_with test
  5. %global pypi_name wheel
  6. Name: python-%{pypi_name}
  7. Version: 0.30.0a0
  8. Release: 8%{?_dist_release}
  9. Summary: A built-package format for Python
  10. Group: Development/Libraries
  11. License: MIT
  12. URL: https://bitbucket.org/pypa/wheel
  13. Source0: https://files.pythonhosted.org/packages/source/%(n=%{pypi_name}; echo ${n:0:1})/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
  14. BuildArch: noarch
  15. Vendor: Project Vine
  16. Distribution: Vine Linux
  17. # Latest version of wheel requires the package keyrings.alt in order for the tests to pass,
  18. # however it can't be packaged for Fedora as of yet since the code is not licensed,
  19. # and as a result wheel fails to build from source.
  20. # Review request of keyrings.alt: https://bugzilla.redhat.com/show_bug.cgi?id=1365794
  21. # Until the license issue is resolved upstream, this patch is added to revert
  22. # the commit from wheel, that introduced this dependency.
  23. # https://bitbucket.org/pypa/wheel/commits/06841295888fdb430abe12aae29da92107e7360a
  24. Patch0: remove-keyrings.alt-dependency.patch
  25. BuildRequires: python-devel
  26. BuildRequires: python-setuptools
  27. %if ! %{with bootstrap}
  28. %if %{with test}
  29. BuildRequires: python3-pytest
  30. BuildRequires: python-jsonschema
  31. %endif
  32. %if %{with signatures}
  33. BuildRequires: pyxdg
  34. BuildRequires: python-keyring
  35. %endif
  36. %endif
  37. %{?python_provide:%python_provide python2-%{pypi_name}}
  38. %global _description \
  39. A built-package format for Python.\
  40. \
  41. A wheel is a ZIP-format archive with a specially formatted filename and the\
  42. .whl extension. It is designed to contain all the files for a PEP 376\
  43. compatible install in a way that is very close to the on-disk format.
  44. %description %{_description}
  45. Python 2 version.
  46. %package -n python3-%{pypi_name}
  47. Summary: %{summary}
  48. BuildRequires: python3-devel
  49. BuildRequires: python3-setuptools
  50. %if ! %{with bootstrap}
  51. %if %{with test}
  52. BuildRequires: python3-pytest
  53. BuildRequires: python3-jsonschema
  54. %endif
  55. %if %{with signatures}
  56. BuildRequires: python3-pyxdg
  57. BuildRequires: python3-keyring
  58. %endif
  59. %endif
  60. %{?python_provide:%python_provide python3-%{pypi_name}}
  61. %description -n python3-%{pypi_name} %{_description}
  62. Python 3 version.
  63. %prep
  64. %setup -q -n %{pypi_name}-%{version}
  65. # remove unneeded shebangs
  66. sed -ie '1d' %{pypi_name}/{egg2wheel,wininst2wheel}.py
  67. %patch0 -p1
  68. %build
  69. %py_build
  70. %py3_build
  71. %install
  72. rm -rf %{buildroot}
  73. %py_install
  74. %if %{with tool}
  75. mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python_version}}
  76. ln -s %{pypi_name}-%{python_version} %{buildroot}%{_bindir}/%{pypi_name}-2
  77. %endif
  78. %py3_install
  79. %if %{with tool}
  80. mv %{buildroot}%{_bindir}/%{pypi_name}{,-%{python3_version}}
  81. ln -s %{pypi_name}-%{python3_version} %{buildroot}%{_bindir}/%{pypi_name}-3
  82. ln -s %{pypi_name}-2 %{buildroot}%{_bindir}/%{pypi_name}
  83. %endif
  84. %if %{with test}
  85. %check
  86. rm setup.cfg
  87. PYTHONPATH=%{buildroot}%{python_sitelib} py.test-2 -v --ignore build
  88. PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build
  89. %endif
  90. %files
  91. %license LICENSE.txt
  92. %doc CHANGES.txt README.txt
  93. %if %{with tool}
  94. %{_bindir}/%{pypi_name}
  95. %{_bindir}/%{pypi_name}-2
  96. %{_bindir}/%{pypi_name}-%{python_version}
  97. %endif
  98. %{python_sitelib}/%{pypi_name}*
  99. %exclude %{python_sitelib}/%{pypi_name}/test
  100. %files -n python3-%{pypi_name}
  101. %license LICENSE.txt
  102. %doc CHANGES.txt README.txt
  103. %if %{with tool}
  104. %{_bindir}/%{pypi_name}-3
  105. %{_bindir}/%{pypi_name}-%{python3_version}
  106. %endif
  107. %{python3_sitelib}/%{pypi_name}*
  108. %exclude %{python3_sitelib}/%{pypi_name}/test
  109. %changelog
  110. * Mon Dec 18 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.30.0a0-8
  111. - initial build for Vine Linux.
  112. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0a0-7
  113. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  114. * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0a0-6
  115. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  116. * Tue Jan 03 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.30.0a0-5
  117. - Enable tests
  118. * Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.30.0a0-4
  119. - Rebuild for Python 3.6 without tests
  120. * Tue Dec 06 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.30.0a0-3
  121. - Add bootstrap method
  122. * Mon Sep 19 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.30.0a0-2
  123. - Use the python_provide macro
  124. * Mon Sep 19 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.30.0a0-1
  125. - Update to 0.30.0a0
  126. - Added patch to remove keyrings.alt dependency
  127. * Wed Aug 10 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.29.0-1
  128. - Update to 0.29.0
  129. - Cleanups and fixes
  130. * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26.0-3
  131. - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
  132. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-2
  133. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  134. * Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 0.26.0-1
  135. - Update to 0.26.0
  136. - Rebuilt for Python3.5 rebuild
  137. * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.24.0-4
  138. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  139. * Tue Jan 13 2015 Slavek Kabrda <bkabrda@redhat.com> - 0.24.0-3
  140. - Make spec buildable in EPEL 6, too.
  141. - Remove additional sources added to upstream tarball.
  142. * Sat Jan 03 2015 Matej Cepl <mcepl@redhat.com> - 0.24.0-2
  143. - Make python3 conditional (switched off for RHEL-7; fixes #1131111).
  144. * Mon Nov 10 2014 Slavek Kabrda <bkabrda@redhat.com> - 0.24.0-1
  145. - Update to 0.24.0
  146. - Remove patches merged upstream
  147. * Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22.0-4
  148. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  149. * Fri Apr 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 0.22.0-3
  150. - Another rebuild with python 3.4
  151. * Fri Apr 18 2014 Matej Stuchlik <mstuchli@redhat.com> - 0.22.0-2
  152. - Rebuild with python 3.4
  153. * Thu Nov 28 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.22.0-1
  154. - Initial package.