]> git.pld-linux.org Git - packages/python-gflags.git/blame - python-gflags.spec
- rel 2
[packages/python-gflags.git] / python-gflags.spec
CommitLineData
bfb698a3
ER
1%define module gflags
2Summary: Commandline flags module for Python
03123136 3Summary(pl.UTF-8): Moduł flag linii poleceń dla Pythona
bfb698a3 4Name: python-%{module}
4e2de2ad 5Version: 2.0
285b5b26 6Release: 2
bfb698a3
ER
7License: BSD
8Group: Development/Languages/Python
03123136
JB
9#Source0Download: http://code.google.com/p/python-gflags/downloads/list
10Source0: http://python-gflags.googlecode.com/files/%{name}-%{version}.tar.gz
4e2de2ad 11# Source0-md5: c3ab70218dbf945cc32c0cd64c51d162
bfb698a3 12URL: http://code.google.com/p/python-gflags/
bfb698a3
ER
13BuildRequires: python-devel
14BuildRequires: python-distribute
15BuildRequires: rpmbuild(macros) >= 1.219
16BuildRequires: sed >= 4.0
17BuildArch: noarch
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
03123136 21This project is the Python equivalent of google-gflags, a Google
bfb698a3
ER
22commandline flag implementation for C++. It is intended to be used in
23situations where a project wants to mimic the command-line flag
24handling of a C++ app that uses google-gflags, or for a Python app
25that, via swig or some other means, is linked with a C++ app that uses
26google-gflags.
27
28The gflags package contains a library that implements commandline
29flags processing. As such it's a replacement for getopt(). It has
30increased flexibility, including built-in support for Python types,
31and the ability to define flags in the source file in which they're
32used. (This last is its major difference from OptParse.)
33
03123136
JB
34%description -l pl.UTF-8
35Ten projekt jest pythonowym odpowiednikiem google-gflags -
36implementacji C++ flag linii poleceń autorstwa Google. Jego
37zastosowaniem są projekty, które mają naśladować obsługę flag linii
38poleceń aplikacji C++ wykorzystujących google-gflags oraz aplikacje
39Pythona, które poprzez swig lub w inny sposób są zlinkowane z
40aplikacją C++ wykorzystującą google-gflags.
41
42Pakiet gflags zawiera bibliotekę implementującą przetwarzanie flag
43linii poleceń. Jako taka jest zamiennikiem getopt(). Ma większą
44elastyczność, w tym wbudowaną obsługę typów pythonowych oraz możliwość
45definiowania flag w plikach źródłowych, w których są używane (to
46ostatnie to główna różnica względem OptParse).
47
bfb698a3
ER
48%prep
49%setup -q
50# Fix non-executable-script error
4e2de2ad 51%{__sed} -i '/^#!\%{_prefix}\/bin\/env python$/,+1 d' %{module}.py
bfb698a3
ER
52
53%build
54%{__python} setup.py build
55
56%install
57rm -rf $RPM_BUILD_ROOT
58%{__python} setup.py install \
59 --skip-build \
60 --optimize=2 \
61 --root=$RPM_BUILD_ROOT
62
63%py_postclean
64
65# Remove ext from name
285b5b26 66%{__mv} $RPM_BUILD_ROOT%{_bindir}/gflags2man.py $RPM_BUILD_ROOT%{_bindir}/gflags2man
bfb698a3
ER
67
68%clean
69rm -rf $RPM_BUILD_ROOT
70
71%files
72%defattr(644,root,root,755)
73%doc AUTHORS ChangeLog COPYING README
74%attr(755,root,root) %{_bindir}/gflags2man
75%{py_sitescriptdir}/%{module}.py[co]
76%{py_sitescriptdir}/%{module}_validators.py[co]
bfb698a3 77%{py_sitescriptdir}/python_gflags-%{version}-py*.egg-info
This page took 0.10584 seconds and 4 git commands to generate.