Skip to content
Snippets Groups Projects
Commit 0ee32b76 authored by Neal Gompa's avatar Neal Gompa
Browse files

Remove Python 2 support from dnfdaemon

Python 2 is dead in Fedora and other Linux distributions as Python 2
is now EOL per the CPython developers.

Thus, we no longer will support Python 2 dnfdaemon clients.

Reference: https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
parent f5858f69
No related branches found
No related tags found
No related merge requests found
...@@ -87,10 +87,10 @@ run-tests-unit: FORCE ...@@ -87,10 +87,10 @@ run-tests-unit: FORCE
@PYTHONPATH=$(TESTLIBS) nosetests-$(PYVER3) -v -s test/test_common.py @PYTHONPATH=$(TESTLIBS) nosetests-$(PYVER3) -v -s test/test_common.py
instdeps: instdeps:
sudo dnf install python2-nose python3-gobject pygobject3 python3-nose sudo dnf install python3-gobject pygobject3 python3-nose
get-builddeps: get-builddeps:
sudo dnf install perl-TimeDate gettext intltool rpmdevtools python2-devel python3-devel python3-nose tito sudo dnf install perl-TimeDate gettext intltool rpmdevtools python3-devel python3-nose tito
build-setup: build-setup:
......
...@@ -65,22 +65,6 @@ Metapackage customizing the SELinux policy to ensure dnfdaemon works with ...@@ -65,22 +65,6 @@ Metapackage customizing the SELinux policy to ensure dnfdaemon works with
SELinux enabled in enforcing mode. SELinux enabled in enforcing mode.
%package -n python2-%{name}
Summary: Python 2 API for communicating with %{name}
BuildRequires: python2-devel
Requires: %{name} = %{version}-%{release}
%if 0%{?mageia}
Requires: python-gobject3
%else
Requires: python-gobject
%endif
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-%{name}
Python 2 API for communicating with %{name}.
%package -n python3-%{name} %package -n python3-%{name}
Summary: Python 3 API for communicating with %{name} Summary: Python 3 API for communicating with %{name}
...@@ -124,9 +108,6 @@ make install DESTDIR=%{buildroot} DATADIR=%{_datadir} SYSCONFDIR=%{_sysconfdir} ...@@ -124,9 +108,6 @@ make install DESTDIR=%{buildroot} DATADIR=%{_datadir} SYSCONFDIR=%{_sysconfdir}
%files selinux %files selinux
# empty metapackage # empty metapackage
%files -n python2-%{name}
%{python2_sitelib}/%{name}/
%files -n python3-%{name} %files -n python3-%{name}
%{python3_sitelib}/%{name}/client %{python3_sitelib}/%{name}/client
......
PYTHON2=python2
PYTHON3=python3 PYTHON3=python3
PACKAGE = dnfdaemon PACKAGE = dnfdaemon
PYFILES = $(wildcard *.py) PYFILES = $(wildcard *.py)
PYVER2 := $(shell $(PYTHON2) -c 'import sys; print("%.3s" %(sys.version))')
PYSYSDIR2 := $(shell $(PYTHON2) -c 'import sys; print(sys.prefix)')
PYLIBDIR2 = $(PYSYSDIR2)/lib/python$(PYVER2)
PKGDIR2 = $(PYLIBDIR2)/site-packages/$(PACKAGE)
PYVER3 := $(shell $(PYTHON3) -c 'import sys; print("%.3s" %(sys.version))') PYVER3 := $(shell $(PYTHON3) -c 'import sys; print("%.3s" %(sys.version))')
PYSYSDIR3 := $(shell $(PYTHON3) -c 'import sys; print(sys.prefix)') PYSYSDIR3 := $(shell $(PYTHON3) -c 'import sys; print(sys.prefix)')
PYLIBDIR3 = $(PYSYSDIR3)/lib/python$(PYVER3) PYLIBDIR3 = $(PYSYSDIR3)/lib/python$(PYVER3)
...@@ -19,9 +14,7 @@ clean: ...@@ -19,9 +14,7 @@ clean:
install: install:
mkdir -p $(DESTDIR)/$(PKGDIR2)
mkdir -p $(DESTDIR)/$(PKGDIR3) mkdir -p $(DESTDIR)/$(PKGDIR3)
for p in $(PYFILES) ; do \ for p in $(PYFILES) ; do \
install -m 644 $$p $(DESTDIR)/$(PKGDIR2)/$$p; \
install -m 644 $$p $(DESTDIR)/$(PKGDIR3)/$$p; \ install -m 644 $$p $(DESTDIR)/$(PKGDIR3)/$$p; \
done done
PYTHON2=python2
PYTHON3=python3 PYTHON3=python3
PACKAGE = dnfdaemon/client PACKAGE = dnfdaemon/client
PYFILES = $(wildcard *.py) PYFILES = $(wildcard *.py)
PYVER2 := $(shell $(PYTHON2) -c 'import sys; print("%.3s" %(sys.version))')
PYSYSDIR2 := $(shell $(PYTHON2) -c 'import sys; print(sys.prefix)')
PYLIBDIR2 = $(PYSYSDIR2)/lib/python$(PYVER2)
PKGDIR2 = $(PYLIBDIR2)/site-packages/$(PACKAGE)
PYVER3 := $(shell $(PYTHON3) -c 'import sys; print("%.3s" %(sys.version))') PYVER3 := $(shell $(PYTHON3) -c 'import sys; print("%.3s" %(sys.version))')
PYSYSDIR3 := $(shell $(PYTHON3) -c 'import sys; print(sys.prefix)') PYSYSDIR3 := $(shell $(PYTHON3) -c 'import sys; print(sys.prefix)')
PYLIBDIR3 = $(PYSYSDIR3)/lib/python$(PYVER3) PYLIBDIR3 = $(PYSYSDIR3)/lib/python$(PYVER3)
...@@ -19,9 +14,7 @@ clean: ...@@ -19,9 +14,7 @@ clean:
install: install:
mkdir -p $(DESTDIR)/$(PKGDIR2)
mkdir -p $(DESTDIR)/$(PKGDIR3) mkdir -p $(DESTDIR)/$(PKGDIR3)
for p in $(PYFILES) ; do \ for p in $(PYFILES) ; do \
install -m 644 $$p $(DESTDIR)/$(PKGDIR2)/$$p; \
install -m 644 $$p $(DESTDIR)/$(PKGDIR3)/$$p; \ install -m 644 $$p $(DESTDIR)/$(PKGDIR3)/$$p; \
done done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment