diff --git a/osbs-client.spec b/osbs-client.spec index 6267f46..019ed96 100644 --- a/osbs-client.spec +++ b/osbs-client.spec @@ -1,22 +1,3 @@ -%if 0%{?rhel} && 0%{?rhel} <= 6 -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")} -%endif - -%if 0%{?rhel} && 0%{?rhel} <= 7 -%{!?py2_build: %global py2_build %{__python2} setup.py build} -%{!?py2_install: %global py2_install %{__python2} setup.py install --skip-build --root %{buildroot}} -%endif - -%if (0%{?fedora} >= 22 || 0%{?rhel} >= 8) -%global with_python3 1 -%global binaries_py_version %{python3_version} -%else -%global binaries_py_version %{python2_version} -%endif - %if (0%{?fedora} < 28) # tests are failling in f28 with new version of pytest # rhel/epel has no flexmock, pytest-capturelog @@ -31,7 +12,7 @@ %if 0%{?dev_release} %global postrelease dev -%global release 1 +%global release 2 %else %global postrelease 0 %global release 1 @@ -55,38 +36,10 @@ Source0: https://github.com/projectatomic/osbs-client/archive/%{commit}/o BuildArch: noarch -%if 0%{?with_python3} Requires: python3-osbs-client = %{version}-%{release} Requires: python3-requests Requires: python3-requests-kerberos -%else -Requires: python2-osbs-client = %{version}-%{release} -%endif -%if (0%{?fedora} && 0%{?fedora} <= 23) || (0%{?rhel} && 0%{?rhel} <= 7) -BuildRequires: python2-devel -BuildRequires: python-requests -BuildRequires: python-requests-kerberos -BuildRequires: python-setuptools -%else -BuildRequires: python2-devel -BuildRequires: python2-requests -BuildRequires: python2-requests-kerberos -BuildRequires: python2-setuptools -%endif - -%if 0%{?with_check} -BuildRequires: python2-pytest -BuildRequires: python2-pytest-capturelog -BuildRequires: python-flexmock -BuildRequires: python2-six -BuildRequires: python2-dockerfile-parse -BuildRequires: python2-requests -BuildRequires: python2-requests-kerberos -BuildRequires: PyYAML -%endif # with_check - -%if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %if 0%{?with_check} @@ -101,7 +54,6 @@ BuildRequires: python3-requests BuildRequires: python3-requests-kerberos BuildRequires: python3-PyYAML %endif # with_check -%endif # with_python3 Provides: osbs = %{version}-%{release} @@ -112,39 +64,6 @@ It is able to query OpenShift v3 for various stuff related to building images. It can initiate builds, list builds, get info about builds, get build logs... This package contains osbs command line client. -%package -n python2-osbs-client -%{?python_provide:%python_provide python2-osbs-client} -Summary: Python 2 module for OpenShift Build Service -Group: Development/Tools -License: BSD -Requires: python2-dockerfile-parse -Requires: python2-setuptools -Requires: python2-six -Requires: krb5-workstation -Requires: PyYAML -%if 0%{?rhel} && 0%{?rhel} <= 6 -Requires: python-argparse -%endif -%if (0%{?fedora} && 0%{?fedora} <= 23) || (0%{?rhel} && 0%{?rhel} <= 7) -Requires: python-requests -Requires: python-requests-kerberos -Requires: python-six -%else -Requires: python2-requests -Requires: python2-requests-kerberos -Requires: python2-six -%endif - -Provides: python-osbs = %{version}-%{release} -Obsoletes: python-osbs < %{osbs_obsolete_vr} -%{?python_provide:%python_provide python-osbs-client} - -%description -n python2-osbs-client -It is able to query OpenShift v3 for various stuff related to building images. -It can initiate builds, list builds, get info about builds, get build logs... -This package contains osbs Python 2 bindings. - -%if 0%{?with_python3} %package -n python3-osbs-client Summary: Python 3 module for OpenShift Build Service Group: Development/Tools @@ -166,7 +85,6 @@ Obsoletes: python3-osbs < %{osbs_obsolete_vr} It is able to query OpenShift v3 for various stuff related to building images. It can initiate builds, list builds, get info about builds, get build logs... This package contains osbs Python 3 bindings. -%endif # with_python3 %prep @@ -176,32 +94,16 @@ This package contains osbs Python 3 bindings. rm -f tests/test_http.py %build -%py2_build - -%if 0%{?with_python3} %py3_build -%endif # with_python3 %install -%if 0%{?with_python3} %py3_install -mv %{buildroot}%{_bindir}/osbs %{buildroot}%{_bindir}/osbs-%{python3_version} -ln -s %{_bindir}/osbs-%{python3_version} %{buildroot}%{_bindir}/osbs-3 -%endif # with_python3 -%py2_install -mv %{buildroot}%{_bindir}/osbs %{buildroot}%{_bindir}/osbs-%{python2_version} -ln -s %{_bindir}/osbs-%{python2_version} %{buildroot}%{_bindir}/osbs-2 -ln -s %{_bindir}/osbs-%{binaries_py_version} %{buildroot}%{_bindir}/osbs %if 0%{?with_check} %check -%if 0%{?with_python3} -LANG=en_US.utf8 py.test-%{python3_version} -vv tests -%endif # with_python3 - -LANG=en_US.utf8 py.test-%{python2_version} -vv tests +py.test-3 -vv tests %endif # with_check @@ -210,30 +112,20 @@ LANG=en_US.utf8 py.test-%{python2_version} -vv tests %{_bindir}/osbs -%files -n python2-osbs-client -%doc README.md -%{!?_licensedir:%global license %doc} -%license LICENSE -%{_bindir}/osbs-%{python2_version} -%{_bindir}/osbs-2 -%{python2_sitelib}/osbs* -%dir %{_datadir}/osbs -%{_datadir}/osbs/*.json - - -%if 0%{?with_python3} %files -n python3-osbs-client %doc README.md %{!?_licensedir:%global license %doc} %license LICENSE -%{_bindir}/osbs-%{python3_version} -%{_bindir}/osbs-3 +%{_bindir}/osbs %{python3_sitelib}/osbs* %dir %{_datadir}/osbs %{_datadir}/osbs/*.json -%endif # with_python3 + %changelog +* Mon Oct 22 2018 Miro HronĨok - 0.49-1 +- Drop Python 2 subpackage and Python versioned executables (#1640583) + * Mon Jul 30 2018 Clement Verna - 0.49-1 - New upstrean Release 0.49