Blob Blame History Raw
%global srcname flask-wtf-decorators
%global commit 7fa5a26946d2fdb5b00d07251c0ca7d0e358fc1d
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           python-%{srcname}
Version:        0.1.2
Release:        0.2.20200715.%{shortcommit}%{?dist}
Summary:        Use decorators to validate forms
BuildArch:      noarch

License:        MIT

%package -n python3-%{srcname}
Summary:       %{summary}
BuildRequires: python3-devel
BuildRequires: python3-flask-wtf

%global _description %{expand:
Flask-WTF-Decorators is easy to use. You can define a view that requires

    from flask-wtf-decorators import FormValidator

    form_validator = FormValidator()

    @app.route('/', methods=['GET', 'POST'])
    def index(form):

You can tell Flask-WTF-Decorators what to do when a form is illegal.
To do this you should provide a callback for error_handler.

    def error_handler(errors):
        return jsonify(\{'errors': errors\}), 400

%description %_description
%description -n python3-%{srcname} %_description

%autosetup -n %{srcname}-%{commit}

%{python3} test



%files -n python3-%{srcname}
%license LICENSE.txt

* Tue Jul 14 2020 Jakub Kadlčík <> - 0.1.2-0.2.20200715.7fa5a26
- Use proper pre-release versioning

* Tue Jul 14 2020 Jakub Kadlcik <> - 0.1.2-20200704.7fa5a26
- Run tests in the check phase
- Rename this file to python-flask-wtf-decorators.spec

* Tue Jul 14 2020 Jakub Kadlcík <> - 0.1.2-20200703.7fa5a26
- Provide python3 subpackage

* Thu Jul 02 2020 Jakub Kadlcik <>
- Initial package