commit df8d59d4a05c70d73a92b652dd472c65c52e0284
Author: Jakub Bogusz <[email protected]>
Date:   Sat Jul 15 20:48:18 2017 +0200

    - updated to 0.13
    - added deps patch (allow cssutils 1)

 glue-deps.patch | 11 ++++++++
 glue.spec       | 86 +++++++++++++++++++++++++++++++++++++++++++--------------
 2 files changed, 76 insertions(+), 21 deletions(-)
---
diff --git a/glue.spec b/glue.spec
index 50a9efb..a0283de 100644
--- a/glue.spec
+++ b/glue.spec
@@ -1,19 +1,47 @@
+#
+# Conditional build:
+%bcond_with    python3 # use Python 3.x instead of 2.x
+%bcond_with    tests   # unit tests (not present in 0.13 sources)
+
 Summary:       A simple command line tool to generate CSS sprites
+Summary(pl.UTF-8):     Proste narzędzie linii poleceń do generowania "duszków" 
CSS
 Name:          glue
-Version:       0.9.1
+Version:       0.13
 Release:       1
 License:       BSD
 Group:         Applications/Graphics
-Source0:       
http://pypi.python.org/packages/source/g/glue/%{name}-%{version}.tar.gz
-# Source0-md5: 6f431c294f4efa20921af82f4125645b
+Source0:       
http://files.pythonhosted.org/packages/source/g/glue/%{name}-%{version}.tar.gz
+# Source0-md5: 65ac9f9b4667b7ef5f7665273b68bc56
+Patch0:                %{name}-deps.patch
 URL:           http://github.com/jorgebastida/glue
-BuildRequires: python-cssutils
-BuildRequires: python-devel
-BuildRequires: python-mock
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.3
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-cssutils >= 0.9.10
+BuildRequires: python3-jinja2 >= 2.7
+BuildRequires: python3-pillow >= 2.2.2
+%endif
+%else
+BuildRequires: python-devel >= 1:2.7
 BuildRequires: python-setuptools
-BuildRequires: rpmbuild(macros) >= 1.219
-Requires:      python-jinja2
-Requires:      python-pillow
+%if %{with tests}
+BuildRequires: python-cssutils >= 0.9.10
+BuildRequires: python-jinja2 >= 2.7
+BuildRequires: python-mock >= 1.0
+BuildRequires: python-pillow >= 2.2.2
+%endif
+%endif
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python3}
+Requires:      python3-jinja2 >= 2.7
+Requires:      python3-modules >= 1:3.3
+Requires:      python3-pillow >= 2.2.2
+%else
+Requires:      python-jinja2 >= 2.7
+Requires:      python-modules >= 2.7
+Requires:      python-pillow >= 2.2.2
+%endif
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -23,32 +51,48 @@ kind of source images like PNG, JPEG or GIF. Glue will 
generate a
 unique PNG file containing every source image and a CSS file including
 the necessary CSS classes to use the sprite.
 
+%description -l pl.UTF-8
+Glue to proste narzędzie linii poleceń do generowania "duszków"
+(sprite'ów) CSS przy użyciu dowolnego rodzaju obrazów źródłowych (PNG,
+JPEG, GIF). Glue generuje unikatowy plik PNG zawierający wszystkie
+obrazy źródłowe oraz plik CSS zawierający klasy CSS potrzebne do
+używania duszka.
+
 %prep
 %setup -q
-rm -r glue.egg-info
+%patch0 -p1
+
+%{__rm} -r glue.egg-info
 
 %build
-%{__python} setup.py build
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%else
+%py_build %{?with_tests:test}
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
-       --skip-build \
-       --optimize=2 \
-       --root=$RPM_BUILD_ROOT
+
+%if %{with python3}
+%py3_install
+%else
+%py_install
 
 %py_postclean
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING docs
+%doc AUTHORS COPYING README.rst docs
 %attr(755,root,root) %{_bindir}/glue
-%dir %{py_sitescriptdir}/glue
-%{py_sitescriptdir}/glue/*.py[co]
-%{py_sitescriptdir}/glue/algorithms
-%{py_sitescriptdir}/glue/formats
-%{py_sitescriptdir}/glue/managers
+%if %{with python3}
+%{py3_sitescriptdir}/glue
+%{py3_sitescriptdir}/glue-%{version}-py*.egg-info
+%else
+%{py_sitescriptdir}/glue
 %{py_sitescriptdir}/glue-%{version}-py*.egg-info
+%endif
diff --git a/glue-deps.patch b/glue-deps.patch
new file mode 100644
index 0000000..7ed987f
--- /dev/null
+++ b/glue-deps.patch
@@ -0,0 +1,11 @@
+--- glue-0.13/setup.py.orig    2017-05-15 13:06:05.000000000 +0200
++++ glue-0.13/setup.py 2017-07-03 22:22:24.470119818 +0200
+@@ -8,7 +8,7 @@
+ ]
+ 
+ tests_require=[
+-    'cssutils>=0.9.10,<1.0',
++    'cssutils>=0.9.10',
+ ]
+ 
+ # as of Python >= 2.7 argparse module is maintained within Python.
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glue.git/commitdiff/df8d59d4a05c70d73a92b652dd472c65c52e0284

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to