python-argparse.spec 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ########################################################################################
  2. %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
  3. ########################################################################################
  4. %define pkg_name argparse
  5. %define pkg_version r140
  6. ########################################################################################
  7. Summary: Python command-line parsing library
  8. Name: python-argparse
  9. Version: 1.4.0
  10. Release: 0%{?dist}
  11. License: Python License
  12. Group: Development/Libraries
  13. URL: https://github.com/ThomasWaldmann/argparse
  14. Source: https://github.com/ThomasWaldmann/%{pkg_name}/archive/%{pkg_version}.tar.gz
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  16. BuildArch: noarch
  17. BuildRequires: python >= 2.3 python-setuptools
  18. Requires: python >= 2.3 python-setuptools
  19. Provides: %{name} = %{verion}-%{release}
  20. ########################################################################################
  21. %description
  22. The argparse module makes it easy to write user friendly command line interfaces.
  23. The program defines what arguments it requires, and argparse will figure out
  24. how to parse those out of sys.argv. The argparse module also automatically
  25. generates help and usage messages and issues errors when users give the program
  26. invalid arguments.
  27. As of Python >= 2.7 and >= 3.2, the argparse module is maintained within the
  28. Python standard library. For users who still need to support Python < 2.7 or
  29. < 3.2, it is also provided as a separate package, which tries to stay
  30. compatible with the module in the standard library, but also supports older
  31. Python versions.
  32. argparse is licensed under the Python license, for details see LICENSE.txt.
  33. ########################################################################################
  34. %prep
  35. %setup -qn %{pkg_name}-%{pkg_version}
  36. %clean
  37. rm -rf %{buildroot}
  38. %build
  39. python setup.py build
  40. %install
  41. rm -rf %{buildroot}
  42. python setup.py install --prefix=%{_prefix} \
  43. --single-version-externally-managed -O1 \
  44. --root=%{buildroot}
  45. ########################################################################################
  46. %files
  47. %defattr(-,root,root,-)
  48. %doc LICENSE.txt NEWS.txt README.txt
  49. %{python_sitelib}/*
  50. ########################################################################################
  51. %changelog
  52. * Sat Apr 29 2017 Yandex Team <opensource@yandex-team.ru> - 1.4.0-0
  53. - Initial build