]> git.pld-linux.org Git - packages/python-gflags.git/blob - python-gflags.spec
- release 5 (by relup.sh)
[packages/python-gflags.git] / python-gflags.spec
1 %define         module gflags
2 Summary:        Commandline flags module for Python
3 Summary(pl.UTF-8):      Moduł flag linii poleceń dla Pythona
4 Name:           python-%{module}
5 Version:        2.0
6 Release:        5
7 License:        BSD
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
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
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
26 google-gflags.
27
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.)
33
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.
41
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).
47
48 %prep
49 %setup -q
50 # Fix non-executable-script error
51 %{__sed} -i '/^#!\/usr\/bin\/env python$/,+1 d' %{module}.py
52
53 %{__sed} -i '1s,/usr/bin/env python,%{_bindir}/python,' gflags2man.py
54
55 %build
56 %py_build
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 %py_install
61
62 %py_postclean
63
64 # Remove ext from name
65 %{__mv} $RPM_BUILD_ROOT%{_bindir}/gflags2man{.py,}
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %files
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
This page took 0.070275 seconds and 3 git commands to generate.