Blob Blame History Raw
%global pypi_name rjsmin
%global desc %{expand: \
The minifier is based on the semantics of jsmin.c by Douglas Crockford.

The module is a re-implementation aiming for speed, so it can be used at
runtime (rather than during a preprocessing step). Usually it produces the
same results as the original jsmin.c.}

Name:           python-%{pypi_name}
Version:        1.2.1
Release:        %autorelease
Summary:        Javascript Minifier

License:        Apache-2.0

BuildRequires:  gcc
BuildRequires:  python3-devel
BuildRequires:  python3-pytest
BuildRequires:	python3-sphinx
BuildRequires:	python3-sphinx_rtd_theme

%description %{desc}

%package -n python3-%{pypi_name}
Summary:	Javascript Minifier

%description -n python3-%{pypi_name}

%package docs
Summary:	Javascript Minifier - docs

%description docs

%autosetup -n %{pypi_name}-%{version}

# strip bang path from
sed -i '1d'



sphinx-build -b html docs/_userdoc docs/_userdoc/html
# Remove the sphinx-build leftovers.
rm -rf docs/_userdoc/html/.{doctrees,buildinfo}

%pyproject_save_files %{pypi_name}
%pytest -v

%files -n python3-%{pypi_name} -f %{pyproject_files}

%files docs
%license LICENSE
%doc docs/_userdoc/html