Rename python3-cjdns to python36-cjdns, make cjdns-graph depend on python2
This commit is contained in:
parent
c497538822
commit
ded1e1ac5e
31
cjdns.spec
31
cjdns.spec
@ -84,7 +84,7 @@
|
|||||||
Name: cjdns
|
Name: cjdns
|
||||||
# major version is cjdns protocol version:
|
# major version is cjdns protocol version:
|
||||||
Version: 20.4
|
Version: 20.4
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: The privacy-friendly network without borders
|
Summary: The privacy-friendly network without borders
|
||||||
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
|
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
|
||||||
# cnacl is unused except when use_embedded is true
|
# cnacl is unused except when use_embedded is true
|
||||||
@ -246,7 +246,6 @@ BuildRequires: python2-rpm-macros
|
|||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
%endif
|
%endif
|
||||||
Requires: python2, %{name} = %{version}-%{release}
|
Requires: python2, %{name} = %{version}-%{release}
|
||||||
#Requires: python2-%{name} = %{version}-%{release}
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description -n python2-cjdns
|
%description -n python2-cjdns
|
||||||
@ -254,31 +253,32 @@ Python tools for cjdns.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%package -n python3-%{name}
|
%package -n python36-%{name}
|
||||||
%{?python_provide:%python_provide python3-%{name}}
|
%{?python_provide:%python_provide python3-%{name}}
|
||||||
Summary: Python tools for cjdns
|
Summary: Python tools for cjdns
|
||||||
BuildRequires: python3-rpm-macros, python3-devel
|
BuildRequires: python3-rpm-macros, python3-devel
|
||||||
Requires: python3, %{name} = %{version}-%{release}
|
Requires: python36, %{name} = %{version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if !%{with python2}
|
%if !%{with python2}
|
||||||
Obsoletes: python2-%{name} < 20.4-2
|
Obsoletes: python2-%{name} < 20.4-2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description -n python3-%{name}
|
%description -n python36-%{name}
|
||||||
Python tools for cjdns.
|
Python tools for cjdns.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%package graph
|
%package graph
|
||||||
Summary: Python peer graph tools for cjdns
|
Summary: Python peer graph tools for cjdns
|
||||||
|
%if 0%{?rhel} == 6 || 0%{?rhel} == 7
|
||||||
|
Requires: python2-%{name} = %{version}-%{release}
|
||||||
|
Requires: python-networkx
|
||||||
|
Requires: python2-matplotlib
|
||||||
|
%else
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
Requires: python3-%{name} = %{version}-%{release}
|
Requires: python3-%{name} = %{version}-%{release}
|
||||||
Requires: python3-networkx
|
Requires: python3-networkx
|
||||||
%else
|
%else
|
||||||
Requires: python2-%{name} = %{version}-%{release}
|
Requires: python2-%{name} = %{version}-%{release}
|
||||||
%if 0%{?rhel} == 6 || 0%{?rhel} == 7
|
|
||||||
Requires: python-networkx
|
|
||||||
Requires: python2-matplotlib
|
|
||||||
%else
|
|
||||||
Requires: python2-networkx
|
Requires: python2-networkx
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -355,7 +355,7 @@ find contrib/python/cjdnsadmin ! -executable -name "*.py" |
|
|||||||
xargs sed -e '\,^#!/usr/bin/env, d' -i
|
xargs sed -e '\,^#!/usr/bin/env, d' -i
|
||||||
find contrib/python -type f |
|
find contrib/python -type f |
|
||||||
xargs sed -e '1 s,^#!/usr/bin/env ,#!/usr/bin/,' -i
|
xargs sed -e '1 s,^#!/usr/bin/env ,#!/usr/bin/,' -i
|
||||||
sed -e '$ s,^python ,/usr/bin/python2 ,' -i contrib/python/cjdnsa
|
sed -e '$ s,^python ,/usr/bin/python3.6 ,' -i contrib/python/cjdnsa
|
||||||
|
|
||||||
# Remove #!env from nodejs scripts
|
# Remove #!env from nodejs scripts
|
||||||
find tools -type f | xargs grep -l '^#!\/usr\/bin\/env ' |
|
find tools -type f | xargs grep -l '^#!\/usr\/bin\/env ' |
|
||||||
@ -576,6 +576,12 @@ done
|
|||||||
|
|
||||||
# symlink python tools that pull in networkx for graphing
|
# symlink python tools that pull in networkx for graphing
|
||||||
for t in drawgraph dumpgraph graphStats; do
|
for t in drawgraph dumpgraph graphStats; do
|
||||||
|
|
||||||
|
%if 0%{?rhel} == 6 || 0%{?rhel} == 7
|
||||||
|
# cjdns-graph requirements are only in python2 on el7
|
||||||
|
sed -e '1 s,python3,python2,' -i %{buildroot}%{_libexecdir}/cjdns/python/$t
|
||||||
|
%endif
|
||||||
|
|
||||||
ln -sf %{_libexecdir}/cjdns/python/$t %{buildroot}%{_bindir}
|
ln -sf %{_libexecdir}/cjdns/python/$t %{buildroot}%{_bindir}
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -717,7 +723,7 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%files -n python3-cjdns
|
%files -n python36-cjdns
|
||||||
%doc python-cjdns/README.md python-cjdns/cjdns-dynamic.conf
|
%doc python-cjdns/README.md python-cjdns/cjdns-dynamic.conf
|
||||||
%license python-cjdns/cjdnsadmin/bencode.py.LICENSE.txt
|
%license python-cjdns/cjdnsadmin/bencode.py.LICENSE.txt
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
@ -757,6 +763,9 @@ fi
|
|||||||
%{_bindir}/graphStats
|
%{_bindir}/graphStats
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 12 2019 Stuart Gathman <stuart@gathman.org> - 20.4-3
|
||||||
|
- networkx for cjdns-graph subpackage requires python2 on el7
|
||||||
|
|
||||||
* Wed Oct 2 2019 Stuart Gathman <stuart@gathman.org> - 20.4-2
|
* Wed Oct 2 2019 Stuart Gathman <stuart@gathman.org> - 20.4-2
|
||||||
- Add python3 support for python API
|
- Add python3 support for python API
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user