python-docutils-vl.spec 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  2. %define srcname docutils
  3. Name: python-%{srcname}
  4. Version: 0.6
  5. Release: 1%{?_dist_release}
  6. Summary: System for processing plaintext documentation
  7. Group: Development/Languages
  8. # See COPYING.txt for information
  9. License: Public Domain and MIT and Python and GPLv2
  10. URL: http://docutils.sourceforge.net
  11. Source0: http://downloads.sourceforge.net/docutils/%{srcname}-%{version}.tar.gz
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  13. BuildArch: noarch
  14. BuildRequires: python-devel
  15. BuildRequires: python-setuptools
  16. Requires: python-imaging
  17. Provides: docutils = %{version}-%{release}
  18. %description
  19. The Docutils project specifies a plaintext markup language, reStructuredText,
  20. which is easy to read and quick to write. The project includes a python
  21. library to parse rST files and transform them into other useful formats such
  22. as HTML, XML, and TeX as well as commandline tools that give the enduser
  23. access to this functionality.
  24. Currently, the library supports parsing rST that is in standalone files and
  25. PEPs (Python Enhancement Proposals). Work is underway to parse rST from
  26. Python inline documentation modules and packages.
  27. %prep
  28. %setup -q -n %{srcname}-%{version}
  29. # Remove a shebang from one of the library files
  30. %__sed -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' docutils/readers/python/pynodes.py
  31. %build
  32. CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
  33. %install
  34. rm -rf %{buildroot}
  35. %{__python} setup.py install --skip-build --root %{buildroot}
  36. for file in %{buildroot}/%{_bindir}/*.py; do
  37. mv $file `dirname $file`/`basename $file .py`
  38. done
  39. # We want the licenses but don't need this build file
  40. %__rm -f licenses/docutils.conf
  41. # docutils only installs this if its not already on the system. Due to the
  42. # possibility that a previous version of docutils may be installed, we install
  43. # it manually here.
  44. file=roman.py
  45. extradest=%{python_sitelib}
  46. fullextradest=%{buildroot}/$extradest
  47. install -D -m 0644 extras/$file $fullextradest/$file
  48. %clean
  49. %__rm -rf %{buildroot}
  50. %files
  51. %defattr(-,root,root,-)
  52. %doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
  53. %doc THANKS.txt licenses docs tools/editors
  54. %{_bindir}/*
  55. %{python_sitelib}/docutils/
  56. %{python_sitelib}/roman.*
  57. %{python_sitelib}/*egg-info
  58. %changelog
  59. * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 0.6-1
  60. - initial build based on Fedora development
  61. * Tue Jan 19 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6-1
  62. - Update for 0.6 release.
  63. - Switch from setuptools installed egg-info to distutils egg-info. Note that
  64. this works because we're also changing docutils version. To do this between
  65. 0.5-4 and 0.5-5, for instance, we'd need to have %%preun scriptlet to get rid
  66. of the egg-info directory.
  67. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
  68. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  69. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
  70. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  71. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5-2
  72. - Rebuild for Python 2.6
  73. * Wed Aug 6 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.5-1
  74. - New upstream version.
  75. * Mon Mar 3 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4-8
  76. - Use regular Requires syntax for python-imaging as missingok is just wrong.
  77. * Thu Sep 27 2007 Toshio Kuratomi <a.badger@gmail.com> 0.4-7
  78. - Build egg info.
  79. * Mon Aug 13 2007 Toshio Kuratomi <a.badger@gmail.com> 0.4-6
  80. - Last version had both the old and new rst.el. Try again with only
  81. the new one.
  82. * Sun Aug 12 2007 Toshio Kuratomi <a.badger@gmail.com> 0.4-5
  83. - Make License tag conform to the new Licensing Policy.
  84. - Fix the rst emacs mode (RH BZ 250100)
  85. * Sat Dec 09 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-4
  86. - Bump and rebuild for python 2.5 in devel.
  87. * Tue Aug 29 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-3
  88. - Bump for FC6 rebuild.
  89. - Remove python byte compilation as this is handled automatically in FC4+.
  90. - No longer %%ghost .pyo files.
  91. * Thu Feb 16 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-2
  92. - Bump and rebuild for FC5.
  93. * Sun Jan 15 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-1
  94. - Update to 0.4.
  95. - Scripted the listing of files in the python module.
  96. - Add a missingok requirement on python-imaging as docutils can make use of
  97. it when converting to formats that have images.
  98. * Tue Jun 7 2005 Toshio Kuratomi <toshio-tiki-lounge.com> 0.3.9-1
  99. - Update to version 0.3.9.
  100. - Use a dist tag as there aren't any differences between supported fc
  101. releases (FC3, FC4, devel.)
  102. * Thu May 12 2005 Toshio Kuratomi <toshio-tiki-lounge.com> 0.3.7-7
  103. - Bump version and rebuild to sync across architectures.
  104. * Sun Mar 20 2005 Toshio Kuratomi <toshio-tiki-lounge.com> 0.3.7-6
  105. - Rebuild for FC4t1
  106. * Sat Mar 12 2005 Toshio Kuratomi <toshio.tiki-lounge.com> 0.3.7-5
  107. - Add GPL as a license (mschwendt)
  108. - Use versioned Obsoletes and Provides (mschwendt)
  109. * Fri Mar 04 2005 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.7-4
  110. - Rename to python-docutils per the new packaging guidelines.
  111. * Wed Jan 12 2005 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.7-0.fdr.3
  112. - Really install roman.py and build roman.py[co]. Needed to make sure I have
  113. docutils installed to test that it builds roman.py fine in that case.
  114. * Tue Jan 11 2005 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.7-0.fdr.2
  115. - Special case roman.py to always install. This is the behaviour we want
  116. unless something else provides it. Will need to watch out for this in
  117. future Core and Extras packages, but the auto detection code makes it
  118. possible that builds will not be reproducible if roman.py were installed
  119. from another package.... Lesser of two evils here.
  120. - Provide python-docutils in case that package were preinstalled from
  121. another repository.
  122. * Fri Dec 31 2004 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.7-0.fdr.1
  123. - Update to 0.3.7
  124. - Rename from python-docutils to docutils.
  125. - Make roman.py optionally a part of the files list. In FC2, this will be
  126. included. In FC3, this won't.
  127. - BuildConflict with self since the docutils build detects the presence
  128. of roman.py and doesn't reinstall itself.
  129. * Mon Aug 9 2004 Toshio Kuratomi <toshio.tiki-lounge.com> 0:0.3.5-0.fdr.1
  130. - Update to 0.3.5.
  131. - Update spec style to latest fedora-rpmdevtools.
  132. - Merge everything into a single package. There isn't very much space
  133. advantage to having separate packages in a package this small and in
  134. this case, the documentation on using docutils as a library is also a
  135. good example of how to write in ReSructuredText.
  136. * Sat Jan 10 2004 Michel Alexandre Salim <salimma[AT]users.sf.net> 0:0.3-0.fdr.1
  137. - Initial RPM release.