From d16f8048a1aa83f33c926242c8ef2f5253fd8501 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mar 11 2011 02:37:06 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore index e69de29..cd153bc 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/unicode-nazi-1.1.tar.gz diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..607e222 --- /dev/null +++ b/LICENSE @@ -0,0 +1,32 @@ +Copyright (c) 2011 by Armin Ronacher. + +Some rights reserved. + +Redistribution and use in source and binary forms of the software as well +as documentation, with or without modification, are permitted provided +that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +* The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/python-unicodenazi.spec b/python-unicodenazi.spec new file mode 100644 index 0000000..ca91936 --- /dev/null +++ b/python-unicodenazi.spec @@ -0,0 +1,64 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} + +%global srcname unicode-nazi +%global modname unicodenazi + +Name: python-%{modname} +Version: 1.1 +Release: 1%{?dist} +Summary: Module that finds unicode/bytestring comparisons and other problems + +Group: Development/Languages +License: BSD +URL: http://pypi.python.org/pypi/%{srcname} +Source0: http://pypi.python.org/packages/source/u/%{srcname}/%{srcname}-%{version}.tar.gz +# License file from the upstream repo. Submitted a MANIFEST.in upstream to +# automatically include this in the future +Source1: http://github.com/mitsuhiko/unicode-nazi/raw/master/LICENSE +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch +BuildRequires: python2-devel + +%description +A common source of unicode issues in python2 is that code mixes str and unicode +and is valid for the cases the author tests for (because they only test with +ASCII) but then throws an error when the code is used with non-ASCII strings. + +If enabled unicodenazi will complain when this mixing of unicode and byte str +occurs. It's annoying as hell, has a huge runtime impact on performance, and +will also complain about most of the stuff in the Python standard library. But +it will point out some areas of your code that may traceback in python2 when +given different data and make it easier to migrate to python3 where unicode and +bytes no longer interoperate. + +%prep +%setup -q -n %{srcname}-%{version} +cp %{SOURCE1} . + +%build +%{__python} setup.py build + + +%install +rm -rf %{buildroot} +%{__python} setup.py install --skip-build --root %{buildroot} + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%doc README LICENSE +%{python_sitelib}/* + + +%changelog +* Thu Mar 10 2011 Toshio Kuratomi 1.1-2 +- Add license file from upstream repo +- Fix a spelling mistake + +* Thu Mar 10 2011 Toshio Kuratomi 1.1-1 +- Initial Fedora packaging diff --git a/sources b/sources index e69de29..8d421ee 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +f9b3d2c25c7887df643e67e2c8d99c45 unicode-nazi-1.1.tar.gz