python-pycparser-vl.spec 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. %global with_python3 1
  2. Name: python-pycparser
  3. Summary: C parser and AST generator written in Python
  4. Version: 2.20
  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. %py3_build
  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. %py3_install
  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-*.egg-info
  74. %endif # with_python3
  75. %changelog
  76. * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.20-1
  77. - new upstream release.
  78. * Mon Nov 19 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.19-1
  79. - initial build for Vine Linux.
  80. - new upstream release.
  81. * Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.14-15
  82. - Rebuilt for Python 3.7
  83. * Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.14-14
  84. - Update Python 2 dependency declarations to new packaging standards
  85. (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
  86. * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-13
  87. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  88. * Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2.14-12
  89. - Cleanup spec file conditionals
  90. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-11
  91. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  92. * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-10
  93. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  94. * Fri Jan 6 2017 Orion Poplawski <orion@cora.nwra.com> - 2.14-9
  95. - Ship python2-pycparser
  96. - Modernize spec
  97. * Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.14-8
  98. - Rebuild for Python 3.6
  99. * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-7
  100. - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
  101. * Fri Jul 8 2016 Tom Callaway <spot@fedoraproject.org> - 2.14-6
  102. - rebuild to update yacctab.py
  103. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-5
  104. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  105. * Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 2.14-4
  106. - Rebuilt for Python3.5 rebuild
  107. * Tue Jul 14 2015 Stephen Gallagher <sgallagh@redhat.com> - 2.14-3
  108. - Rebuild alongside python-ply 3.6
  109. * Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-2
  110. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  111. * Tue Jun 09 2015 Nathaniel McCallum <npmccallum@redhat.com> - 2.14-1
  112. - Update to 2.14
  113. * Wed Aug 20 2014 Eric Smith <brouhaha@fedoraproject.org> 2.10-1
  114. - Update to latest upstream.
  115. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-9
  116. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  117. * Mon May 12 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.09.1-8
  118. - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
  119. * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.09.1-7
  120. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  121. * Tue Jul 23 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-6
  122. - Added Python 3 support.
  123. * Mon Jul 22 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-5
  124. - Renumbered Fedora-specific Patch1 to Patch100
  125. - Added new Patch1 to fix table generation when the build system
  126. already has a python-pycparser package installed.
  127. - Submitted Patch0 and Patch1 as upstream issues.
  128. - Added comments about patches.
  129. * Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-4
  130. - Upstream repository is now on github.
  131. - Fix rpmlint strange-permission complaint.
  132. - Rename patches, Source1 to all start with pycparser-{version}, to
  133. simplify updating patches for future upstream releases.
  134. * Sun Jul 21 2013 Eric Smith <brouhaha@fedoraproject.org> 2.09.1-3
  135. - Run _build_tables.py to build the lextab.py and yacctab.py; otherwise
  136. they have to be regenerated at runtime for no benefit.
  137. * Tue Mar 19 2013 Jos de Kloe <josdekloe@gmail.com> 2.09.1-2
  138. - remove the embedded ply code
  139. * Fri Jan 18 2013 Scott Tsai <scottt.tw@gmail.com> 2.09.1-1
  140. - upstream 2.09.1