#6 Drop with_python3 conditional
Merged 5 years ago by churchyard. Opened 5 years ago by churchyard.
rpms/ churchyard/python-twisted no_with_python3  into  master

file modified
-18
@@ -1,7 +1,3 @@ 

- %if 0%{?fedora} || 0%{?rhel} > 7

- %global with_python3 1

- %endif

- 

  %global common_description %{expand:

  Twisted is a networking engine written in Python, supporting numerous protocols.

  It contains a web server, numerous chat clients, chat servers, mail servers
@@ -50,7 +46,6 @@ 

  %{common_description}

  

  

- %if 0%{?with_python3}

  %package -n python3-twisted

  Summary:        %{summary}

  %{?python_provide:%python_provide python3-twisted}
@@ -75,7 +70,6 @@ 

  

  %description -n python3-twisted

  %{common_description}

- %endif

  

  

  %prep
@@ -84,14 +78,12 @@ 

  

  %build

  %py2_build

- %if 0%{?with_python3}

  %py3_build

  

  # generate html docs 

  PYTHONPATH=${PWD}/src/ sphinx-build-3 docs html

  # remove the sphinx-build leftovers

  rm -rf html/.{doctrees,buildinfo}

- %endif

  

  

  %install
@@ -100,9 +92,7 @@ 

  # Packages that install arch-independent twisted plugins install here.

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

  mkdir -p %{buildroot}%{python2_sitelib}/twisted/plugins

- %if 0%{?with_python3}

  mkdir -p %{buildroot}%{python3_sitelib}/twisted/plugins

- %endif

  

  # no-manual-page-for-binary

  mkdir -p %{buildroot}%{_mandir}/man1/
@@ -140,12 +130,9 @@ 

  mv %{buildroot}%{_bindir}/twistd %{buildroot}%{_bindir}/twistd-%{python2_version}

  ln -s ./twistd-%{python2_version} %{buildroot}%{_bindir}/twistd-2

  

- %if !0%{?with_python3}

  ln -s ./trial-%{python2_version} %{buildroot}%{_bindir}/trial

  ln -s ./twistd-%{python2_version} %{buildroot}%{_bindir}/twistd

- %endif

  

- %if 0%{?with_python3}

  %py3_install

  

  # Move and symlink python3 scripts
@@ -167,13 +154,10 @@ 

  # non-executable-script

  chmod +x %{buildroot}%{python3_sitearch}/twisted/mail/test/pop3testserver.py

  chmod +x %{buildroot}%{python3_sitearch}/twisted/trial/test/scripttest.py

- %endif

  

  # ambiguous shebangs

  pathfix.py -pn -i %{__python2} %{buildroot}%{python2_sitelib} %{buildroot}%{python2_sitearch}

- %if 0%{?with_python3}

  pathfix.py -pn -i %{__python3} %{buildroot}%{python3_sitelib} %{buildroot}%{python3_sitearch}

- %endif

  

  

  %check
@@ -190,7 +174,6 @@ 

  %{python2_sitearch}/twisted

  %{python2_sitearch}/Twisted-%{version}-py?.?.egg-info

  

- %if 0%{?with_python3}

  %files -n python3-twisted

  %doc CONTRIBUTING NEWS.rst README.rst html

  %license LICENSE
@@ -198,7 +181,6 @@ 

  %{_bindir}/twistd-3*

  %{python3_sitearch}/twisted

  %{python3_sitearch}/Twisted-%{version}-py?.?.egg-info

- %endif

  %{_bindir}/cftp

  %{_bindir}/ckeygen

  %{_bindir}/conch

cc @eclipseo

I assume the current spec is not intended for old ELs anyway. So let get rid of a always on condition.

Le tme know if my assumption is wrong.

Indeed, it's not needed.

BTW could you build 18.4.0 for F28 too please?

BTW could you build 18.4.0 for F28 too please?

Not sure, won't that break things?

Pull-Request has been merged by churchyard

5 years ago