7a6ecae
%if 0%{?fedora} || 0%{?rhel} > 7
7a6ecae
%bcond_with    python2
7a6ecae
%bcond_without python3
7a6ecae
%else
7a6ecae
%bcond_without python2
7a6ecae
%bcond_with    python3
9e262ce
%endif
9e262ce
9e262ce
%global pypi_name XStatic-Angular-FileUpload
9e262ce
9e262ce
Name:           python-%{pypi_name}
fcb8bb7
Version:        12.0.4.0
a366bf4
Release:        28%{?dist}
9e262ce
Summary:        Angular-FileUpload JavaScript library (XStatic packaging standard)
9e262ce
9e262ce
License:        MIT
9e262ce
URL:            https://github.com/danialfarid/ng-file-upload
9e262ce
Source0:        https://pypi.python.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
9e262ce
# PyPi source states License: (same as Angular-FileUpload)
9e262ce
Source1:        https://raw.githubusercontent.com/danialfarid/ng-file-upload/master/LICENSE
9e262ce
BuildArch:      noarch
9e262ce
9e262ce
%description
9e262ce
Angular-FileUpload JavaScript library packaged
9e262ce
for setuptools (easy_install) / pip.
9e262ce
9e262ce
Lightweight Angular directive to upload files.
9e262ce
7a6ecae
%if %{with python2}
9e262ce
%package -n python2-%{pypi_name}
9e262ce
Summary: Angular-FileUpload JavaScript library (XStatic packaging standard)
9e262ce
%{?python_provide:%python_provide python2-%{pypi_name}}
9e262ce
9e262ce
BuildRequires:  python2-devel
5ce1224
BuildRequires:  python2-setuptools
9e262ce
5ce1224
Requires:       python2-XStatic
9e262ce
Requires:       xstatic-angular-fileupload-common
9e262ce
9e262ce
%description -n python2-%{pypi_name}
9e262ce
Angular-FileUpload JavaScript library packaged
9e262ce
for setuptools (easy_install) / pip.
9e262ce
9e262ce
Lightweight Angular directive to upload files.
7a6ecae
%endif
9e262ce
9e262ce
%package -n xstatic-angular-fileupload-common
9e262ce
Summary: Angular-FileUpload (XStatic packaging standard) JavaScript library
9e262ce
9e262ce
BuildRequires:  web-assets-devel
9e262ce
Requires:       web-assets-filesystem
9e262ce
9e262ce
%description -n xstatic-angular-fileupload-common
9e262ce
Angular-FileUpload JavaScript library packaged
9e262ce
for setuptools (easy_install) / pip.
9e262ce
9e262ce
This package contains the javascript files.
9e262ce
7a6ecae
%if %{with python3}
9e262ce
%package -n python3-%{pypi_name}
9e262ce
Summary: Angular-FileUpload JavaScript library (XStatic packaging standard)
9e262ce
%{?python_provide:%python_provide python3-%{pypi_name}}
9e262ce
9e262ce
BuildRequires:  python3-devel
9e262ce
BuildRequires:  python3-setuptools
9e262ce
9e262ce
Requires:       python3-XStatic
9e262ce
Requires:       xstatic-angular-fileupload-common
9e262ce
9e262ce
%description -n python3-%{pypi_name}
9e262ce
Angular-FileUpload JavaScript library packaged
9e262ce
for setuptools (easy_install) / pip.
9e262ce
9e262ce
Lightweight Angular directive to upload files.
9e262ce
%endif
9e262ce
9e262ce
%prep
9e262ce
%setup -q -n %{pypi_name}-%{version}
9e262ce
cp %{SOURCE1} .
9e262ce
9e262ce
# patch to use webassets dir
9e262ce
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/angular_fileupload'|" xstatic/pkg/angular_fileupload/__init__.py
9e262ce
9e262ce
%build
7a6ecae
%if %{with python2}
7a6ecae
%py2_build
7a6ecae
%endif
7a6ecae
%if %{with python3}
7a6ecae
%py3_build
9e262ce
%endif
9e262ce
9e262ce
%install
7a6ecae
%if %{with python2}
9e262ce
%{__python2} setup.py install --skip-build --root %{buildroot}
9e262ce
9e262ce
# Move static files
9e262ce
mkdir -p %{buildroot}/%{_jsdir}/angular_fileupload
fcb8bb7
mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/angular_fileupload/data/* %{buildroot}/%{_jsdir}/angular_fileupload/
9e262ce
rmdir %{buildroot}/%{python2_sitelib}/xstatic/pkg/angular_fileupload/data/
7a6ecae
%endif
9e262ce
7a6ecae
%if %{with python3}
9e262ce
%{__python3} setup.py install --skip-build --root %{buildroot}
7a6ecae
# Move static files
7a6ecae
mkdir -p %{buildroot}/%{_jsdir}/angular_fileupload
7a6ecae
mv %{buildroot}/%{python3_sitelib}/xstatic/pkg/angular_fileupload/data/* %{buildroot}/%{_jsdir}/angular_fileupload/
7a6ecae
rmdir %{buildroot}/%{python3_sitelib}/xstatic/pkg/angular_fileupload/data/
9e262ce
%endif
9e262ce
7a6ecae
%if %{with python2}
9e262ce
%files -n python2-%{pypi_name}
9e262ce
%doc README.txt
9e262ce
%license LICENSE
9e262ce
%{python2_sitelib}/xstatic/pkg/angular_fileupload
9e262ce
%{python2_sitelib}/XStatic_Angular_FileUpload-%{version}-py?.?.egg-info
9e262ce
%{python2_sitelib}/XStatic_Angular_FileUpload-%{version}-py?.?-nspkg.pth
7a6ecae
%endif
9e262ce
9e262ce
%files -n xstatic-angular-fileupload-common
9e262ce
%doc README.txt
9e262ce
%license LICENSE
9e262ce
%{_jsdir}/angular_fileupload
9e262ce
7a6ecae
%if %{with python3}
9e262ce
%files -n python3-%{pypi_name}
9e262ce
%doc README.txt
9e262ce
%license LICENSE
9e262ce
%{python3_sitelib}/xstatic/pkg/angular_fileupload
9c9f151
%{python3_sitelib}/XStatic_Angular_FileUpload-%{version}-py%{python3_version}.egg-info
9c9f151
%{python3_sitelib}/XStatic_Angular_FileUpload-%{version}-py%{python3_version}-nspkg.pth
9e262ce
%endif
9e262ce
9e262ce
%changelog
a366bf4
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-28
a366bf4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
a366bf4
c2425dc
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-27
c2425dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
c2425dc
e4684dc
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-26
e4684dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
e4684dc
63af99f
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 12.0.4.0-25
63af99f
- Rebuilt for Python 3.12
63af99f
0b55c30
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-24
0b55c30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
0b55c30
4080f9d
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-23
4080f9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
4080f9d
b75561b
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 12.0.4.0-22
b75561b
- Rebuilt for Python 3.11
b75561b
d846d99
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-21
d846d99
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
d846d99
4bd9926
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-20
4bd9926
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
4bd9926
0043153
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 12.0.4.0-19
0043153
- Rebuilt for Python 3.10
0043153
0e2233a
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-18
0e2233a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
0e2233a
75b418d
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-17
75b418d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
75b418d
1736e24
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 12.0.4.0-16
1736e24
- Rebuilt for Python 3.9
1736e24
65c7c7b
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-15
65c7c7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
65c7c7b
676437e
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 12.0.4.0-14
676437e
- Rebuilt for Python 3.8.0rc1 (#1748018)
676437e
bb32b2c
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 12.0.4.0-13
bb32b2c
- Rebuilt for Python 3.8
bb32b2c
ba02c66
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-12
ba02c66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ba02c66
cb2fa88
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-11
cb2fa88
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cb2fa88
7a6ecae
* Wed Sep 19 2018 Javier Peña <jpena@redhat.com> - 12.0.4.0-9
7a6ecae
- Removed Python 2 package from Fedora 30+ (bz#1630333)
7a6ecae
0cc20e0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-9
0cc20e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0cc20e0
654428a
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 12.0.4.0-8
654428a
- Rebuilt for Python 3.7
654428a
d872037
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-7
d872037
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d872037
5ce1224
* Mon Jan 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 12.0.4.0-6
5ce1224
- Update Python 2 dependency declarations to new packaging standards
5ce1224
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
5ce1224
b796601
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-5
b796601
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b796601
4a3404a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.4.0-4
4a3404a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4a3404a
45af2aa
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 12.0.4.0-3
45af2aa
- Rebuild for Python 3.6
45af2aa
77872a6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 12.0.4.0-2
77872a6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
77872a6
fcb8bb7
* Tue May 24 2016 Javier Peña <jpena@redhat.com> - 12.0.4.0-1
fcb8bb7
- Updated to upstream version 12.0.4.0
fcb8bb7
9e262ce
* Mon May 23 2016 Javier Peña <jpena@redhat.com> - 1.4.0.1-2
9e262ce
- Updated path for javascript file
9e262ce
9e262ce
* Fri May 20 2016 Javier Peña <jpena@redhat.com> - 1.4.0.1-1
9e262ce
- First version