python-pycparser-vl.spec 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. %global with_python3 1
  2. Name: python-pycparser
  3. Summary: C parser and AST generator written in Python
  4. Version: 2.19
  5. Release: 1%{?dist}
  6. License: BSD
  7. Group: System Environment/Libraries
  8. URL: http://github.com/eliben/pycparser
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. Source0: https://pypi.org/simple/pycparser/pycparser-%{version}.tar.gz
  12. Source1: pycparser-0.91.1-remove-relative-sys-path.py
  13. Patch100: pycparser-2.10-ply.patch
  14. # This is Fedora-specific; I don't think we should request upstream to
  15. # remove embedded libraries from their distribuution, when we can remove
  16. # them during packaging.
  17. BuildArch: noarch
  18. BuildRequires: python-devel python-setuptools
  19. %{?python_provide:%python_provide python-pycparser}
  20. %if 0%{?with_python3}
  21. BuildRequires: python3-devel python3-setuptools
  22. %endif # if with_python3
  23. BuildRequires: dos2unix
  24. %description
  25. pycparser is a complete parser for the C language, written in pure Python.
  26. It is a module designed to be easily integrated into applications that
  27. need to parse C source code.
  28. %if 0%{?with_python3}
  29. %package -n python3-pycparser
  30. Summary: C parser and AST generator written in Python
  31. Group: System Environment/Libraries
  32. %{?python_provide:%python_provide python3-pycparser}
  33. %description -n python3-pycparser
  34. pycparser is a complete parser for the C language, written in pure Python.
  35. It is a module designed to be easily integrated into applications that
  36. need to parse C source code.
  37. %endif # if with_python3
  38. %prep
  39. %setup -q -n pycparser-%{version}
  40. #patch100 -p1 -F5 -b .ply
  41. # remove embedded copy of ply
  42. #rm -rf pycparser/ply
  43. # examples
  44. %{__python} %{SOURCE1} examples
  45. dos2unix LICENSE
  46. %build
  47. %py_build
  48. pushd build/lib/pycparser
  49. %{__python} _build_tables.py
  50. popd
  51. %if 0%{?with_python3}
  52. %py3_build
  53. pushd build/lib/pycparser
  54. %{__python3} _build_tables.py
  55. popd
  56. %endif # with_python3
  57. %install
  58. %py_install
  59. %if 0%{?with_python3}
  60. %py3_install
  61. %endif # with_python3
  62. %check
  63. #%{__python2} tests/all_tests.py
  64. %if 0%{?with_python3}
  65. #%{__python3} tests/all_tests.py
  66. %endif # with_python3
  67. %files
  68. %license LICENSE
  69. %doc examples
  70. %{python_sitelib}/pycparser/
  71. %{python_sitelib}/pycparser-*.egg-info
  72. %if 0%{?with_python3}
  73. %files -n python3-pycparser
  74. %license LICENSE
  75. %doc examples
  76. %{python3_sitelib}/pycparser/
  77. %{python3_sitelib}/pycparser-*.egg-info
  78. %endif # with_python3
  79. %changelog
  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