-
Notifications
You must be signed in to change notification settings - Fork 1
/
openshift-origin-cartridge-python.spec
194 lines (168 loc) · 7.71 KB
/
openshift-origin-cartridge-python.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
%global cartridgedir %{_libexecdir}/openshift/cartridges/python
%global httpdconfdir /etc/openshift/cart.conf.d/httpd/python
Name: openshift-origin-cartridge-python
Version: 1.22.0
Release: 1%{?dist}
Summary: Python cartridge
Group: Development/Languages
License: ASL 2.0
URL: https://www.openshift.com
Source0: http://mirror.openshift.com/pub/openshift-origin/source/%{name}/%{name}-%{version}.tar.gz
Requires: rubygem(openshift-origin-node)
Requires: openshift-origin-node-util
%if 0%{?fedora}%{?rhel} <= 6
Requires: python >= 2.6
Requires: python < 2.7
Requires: scl-utils
BuildRequires: scl-utils-build
#FIXME: Use %scl_require macro to properly define dependencies
Requires: python27
Requires: mod_wsgi >= 3.2
Requires: mod_wsgi < 3.4
%endif
%if 0%{?fedora} >= 19
Requires: python >= 2.7
Requires: python < 2.8
Requires: mod_wsgi >= 3.4
Requires: mod_wsgi < 3.5
%endif
Requires: python-virtualenv
%if 0%{?fedora}%{?rhel} <= 6
Requires: python27-python-pip-virtualenv
Requires: python27-mod_wsgi
Requires: python33-python-virtualenv
Requires: python33-mod_wsgi
%endif
Provides: openshift-origin-cartridge-community-python-2.7 = 2.0.0
Provides: openshift-origin-cartridge-community-python-3.3 = 2.0.0
Provides: openshift-origin-cartridge-python-2.6 = 2.0.0
Obsoletes: openshift-origin-cartridge-community-python-2.7 <= 1.99.9
Obsoletes: openshift-origin-cartridge-community-python-3.3 <= 1.99.9
Obsoletes: openshift-origin-cartridge-python-2.6 <= 1.99.9
BuildArch: noarch
%description
Python cartridge for OpenShift. (Cartridge Format V2)
%prep
%setup -q
%build
%__rm %{name}.spec
%__rm logs/.gitkeep
%__rm run/.gitkeep
%install
%__mkdir -p %{buildroot}%{cartridgedir}
%__cp -r * %{buildroot}%{cartridgedir}
%__mkdir -p %{buildroot}%{httpdconfdir}
%__mkdir -p %{buildroot}%{cartridgedir}/env
%if 0%{?fedora}%{?rhel} <= 6
%__mv %{buildroot}%{cartridgedir}/metadata/manifest.yml.rhel %{buildroot}%{cartridgedir}/metadata/manifest.yml
%endif
%if 0%{?fedora} == 19
%__mv %{buildroot}%{cartridgedir}/metadata/manifest.yml.f19 %{buildroot}%{cartridgedir}/metadata/manifest.yml
%endif
%__rm -f %{buildroot}%{cartridgedir}/metadata/manifest.yml.*
%__mkdir -p %{buildroot}%{cartridgedir}/usr/versions/{2.6,2.7,3.3}
%if 0%{?fedora}%{?rhel} <= 6
%__cp -anv %{buildroot}%{cartridgedir}/usr/versions/2.7-scl/* %{buildroot}%{cartridgedir}/usr/versions/2.7/
%__cp -anv %{buildroot}%{cartridgedir}/usr/versions/3.3-scl/* %{buildroot}%{cartridgedir}/usr/versions/3.3/
%endif
%__cp -anv %{buildroot}%{cartridgedir}/usr/versions/shared/* %{buildroot}%{cartridgedir}/usr/versions/2.6/
%__cp -anv %{buildroot}%{cartridgedir}/usr/versions/shared/* %{buildroot}%{cartridgedir}/usr/versions/2.7/
%__cp -anv %{buildroot}%{cartridgedir}/usr/versions/shared/* %{buildroot}%{cartridgedir}/usr/versions/3.3/
%__rm -rf %{buildroot}%{cartridgedir}/usr/versions/shared
%__rm -rf %{buildroot}%{cartridgedir}/usr/versions/2.7-scl
%__rm -rf %{buildroot}%{cartridgedir}/usr/versions/3.3-scl
%files
%dir %{cartridgedir}
%attr(0755,-,-) %{cartridgedir}/bin/
%dir %{httpdconfdir}
%attr(0755,-,-) %{httpdconfdir}
%if 0%{?fedora}%{?rhel} <= 6
%attr(0755,-,-) %{cartridgedir}/usr/versions/2.6/bin/
%attr(0755,-,-) %{cartridgedir}/usr/versions/2.6/bin/*
%endif
%attr(0755,-,-) %{cartridgedir}/usr/versions/2.7/bin/*
%attr(0755,-,-) %{cartridgedir}/usr/versions/3.3/bin/*
%{cartridgedir}
%doc %{cartridgedir}/README.md
%doc %{cartridgedir}/COPYRIGHT
%doc %{cartridgedir}/LICENSE
%changelog
* Wed Mar 05 2014 Adam Miller <[email protected]> 1.21.3-1
- virtualenv and mod_wsgi are required for python 2.6, 2.7 and 3.3.
* Mon Mar 03 2014 Adam Miller <[email protected]> 1.21.2-1
- Merge pull request #4862 from VojtechVitek/fix_bash_regexp
- fix bash regexp in upgrade scripts ([email protected])
- requirements.txt documentation ([email protected])
- Python - DocumentRoot logic, Repository Layout simplification
- Update python cartridge to support LD_LIBRARY_PATH_ELEMENT
- Template cleanup ([email protected])
* Thu Feb 27 2014 Adam Miller <[email protected]> 1.21.1-1
- python $OPENSHIFT_PYTHONNODEJS_REQUIREMENTS_PATH ENV VAR ([email protected])
- bump_minor_versions for sprint 41 ([email protected])
* Sun Feb 16 2014 Adam Miller <[email protected]> 1.20.5-1
- httpd cartridges: OVERRIDE with custom httpd conf ([email protected])
* Wed Feb 12 2014 Adam Miller <[email protected]> 1.20.4-1
- Merge pull request #4744 from mfojtik/latest_versions
- Card origin_cartridge_111 - Updated cartridge versions for stage cut
- Merge pull request #4729 from tdawson/2014-02/tdawson/fix-obsoletes
- Merge pull request #4372 from maxamillion/admiller/no_defaulttype_apache24
- Fix obsoletes and provides ([email protected])
- This directive throws a deprecation warning in apache 2.4
* Tue Feb 11 2014 Adam Miller <[email protected]> 1.20.3-1
- Merge pull request #4712 from tdawson/2014-02/tdawson/cartridge-deps
- Bug 1063677 - Show apache running info when run "rhc cartridge status" for
python app ([email protected])
- Merge pull request #4707 from danmcp/master ([email protected])
- Cleanup cartridge dependencies ([email protected])
- Merge pull request #4559 from fabianofranz/dev/441
- Bug 888714 - Remove gitkeep files from rpms ([email protected])
- Removed references to OpenShift forums in several places
* Mon Feb 10 2014 Adam Miller <[email protected]> 1.20.2-1
- Cleaning specs ([email protected])
- Bug 1060902: Fix relative venv function during install_setup_tools
- Bug 1060295: Make setup reentrant for cp operations ([email protected])
- <httpd carts> bug 1060068: ensure extra httpd conf dirs exist
* Thu Jan 30 2014 Adam Miller <[email protected]> 1.20.1-1
- Remove community tag from Python manifests ([email protected])
- bump_minor_versions for sprint 40 ([email protected])
* Thu Jan 23 2014 Adam Miller <[email protected]> 1.19.8-1
- Bump up cartridge versions ([email protected])
* Mon Jan 20 2014 Adam Miller <[email protected]> 1.19.7-1
- <perl,python,phpmyadmin carts> bug 1055095 ([email protected])
* Fri Jan 17 2014 Adam Miller <[email protected]> 1.19.6-1
- Merge pull request #4502 from sosiouxme/custom-cart-confs
- <python cart> enable providing custom gear server confs ([email protected])
* Fri Jan 17 2014 Adam Miller <[email protected]> 1.19.5-1
- Merge pull request #4462 from bparees/cart_data_cleanup
- remove unnecessary cart-data variable descriptions ([email protected])
* Tue Jan 14 2014 Adam Miller <[email protected]> 1.19.4-1
- Merge pull request #4464 from ironcladlou/bz/1052103
- Bug 1052103: Fix template app.py for Python 3.3 ([email protected])
* Mon Jan 13 2014 Adam Miller <[email protected]> 1.19.3-1
- Merge pull request #4461 from ironcladlou/bz/1052059
- Bug 1052059: Fix Python 3.3 venv path references ([email protected])
- Bug 1051910: Fix Python 2.6 regressions ([email protected])
- Merge pull request #4444 from ironcladlou/dev/python-scl
- Fixing double-slash in python and posgresql cartridge code
- Convert Python 3.3 community cart to use SCL Python 3.3