Skip to content

Commit 65a4b84

Browse files
author
Gleb Goncharov
committedApr 29, 2017
Added RPM specs
1 parent 3dc9bde commit 65a4b84

File tree

3 files changed

+141
-1
lines changed

3 files changed

+141
-1
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var/
2828
# before PyInstaller builds the exe, so as to inject date/other infos into it.
2929
*.manifest
3030
*.spec
31+
!rpm/*.spec
3132

3233
# Installer logs
3334
pip-log.txt
@@ -59,4 +60,4 @@ target/
5960

6061
venv/
6162
venv3/
62-
.idea/
63+
.idea/

‎rpm/gixy.spec

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
########################################################################################
2+
3+
Summary: Nginx configuration static analyzer
4+
Name: gixy
5+
Version: 0.1.1
6+
Release: 0%{?dist}
7+
License: MPLv2.0
8+
Group: Development/Utilities
9+
URL: https://github.com/yandex/gixy
10+
11+
Source: https://github.com/yandex/%{name}/archive/v%{version}.tar.gz
12+
13+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14+
15+
BuildArch: noarch
16+
17+
BuildRequires: python-devel python-setuptools
18+
19+
Requires: python-setuptools python-six >= 1.1.0 python-jinja >= 2.8
20+
Requires: python2-cached_property >= 1.2.0 python2-configargparse >= 0.11.0
21+
Requires: python-argparse >= 1.4.0 pyparsing >= 1.5.5 python-markupsafe
22+
23+
Provides: %{name} = %{verion}-%{release}
24+
25+
########################################################################################
26+
27+
%description
28+
Gixy is a tool to analyze Nginx configuration. The main goal of Gixy is to prevent
29+
misconfiguration and automate flaw detection.
30+
31+
########################################################################################
32+
33+
%prep
34+
%setup -qn %{name}-%{version}
35+
36+
%clean
37+
rm -rf %{buildroot}
38+
39+
%build
40+
python setup.py build
41+
42+
%install
43+
rm -rf %{buildroot}
44+
python setup.py install --prefix=%{_prefix} \
45+
--root=%{buildroot}
46+
47+
########################################################################################
48+
49+
%files
50+
%defattr(-,root,root,-)
51+
%doc LICENSE AUTHORS README.md docs/*
52+
%{python_sitelib}/*
53+
%{_bindir}/%{name}
54+
55+
########################################################################################
56+
57+
%changelog
58+
* Sat Apr 29 2017 Yandex Team <opensource@yandex-team.ru> - 0.1.1-0
59+
- Initial build
60+

‎rpm/python-argparse.spec

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

0 commit comments

Comments
 (0)
Please sign in to comment.