From 28007d0d4074c3b533e2610a549cb6e6aa6f04c4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 13 2015 20:39:49 +0000 Subject: import python-lesscpy-0.9j-1.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47601c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/lesscpy-0.9j.tar.gz diff --git a/.python-lesscpy.metadata b/.python-lesscpy.metadata new file mode 100644 index 0000000..83f9e3b --- /dev/null +++ b/.python-lesscpy.metadata @@ -0,0 +1 @@ +98184e34bf02474d4f779d286cd15863c91029a6 SOURCES/lesscpy-0.9j.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/python-lesscpy-fix-setup-encoding-issue.patch b/SOURCES/python-lesscpy-fix-setup-encoding-issue.patch new file mode 100644 index 0000000..16e7a34 --- /dev/null +++ b/SOURCES/python-lesscpy-fix-setup-encoding-issue.patch @@ -0,0 +1,12 @@ +diff -up python3-lesscpy-0.9j-1.fc19/setup.py.bak python3-lesscpy-0.9j-1.fc19/setup.py +--- python3-lesscpy-0.9j-1.fc19/setup.py.bak 2013-08-21 10:41:30.341289892 +0200 ++++ python3-lesscpy-0.9j-1.fc19/setup.py 2013-08-21 10:42:25.308195797 +0200 +@@ -24,6 +24,6 @@ setup( + 'lesscpy/test/css/issues/*.css', + 'lesscpy/test/less/*.less', + 'lesscpy/test/less/issues/*.less',]}, +- license=open('LICENSE').read(), +- long_description=open('README.rst').read(), ++ license=open('LICENSE', encoding='utf-8').read(), ++ long_description=open('README.rst', encoding='utf-8').read(), + ) diff --git a/SPECS/python-lesscpy.spec b/SPECS/python-lesscpy.spec new file mode 100644 index 0000000..b639a57 --- /dev/null +++ b/SPECS/python-lesscpy.spec @@ -0,0 +1,105 @@ +%if 0%{?fedora} > 12 +%global with_python3 1 +%else +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} +%endif + +%global pypi_name lesscpy + +Name: python-%{pypi_name} +Version: 0.9j +Release: 1%{?dist} +Summary: Lesscss compiler + +License: MIT +URL: https://github.com/robotis/lesscpy +Source0: https://pypi.python.org/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-ply + +Requires: python-ply +Patch0: python-lesscpy-fix-setup-encoding-issue.patch +%description +A compiler written in python 3 for the lesscss language. For those of us not +willing/able to have node.js installed in our environment. Not all features +of lesscss are supported (yet). Some features wil probably never be +supported (JavaScript evaluation). + +%if 0%{?with_python3} +%package -n python3-lesscpy +Summary: Lesscss compiler +Requires: python3-ply +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-ply +%description -n python3-lesscpy +A compiler written in python 3 for the lesscss language. For those of us not +willing/able to have node.js installed in our environment. Not all features +of lesscss are supported (yet). Some features wil probably never be +supported (JavaScript evaluation). +%endif #with_python3 + +%prep +%setup -q -n %{pypi_name}-%{version} + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +#fix utf8 encoding issue occurring only under py3 +pushd %{py3dir} +%patch0 -p1 +find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' +popd +%endif + +%build +%{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +export LANG=en_US.utf8 +env +%{__python3} setup.py build +popd +%endif # with_python3 + + +%install +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +mv %{buildroot}/%{_bindir}/lesscpy %{buildroot}/%{_bindir}/py3-lesscpy +popd +%endif # with_python3 + +%{__python} setup.py install --skip-build --root %{buildroot} + + +%check + +%{__python} lesscpy/test/__main__.py +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} lesscpy/test/__main__.py +popd +%endif # with_python3 + +%files +%doc LICENSE +%{python_sitelib}/%{pypi_name} +%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info +%{_bindir}/lesscpy +%if 0%{?with_python3} +%files -n python3-lesscpy +%doc LICENSE +%{_bindir}/py3-lesscpy +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}*.egg-info +%endif # with_python3 + + +%changelog +* Mon Sep 8 2014 Petr Vobornik - 0.9j-1 +- Initial package for RHEL 7.