commit
f6be8cf8f8
|
@ -86,8 +86,7 @@ get_os_name () {
|
||||||
sed 's/.*(\(.*\)).*/\1/' | head -1 | \
|
sed 's/.*(\(.*\)).*/\1/' | head -1 | \
|
||||||
tr '[:upper:]' '[:lower:]'`
|
tr '[:upper:]' '[:lower:]'`
|
||||||
# For CentOS grab release
|
# For CentOS grab release
|
||||||
release=`cat /etc/*-release | grep -i 'almalinux\|rocky\|centos.*[0-9]' | \
|
release=`cat /etc/*-release | grep -i '^version_id=' | cut -d '"' -f 2 | cut -c 1`
|
||||||
sed 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' | head -1`
|
|
||||||
;;
|
;;
|
||||||
rhel|ol)
|
rhel|ol)
|
||||||
codename=`cat /etc/*-release | grep -i 'red hat.*(' | \
|
codename=`cat /etc/*-release | grep -i 'red hat.*(' | \
|
||||||
|
@ -522,7 +521,7 @@ case "$os" in
|
||||||
incr_step
|
incr_step
|
||||||
|
|
||||||
case "$os$release" in
|
case "$os$release" in
|
||||||
rhel8|centos8|amzn2)
|
rhel8|rhel9|centos8|centos9|amzn2)
|
||||||
check_python 3
|
check_python 3
|
||||||
python_supported=3
|
python_supported=3
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
gevent==21.8.0
|
||||||
|
greenlet==1.1.3
|
||||||
|
netaddr==0.8.0
|
||||||
|
flup==1.0.3
|
||||||
|
crossplane==0.5.7
|
||||||
|
rstr==3.0.0
|
||||||
|
python-daemon==2.2.4
|
||||||
|
ujson==5.4.0
|
||||||
|
PyMySQL==1.0.2
|
|
@ -23,13 +23,22 @@ BuildRequires: python3-pip
|
||||||
%if 0%{?amzn} >= 2
|
%if 0%{?amzn} >= 2
|
||||||
Requires: python3 >= 3.7
|
Requires: python3 >= 3.7
|
||||||
Requires: python3-requests
|
Requires: python3-requests
|
||||||
%else
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} == 8
|
||||||
Requires: python3 >= 3.6
|
Requires: python3 >= 3.6
|
||||||
Requires: python3-gevent
|
Requires: python3-gevent
|
||||||
Requires: python3-requests
|
Requires: python3-requests
|
||||||
Requires: python3-netifaces
|
Requires: python3-netifaces
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} == 9
|
||||||
|
Requires: python3 >= 3.9
|
||||||
|
Requires: python3-requests
|
||||||
|
Requires: python3-netifaces
|
||||||
|
Requires: python3-psutil
|
||||||
|
%endif
|
||||||
|
|
||||||
Requires: initscripts >= 8.36
|
Requires: initscripts >= 8.36
|
||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
|
|
||||||
|
@ -50,12 +59,17 @@ See http://nginx.com/amplify for more information
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n nginx-amplify-agent-%{version}
|
%setup -q -n nginx-amplify-agent-%{version}
|
||||||
cp -p %{SOURCE0} .
|
%{__cp} -p %{SOURCE0} .
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python3} -m pip install --upgrade --target=amplify --no-compile -r %%REQUIREMENTS%%
|
%{__python3} -m pip install --upgrade --target=amplify --no-compile -r %%REQUIREMENTS%%
|
||||||
%{__python3} -c 'import setuptools; exec(open("setup.py").read())' build
|
%if 0%{?rhel} == 9
|
||||||
|
# https://github.com/pypa/pip/issues/10629
|
||||||
|
%{__python3} -m pip install --upgrade --target=amplify_ --no-compile zope.event
|
||||||
|
%{__cp} -Pr amplify_/zope* amplify/
|
||||||
|
%endif
|
||||||
|
%{__python3} setup.py build
|
||||||
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
|
|
Loading…
Reference in New Issue