#2 Switch to Python 3
Merged 2 years ago by churchyard. Opened 2 years ago by pviktori.
rpms/ pviktori/zookeeper py3  into  master

file modified
+18 -13

@@ -3,7 +3,7 @@ 

  

  Name:          zookeeper

  Version:       3.4.9

- Release:       11%{?dist}

+ Release:       12%{?dist}

  Summary:       A high-performance coordination service for distributed applications

  License:       ASL 2.0 and BSD

  URL:           https://zookeeper.apache.org/

@@ -34,7 +34,7 @@ 

  BuildRequires: jpackage-utils

  BuildRequires: libtool

  BuildRequires: libxml2-devel

- BuildRequires: python2-devel

+ BuildRequires: python3-devel

  

  BuildRequires: ant

  BuildRequires: ant-junit

@@ -112,19 +112,20 @@ 

  %description javadoc

  This package contains javadoc for %{name}.

  

- %package -n python2-%{name}

- %{?python_provide:%python_provide python2-%{name}}

+ %package -n python3-%{name}

+ %{?python_provide:%python_provide python3-%{name}}

  Summary:       Python support for %{name}

  Requires:      %{name}%{?_isa} = %{version}-%{release}

- Provides:      zkpython%{?_isa} = %{version}-%{release}

- Requires:      python2

  

- %description -n python2-%{name}

- The python-%{name} package contains Python bindings for %{name}.

+ %description -n python3-%{name}

+ Python bindings for %{name}.

  

  %prep

  %autosetup -p1

  

+ # Do not treat C compile-time warnings as errors

+ sed -i -e's/-Werror//' src/c/Makefile.am

+ 

  iconv -f iso8859-1 -t utf-8 src/c/ChangeLog > src/c/ChangeLog.conv && mv -f src/c/ChangeLog.conv src/c/ChangeLog

  sed -i 's/\r//' src/c/ChangeLog

  

@@ -215,9 +216,9 @@ 

  cp -pr build/docs/api/* %{buildroot}%{_javadocdir}/%{name}/

  

  pushd src/contrib/zkpython

- %{__python} src/python/setup.py build --build-base=$PWD/build \

+ %{__python3} src/python/setup.py build --build-base=$PWD/build \

  install --root=%{buildroot} ;\

- chmod 0755 %{buildroot}%{python_sitearch}/zookeeper.so

+ chmod 0755 %{buildroot}%{python3_sitearch}/zookeeper.cpython-*.so

  popd

  

  find %{buildroot} -name '*.la' -exec rm -f {} ';'

@@ -298,12 +299,16 @@ 

  %{_javadocdir}/%{name}

  %doc LICENSE.txt NOTICE.txt

  

- %files -n python2-%{name}

- %{python2_sitearch}/ZooKeeper-?.?-py%{python_version}.egg-info

- %{python2_sitearch}/zookeeper.so

+ %files -n python3-%{name}

+ %{python3_sitearch}/ZooKeeper-?.?-py%{python3_version}.egg-info

+ %{python3_sitearch}/zookeeper.cpython-*.so

  %doc LICENSE.txt NOTICE.txt src/contrib/zkpython/README

  

  %changelog

+ * Wed Nov 28 2018 Petr Viktorin <pviktori@redhat.com> - 3.4.9-12

+ - Switch to Python 3

+   https://bugzilla.redhat.com/show_bug.cgi?id=1630088

+ 

  * Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.9-11

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

  

https://bugzilla.redhat.com/show_bug.cgi?id=1630088

The C parts failed to build with -Werror, so I'm including an additional commit to disable -Werror. Please solve that in a better way.

I would use sed for this ;)

Disabling Werror is really good idea ;)

Your name here maybe?

1 new commit added

  • Address review comments
2 years ago

Looks good to me. Ready to merge?

Pull-Request has been merged by churchyard

2 years ago