Blame SPECS/python-XStatic-Angular-Schema-Form.spec

8151ff
%{?python_enable_dependency_generator}
8151ff
%global pypi_name XStatic-Angular-Schema-Form
8151ff
8151ff
Name:           python-%{pypi_name}
8151ff
Version:        0.8.13.0
8151ff
Release:        2%{?dist}
8151ff
Summary:        Angular-Schema-Form JavaScript library (XStatic packaging standard)
8151ff
8151ff
License:        MIT
8151ff
URL:            https://github.com/json-schema-form/angular-schema-form
8151ff
Source0:        https://pypi.io/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
8151ff
Source1:        https://raw.githubusercontent.com/json-schema-form/angular-schema-form/development/LICENSE
8151ff
BuildArch:      noarch
8151ff
8151ff
%description
8151ff
Angular-Schema-Form JavaScript library packaged
8151ff
for setuptools (easy_install) / pip.
8151ff
8151ff
Generate forms from JSON schemas using AngularJS.
8151ff
8151ff
%package -n xstatic-angular-schema-form-common
8151ff
Summary: Angular-Schema-Form JavaScript library (XStatic packaging standard)
8151ff
8151ff
BuildRequires:  web-assets-devel
8151ff
Requires:       web-assets-filesystem
8151ff
8151ff
%description -n xstatic-angular-schema-form-common
8151ff
Angular-Schema-Form JavaScript library packaged
8151ff
for setuptools (easy_install) / pip.
8151ff
8151ff
This package contains the javascript files.
8151ff
8151ff
%package -n python3-%{pypi_name}
8151ff
Summary: Angular-Schema-Form JavaScript library (XStatic packaging standard)
8151ff
%{?python_provide:%python_provide python3-%{pypi_name}}
8151ff
8151ff
BuildRequires:  python3-devel
8151ff
BuildRequires:  python3-setuptools
8151ff
8151ff
Requires:       python3-XStatic
8151ff
Requires:       xstatic-angular-schema-form-common = %{version}-%{release}
8151ff
8151ff
%description -n python3-%{pypi_name}
8151ff
Angular-Schema-Form JavaScript library packaged
8151ff
for setuptools (easy_install) / pip.
8151ff
8151ff
Generate forms from JSON schemas using AngularJS.
8151ff
8151ff
%prep
8151ff
%setup -q -n %{pypi_name}-%{version}
8151ff
cp %{SOURCE1} .
8151ff
8151ff
# patch to use webassets dir
8151ff
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/angular_schema_form'|" xstatic/pkg/angular_schema_form/__init__.py
8151ff
8151ff
%build
8151ff
%{__python3} setup.py build
8151ff
8151ff
%install
8151ff
%{__python3} setup.py install --skip-build --root %{buildroot}
8151ff
# Move static files
8151ff
mkdir -p %{buildroot}/%{_jsdir}/angular_schema_form
8151ff
mv %{buildroot}/%{python3_sitelib}/xstatic/pkg/angular_schema_form/data/bootstrap-decorator.js %{buildroot}/%{_jsdir}/angular_schema_form
8151ff
mv %{buildroot}/%{python3_sitelib}/xstatic/pkg/angular_schema_form/data/bootstrap-decorator.min.js %{buildroot}/%{_jsdir}/angular_schema_form
8151ff
mv %{buildroot}/%{python3_sitelib}/xstatic/pkg/angular_schema_form/data/schema-form.js %{buildroot}/%{_jsdir}/angular_schema_form
8151ff
mv %{buildroot}/%{python3_sitelib}/xstatic/pkg/angular_schema_form/data/schema-form.min.js %{buildroot}/%{_jsdir}/angular_schema_form
8151ff
rm %{buildroot}/%{python3_sitelib}/xstatic/pkg/angular_schema_form/data/WHERE_IS_BOOTSTRAP_DECORATOR.md
8151ff
8151ff
rmdir %{buildroot}/%{python3_sitelib}/xstatic/pkg/angular_schema_form/data/
8151ff
8151ff
%files -n xstatic-angular-schema-form-common
8151ff
%doc README.txt
8151ff
%license LICENSE
8151ff
%{_jsdir}/angular_schema_form
8151ff
8151ff
%files -n python3-%{pypi_name}
8151ff
%doc README.txt
8151ff
%license LICENSE
8151ff
%{python3_sitelib}/xstatic/pkg/angular_schema_form
8151ff
%{python3_sitelib}/XStatic_Angular_Schema_Form-%{version}-py?.?.egg-info
8151ff
%{python3_sitelib}/XStatic_Angular_Schema_Form-%{version}-py?.?-nspkg.pth
8151ff
8151ff
%changelog
8151ff
* Fri Feb 21 2020 Yatin Karel <ykarel@redhat.com> - 0.8.13.0-2
8151ff
- Drop python2 sub package
8151ff
8151ff
* Thu Sep 27 2018 Alfredo Moralejo <amoralej@redhat.com> - 0.8.13.0-1
8151ff
- Rebuild in Fedora
8151ff
8151ff
* Fri Aug 5 2016 David Moreau Simard <dmsimard@redhat.com> - 0.8.13.0-0.1.pre_review
8151ff
- First version