Blame python-flask-restx.spec

647389c
# what it's called on pypi
647389c
%global srcname flask-restx
647389c
# what it's imported as
647389c
%global libname flask_restx
647389c
647389c
Name:           python-%{srcname}
e88eeeb
Version:        0.5.1
b513912
Release:        %autorelease
647389c
Summary:        Framework for fast, easy and documented API development with Flask
647389c
License:        BSD
647389c
URL:            https://github.com/python-restx/flask-restx
a1beae5
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
a1beae5
# Werkzeug >= 2.1 support
a1beae5
# https://github.com/python-restx/flask-restx/pull/423
a1beae5
Patch01:        423.patch
a1beae5
# https://github.com/python-restx/flask-restx/pull/427
a1beae5
Patch02:        427.patch
647389c
BuildArch:      noarch
647389c
647389c
%global _description %{expand:
647389c
Flask-RESTX is an extension for Flask that adds support for quickly
647389c
building REST APIs. It encourages best practices with minimal setup.
647389c
If you are familiar with Flask, Flask-RESTX should be easy to pick up.
647389c
It provides a coherent collection of decorators and tools to describe your API
647389c
and expose its documentation properly using Swagger.}
647389c
647389c
%description %_description
647389c
647389c
647389c
%package -n     python3-%{srcname}
647389c
Summary:        %{summary}
647389c
BuildRequires:  python3-devel
647389c
BuildRequires:  python3-setuptools
647389c
Provides:       python3-flask-restplus = %{version}-%{release}
647389c
# Using < or <= would obsolete ourselves
647389c
Obsoletes:      python3-flask-restplus = 0.13.0
647389c
%{?python_provide:%python_provide python3-%{srcname}}
647389c
647389c
%description -n python3-%{srcname} %_description
647389c
647389c
647389c
%prep
a1beae5
%autosetup -p1 -n %{srcname}-%{version}
647389c
rm -rf %{libname}.egg-info
647389c
rm -f %{libname}/static/files/.npmignore
647389c
647389c
%build
647389c
%py3_build
647389c
647389c
%install
647389c
%py3_install
647389c
647389c
# Upstream requires pinned dependencies versions
647389c
#%%check
647389c
#python3 setup.py test
647389c
647389c
%files -n python3-%{srcname}
647389c
%license LICENSE
647389c
%doc README.rst
647389c
%{python3_sitelib}/%{libname}
647389c
%{python3_sitelib}/%{libname}-*.egg-info/
647389c
647389c
647389c
%changelog
b513912
%autochangelog