2 Summary: Commandline flags module for Python
3 Summary(pl.UTF-8): Moduł flag linii poleceń dla Pythona
8 Group: Development/Languages/Python
9 #Source0: https://github.com/gflags/python-gflags/archive/%{name}-%{version}.tar.gz
10 Source0: http://python-gflags.googlecode.com/files/%{name}-%{version}.tar.gz
11 # Source0-md5: c3ab70218dbf945cc32c0cd64c51d162
12 URL: https://github.com/gflags/python-gflags
13 BuildRequires: python-devel
14 BuildRequires: python-distribute
15 BuildRequires: rpmbuild(macros) >= 1.710
16 BuildRequires: sed >= 4.0
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 This project is the Python equivalent of google-gflags, a Google
22 commandline flag implementation for C++. It is intended to be used in
23 situations where a project wants to mimic the command-line flag
24 handling of a C++ app that uses google-gflags, or for a Python app
25 that, via swig or some other means, is linked with a C++ app that uses
28 The gflags package contains a library that implements commandline
29 flags processing. As such it's a replacement for getopt(). It has
30 increased flexibility, including built-in support for Python types,
31 and the ability to define flags in the source file in which they're
32 used. (This last is its major difference from OptParse.)
34 %description -l pl.UTF-8
35 Ten projekt jest pythonowym odpowiednikiem google-gflags -
36 implementacji C++ flag linii poleceń autorstwa Google. Jego
37 zastosowaniem są projekty, które mają naśladować obsługę flag linii
38 poleceń aplikacji C++ wykorzystujących google-gflags oraz aplikacje
39 Pythona, które poprzez swig lub w inny sposób są zlinkowane z
40 aplikacją C++ wykorzystującą google-gflags.
42 Pakiet gflags zawiera bibliotekę implementującą przetwarzanie flag
43 linii poleceń. Jako taka jest zamiennikiem getopt(). Ma większą
44 elastyczność, w tym wbudowaną obsługę typów pythonowych oraz możliwość
45 definiowania flag w plikach źródłowych, w których są używane (to
46 ostatnie to główna różnica względem OptParse).
50 # Fix non-executable-script error
51 %{__sed} -i '/^#!\/usr\/bin\/env python$/,+1 d' %{module}.py
53 %{__sed} -i '1s,/usr/bin/env python,%{_bindir}/python,' gflags2man.py
59 rm -rf $RPM_BUILD_ROOT
64 # Remove ext from name
65 %{__mv} $RPM_BUILD_ROOT%{_bindir}/gflags2man{.py,}
68 rm -rf $RPM_BUILD_ROOT
71 %defattr(644,root,root,755)
72 %doc AUTHORS ChangeLog COPYING README
73 %attr(755,root,root) %{_bindir}/gflags2man
74 %{py_sitescriptdir}/gflags.py[co]
75 %{py_sitescriptdir}/gflags_validators.py[co]
76 %{py_sitescriptdir}/python_gflags-%{version}-py*.egg-info