diff --git a/.gitignore b/.gitignore index e2f831b..cd78f91 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /XStatic-Magic-Search-0.2.0.1.tar.gz +/XStatic-Magic-Search-0.2.5.1.tar.gz diff --git a/python-XStatic-Magic-Search.spec b/python-XStatic-Magic-Search.spec index be7baba..32fbe36 100644 --- a/python-XStatic-Magic-Search.spec +++ b/python-XStatic-Magic-Search.spec @@ -1,34 +1,68 @@ -# Created by pyp2rpm-1.1.2 +%if 0%{?fedora} > 19 +%global with_python3 1 +%endif %global pypi_name XStatic-Magic-Search Name: python-%{pypi_name} -Version: 0.2.0.1 +Version: 0.2.5.1 Release: 1%{?dist} Summary: Magic-Search (XStatic packaging standard) License: ASL 2.0 URL: https://github.com/eucalyptus/magic-search -Source0: https://pypi.python.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch +%description +MagicSearch is an AngularJS directive that provides a UI for both faceted +filtering and as-you-type filtering. It is intended for filtering tables, +such as an AngularJS smart-table, but it can be used in any situation +where you can provide it with facets/options and consume its events. + +%package -n python2-%{pypi_name} +Summary: Magic-Search (XStatic packaging standard) + BuildRequires: python2-devel -BuildRequires: python-setuptools +BuildRequires: python2-setuptools BuildRequires: web-assets-devel -Requires: python-XStatic -Requires: web-assets-filesystem +Requires: python2-XStatic +Requires: XStatic-Magic-Search-common = %{version}-%{release} +%{?python_provide:%python_provide python2-%{pypi_name}} +%description -n python2-%{pypi_name} +MagicSearch is an AngularJS directive that provides a UI for both faceted +filtering and as-you-type filtering. It is intended for filtering tables, +such as an AngularJS smart-table, but it can be used in any situation +where you can provide it with facets/options and consume its events. -%description +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: web-assets-devel + +Requires: python3-XStatic +Requires: XStatic-Magic-Search-common = %{version}-%{release} + +Summary: Magic-Search (XStatic packaging standard) +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} MagicSearch is an AngularJS directive that provides a UI for both faceted filtering and as-you-type filtering. It is intended for filtering tables, such as an AngularJS smart-table, but it can be used in any situation where you can provide it with facets/options and consume its events. +%endif + +%package -n XStatic-Magic-Search-common +Summary: Xstatic-Magic-Search common files +Requires: web-assets-filesystem +%description -n XStatic-Magic-Search-common +Xstatic-Magic-Search common files %prep -%setup -q -n xstatic-magic-search -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info +%autosetup -n %{pypi_name}-%{version} # patch to use webassets dir sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/magic_search'|" xstatic/pkg/magic_search/__init__.py @@ -39,23 +73,41 @@ sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/magic_search'|" xstatic/pkg/magic # due # https://bitbucket.org/thomaswaldmann/xstatic/issue/2/ # this package can not be built with python-XStatic installed. -%{__python2} setup.py build - - +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install -%{__python2} setup.py install --skip-build --root %{buildroot} +%py2_install +%if 0%{?with_python3} +%py3_install +%endif mkdir -p %{buildroot}/%{_jsdir}/magic_search mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/magic_search/data/magic_search.* %{buildroot}/%{_jsdir}/magic_search -%files +%files -n python2-%{pypi_name} %doc README.txt %{python2_sitelib}/xstatic/pkg/magic_search -%{python2_sitelib}/XStatic_Magic_Search-%{version}-py%{python_version}.egg-info -%{python2_sitelib}/XStatic_Magic_Search-%{version}-py%{python_version}-nspkg.pth +%{python2_sitelib}/XStatic_Magic_Search-%{version}-py%{python2_version}.egg-info +%{python2_sitelib}/XStatic_Magic_Search-%{version}-py%{python2_version}-nspkg.pth + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%doc README.txt +%{python3_sitelib}/xstatic/pkg/magic_search +%{python3_sitelib}/XStatic_Magic_Search-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/XStatic_Magic_Search-%{version}-py%{python3_version}-nspkg.pth +%endif + +%files -n XStatic-Magic-Search-common %{_jsdir}/magic_search + %changelog +* Wed Aug 31 2016 Matthias Runge - 0.2.5.1-1 +- update package, add python3 subpackage (rhbz#1210069) + * Mon Mar 23 2015 Matthias Runge - 0.2.0.1-1 - Initial package. (rhbz#1204779) diff --git a/sources b/sources index 7cead44..47425ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e4ce9925f88f1a901a19563f63b66f95 XStatic-Magic-Search-0.2.0.1.tar.gz +cfb8a82129fffbe1f5c6339240cb6139 XStatic-Magic-Search-0.2.5.1.tar.gz