#103 Purge Python 2 leftovers
Merged 4 years ago by frantisekz. Opened 4 years ago by frantisekz.

file modified
+1 -59
@@ -11,12 +11,6 @@ 

  

  BuildArch:      noarch

  

- # while ugly, this package can only build on x86_64 because python-flask is only available for EL7

- # on the x86_64 arch. Without adding this, building in koji is near impossible because noarch

- # packages usually end up in ppc or arm builders

- ExclusiveArch:  x86_64 noarch

- 

- %if 0%{?rhel} >= 8 || 0%{?fedora} >= 29

  Requires:       python3-flask

  Requires:       python3-flask-sqlalchemy

  Requires:       python3-flask-wtf
@@ -32,25 +26,7 @@ 

  Requires:       python3-openid-teams

  Requires:       python3-sqlalchemy

  Requires:       python3-koji

- %else

- Requires:       python-flask

- Requires:       python-flask-sqlalchemy

- Requires:       python-flask-wtf

- Requires:       python-fedora

- Requires:       python-fedora-flask

- Requires:       python-alembic

- Requires:       python-psycopg2

- Requires:       python-bugzilla

- Requires:       python-flask-admin

- Requires:       python-iso8601

- Requires:       python-openid

- Requires:       python-openid-cla

- Requires:       python-openid-teams

- Requires:       python-sqlalchemy

- Requires:       koji

- %endif

- 

- %if 0%{?rhel} >= 8 || 0%{?fedora} >= 29

+ 

  BuildRequires:  python3-pytest

  BuildRequires:  python3-devel

  BuildRequires:  python3-setuptools
@@ -65,23 +41,6 @@ 

  BuildRequires:  python3-sphinx

  BuildRequires:  python3-bugzilla

  BuildRequires:  python3-iso8601

- %else

- BuildRequires:  koji

- BuildRequires:  pytest

- BuildRequires:  python-devel

- BuildRequires:  python-setuptools

- BuildRequires:  python-munch

- BuildRequires:  python-flask

- BuildRequires:  python-flask-sqlalchemy

- BuildRequires:  python-flask-admin

- BuildRequires:  python-fedora-flask

- BuildRequires:  python-mock

- BuildRequires:  python-koji

- BuildRequires:  python-sqlalchemy

- BuildRequires:  python-sphinx

- BuildRequires:  python-bugzilla

- BuildRequires:  python-iso8601

- %endif

  

  %description

  The blocker tracking app is a web front end to the currently proposed blocker
@@ -91,27 +50,15 @@ 

  %setup -q

  

  %check

- %if 0%{?rhel} >= 8 || 0%{?fedora} >= 29

  %{__python3} setup.py test

- %else

- %{__python2} setup.py test

- %endif

  

  %build

- %if 0%{?rhel} >= 8 || 0%{?fedora} >= 29

  %py3_build

- %else

- %py2_build

- %endif

  sphinx-build  -b html -d docs/_build/doctrees docs/source docs/_build/html

  sphinx-build  -b man -d docs/_build/doctrees docs/source docs/_build/man

  

  %install

- %if 0%{?rhel} >= 8 || 0%{?fedora} >= 29

  %py3_install

- %else

- %py2_install

- %endif

  

  # alembic stuff

  mkdir -p %{buildroot}%{_datadir}/blockerbugs
@@ -143,13 +90,8 @@ 

  %doc docs/_build/html/*

  %doc %{_mandir}/man1/blockerbugs*

  

- %if 0%{?rhel} >= 8 || 0%{?fedora} >= 29

  %{python3_sitelib}/%{name}/

  %{python3_sitelib}/%{name}-*.egg-info

- %else

- %{python2_sitelib}/%{name}/

- %{python2_sitelib}/%{name}-*.egg-info

- %endif

  

  %{_bindir}/blockerbugs

  %dir %{_sysconfdir}/blockerbugs

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

- # This is required for running on EL6

- import __main__

- __main__.__requires__ = ['SQLAlchemy >= 0.7', 'Flask >= 0.9', 'jinja2 >= 2.6']

- 

  import sys

  import os

  from optparse import OptionParser

@@ -42,7 +42,7 @@ 

          return self.widget(self, **kwargs)

  

  

- class BuildForm(flask_wtf.Form):

+ class BuildForm(flask_wtf.FlaskForm):

      nvr = ReadOnlyTextField('NVR', [wtforms.validators.required()])

  

  class BuildView(FasAuthModelView):

file modified
-5
@@ -1,8 +1,3 @@ 

- # This is required for running on EL6

- import __main__

- __main__.__requires__ = ['SQLAlchemy >= 0.7', 'Flask >= 0.9', 'jinja2 >= 2.6']

- import pkg_resources

- 

  # if you're running the app from a virtualenv, uncomment these lines

  #activate_this = '/var/www/blockerbugs/env/bin/activate_this.py'

  #execfile(activate_this, dict(__file__=activate_this))

file modified
+26 -24
@@ -1,13 +1,9 @@ 

- import __main__

- 

- __main__.__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.6']

- import pkg_resources

- 

- from setuptools import setup, Command

  import codecs

  import re

  import os

  

+ from setuptools import setup, Command

+ 

  here = os.path.abspath(os.path.dirname(__file__))

  

  
@@ -20,10 +16,7 @@ 

      def run(self):

          import subprocess

          import sys

-         if (sys.version_info > (3, 0)):

-             errno = subprocess.call(['pytest-3'])

-         else:

-             errno = subprocess.call(['py.test'])

+         errno = subprocess.call(['pytest-3'])

          raise SystemExit(errno)

  

  
@@ -56,19 +49,28 @@ 

        include_package_data=True,

        cmdclass={'test': PyTest},

        install_requires=[

-           'Flask>=0.9',

-           'Flask-SQLAlchemy>=0.16',

-           'SQLAlchemy>= 0.7',

-           'munch>=1.0.1',

-           'python-bugzilla>=0.8',

-           'Flask-SQLAlchemy>=0.16',

-           'WTForms>1.0',

-           'Flask-WTF>=0.8',

-           'kitchen>=1.1.1',

-           'python-fedora>=0.3.29',

-           'pycurl>=7.19.0',

-           'alembic',

-           'python3-openid>=3.1.0',

-           'iso8601'

+             'alembic>=1.1.0',

+             'Flask-Admin>=1.5.2',

+             'Flask-SQLAlchemy==2.4.0',

+             'Flask-WTF>=0.14.2',

+             'Flask==1.0.2',

+             'iso8601>=0.1.11',

+             'Jinja2>=2.10.1',

+             'kitchen>=1.2.6',

+             'koji>=1.19',

+             'mock>=3.0.5',

+             'munch>=2.3.1',

+             'py>=1.8.0',

+             'pycurl>=7.43.0',

+             'pytest-cov>=2.7.1',

+             'pytest>=4.6.8',

+             'python-bugzilla>=2.3.0',

+             'python-fedora>=1.0.0',

+             'python-openid-cla>=1.2',

+             'python-openid-teams>=1.1',

+             'python3-openid>=3.1.0',

+             'SQLAlchemy>=1.3.12',

+             'Werkzeug==0.14.1',

+             'WTForms>=2.2.1',

        ]

  )

and sync setup.py install_requires with requirements.txt

The spec, requirements and python2 changes all look OK to me. The stuff with Form vs FlaskForm, I just assume you tested it :-)

me no understand the spec changes at all, but the rest LGTM

Pull-Request has been merged by frantisekz

4 years ago