python-pycparser-vl.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. %global with_python3 1
  2. Name: python-pycparser
  3. Summary: C parser and AST generator written in Python
  4. Version: 2.21
  5. Release: 1%{?_dist_release}
  6. Group: programming
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. License: BSD
  10. URL: http://github.com/eliben/pycparser
  11. Source0: https://github.com/eliben/pycparser/archive/release_v%{version}.tar.gz#/pycparser-%{version}.tar.gz
  12. Source1: pycparser-0.91.1-remove-relative-sys-path.py
  13. BuildArch: noarch
  14. BuildRequires: python-rpm-macros
  15. BuildRequires: python2-rpm-macros
  16. BuildRequires: python-devel python-setuptools
  17. %{?python_provide:%python_provide python-pycparser}
  18. %if 0%{?with_python3}
  19. BuildRequires: python3-rpm-macros
  20. BuildRequires: python3-devel python3-setuptools
  21. %endif # if with_python3
  22. BuildRequires: dos2unix
  23. %description
  24. pycparser is a complete parser for the C language, written in pure Python.
  25. It is a module designed to be easily integrated into applications that
  26. need to parse C source code.
  27. %if 0%{?with_python3}
  28. %package -n python3-pycparser
  29. Summary: C parser and AST generator written in Python
  30. Group: programming
  31. %{?python_provide:%python_provide python3-pycparser}
  32. %description -n python3-pycparser
  33. pycparser is a complete parser for the C language, written in pure Python.
  34. It is a module designed to be easily integrated into applications that
  35. need to parse C source code.
  36. %endif # if with_python3
  37. %prep
  38. %setup -q -n pycparser-release_v%{version}
  39. # examples
  40. %{__python2} %{SOURCE1} examples
  41. dos2unix LICENSE
  42. %build
  43. %py2_build
  44. pushd build/lib/pycparser
  45. %{__python2} _build_tables.py
  46. popd
  47. %if 0%{?with_python3}
  48. %pip3_build_wheel
  49. pushd build/lib/pycparser
  50. %{__python3} _build_tables.py
  51. popd
  52. %endif # with_python3
  53. %install
  54. %py2_install
  55. %if 0%{?with_python3}
  56. %pip3_install_wheel
  57. %endif # with_python3
  58. %check
  59. #%{__python2} tests/all_tests.py
  60. %if 0%{?with_python3}
  61. #%{__python3} tests/all_tests.py
  62. %endif # with_python3
  63. %files
  64. %license LICENSE
  65. %doc examples
  66. %{python_sitelib}/pycparser/
  67. %{python_sitelib}/pycparser-*.egg-info
  68. %if 0%{?with_python3}
  69. %files -n python3-pycparser
  70. %license LICENSE
  71. %doc examples
  72. %{python3_sitelib}/pycparser/
  73. %{python3_sitelib}/pycparser-*-info
  74. %endif # with_python3
  75. %changelog
  76. * Fri Oct 28 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.21-1
  77. - new upstream release.
  78. * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.20-1
  79. - new upstream release.
  80. * Mon Nov 19 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.19-1
  81. - initial build for Vine Linux.
  82. - new upstream release.
  83. * Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.14-15
  84. - Rebuilt for Python 3.7
  85. * Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.14-14
  86. - Update Python 2 dependency declarations to new packaging standards
  87. (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
  88. * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-13
  89. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  90. * Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2.14-12
  91. - Cleanup spec file conditionals
  92. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-11
  93. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  94. * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-10
  95. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  96. * Fri Jan 6 2017 Orion Poplawski <orion@cora.nwra.com> - 2.14-9
  97. - Ship python2-pycparser
  98. - Modernize spec
  99. * Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.14-8
  100. - Rebuild for Python 3.6
  101. * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-7
  102. - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
  103. * Fri Jul 8 2016 Tom Callaway <spot@fedoraproject.org> - 2.14-6
  104. - rebuild to update yacctab.py
  105. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-5
  106. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  107. * Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 2.14-4
  108. - Rebuilt for Python3.5 rebuild
  109. * Tue Jul 14 2015 Stephen Gallagher <sgallagh@redhat.com> - 2.14-3
  110. - Rebuild alongside python-ply 3.6
  111. * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-2
  112. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  113. * Tue Jun 09 2015 Nathaniel McCallum <npmccallum@redhat.com> - 2.14-1
  114. - Update to 2.14
  115. * Wed Aug 20 2014 Eric Smith <brouhaha@fedoraproject.org> 2.10-1
  116. - Update to latest upstream.
  117. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-9
  118. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  119. * Mon May 12 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.09.1-8
  120. - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
  121. * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-7
  122. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  123. * Tue Jul 23 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-6
  124. - Added Python 3 support.
  125. * Mon Jul 22 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-5
  126. - Renumbered Fedora-specific Patch1 to Patch100
  127. - Added new Patch1 to fix table generation when the build system
  128. already has a python-pycparser package installed.
  129. - Submitted Patch0 and Patch1 as upstream issues.
  130. - Added comments about patches.
  131. * Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-4
  132. - Upstream repository is now on github.
  133. - Fix rpmlint strange-permission complaint.
  134. - Rename patches, Source1 to all start with pycparser-{version}, to
  135. simplify updating patches for future upstream releases.
  136. * Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-3
  137. - Run _build_tables.py to build the lextab.py and yacctab.py; otherwise
  138. they have to be regenerated at runtime for no benefit.
  139. * Tue Mar 19 2013 Jos de Kloe <josdekloe@gmail.com> 2.09.1-2
  140. - remove the embedded ply code
  141. * Fri Jan 18 2013 Scott Tsai <scottt.tw@gmail.com> 2.09.1-1
  142. - upstream 2.09.1