From 8ca95d9e40d287db979206661acd4c48cbc55647 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Jan 12 2015 17:55:09 +0000 Subject: Initial import (#1179804) --- diff --git a/.gitignore b/.gitignore index e69de29..c3ca348 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/nine-0.3.4.tar.gz diff --git a/python-nine.spec b/python-nine.spec new file mode 100644 index 0000000..28a589a --- /dev/null +++ b/python-nine.spec @@ -0,0 +1,131 @@ +%if 0%{?fedora} +%global with_python3 1 +%endif + +%{!?_licensedir: %global license %%doc} + +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +%global modname nine + +Name: python-nine +Version: 0.3.4 +Release: 2%{?dist} +Summary: Python 2 / 3 compatibility, like six, but favouring Python 3 + +License: Public Domain +URL: http://pypi.python.org/pypi/nine +Source0: https://pypi.python.org/packages/source/n/%{modname}/%{modname}-%{version}.tar.gz +BuildArch: noarch + + +BuildRequires: python2-devel +BuildRequires: python-setuptools + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif + +%description +Let's write Python 3 right now! + +When the best Python 2/Python 3 compatibility modules -- especially the +famous `*six* library invented by Benjamin Peterson +`_ -- were created, they were written +from the point of view of a Python 2 programmer starting to grok Python 3. + +When thou writeth Python, thou shalt write Python 3 and, just for a while, +ensure that the thing worketh on Python 2.7 and, possibly, even 2.6. + +Just before Python 2 is finally phased out, thine codebase shall look more +like 3 than like 2. + +nine facilitates this new point of view. You can write code that is as +3ish as possible while still supporting 2.6. Very comfortable for writing +new projects. + +%if 0%{?with_python3} +%package -n python3-nine +Summary: Python 2 / 3 compatibility, like six, but favouring Python 3 + +%description -n python3-nine +Let's write Python 3 right now! + +When the best Python 2/Python 3 compatibility modules -- especially the +famous `*six* library invented by Benjamin Peterson +`_ -- were created, they were written +from the point of view of a Python 2 programmer starting to grok Python 3. + +When thou writeth Python, thou shalt write Python 3 and, just for a while, +ensure that the thing worketh on Python 2.7 and, possibly, even 2.6. + +Just before Python 2 is finally phased out, thine codebase shall look more +like 3 than like 2. + +nine facilitates this new point of view. You can write code that is as +3ish as possible while still supporting 2.6. Very comfortable for writing +new projects. +%endif + +%prep +%setup -q -n %{modname}-%{version} + +# Remove bundled egg-info in case it exists +rm -rf %{modname}.egg-info +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif + +%build +%{__python2} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif + +%install +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} +popd +%endif +%{__python2} setup.py install -O1 --skip-build --root=%{buildroot} + +%check +%{__python2} setup.py test +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py test +popd +%endif + +%files +%doc README.rst porting.rst +%license LICENSE.rst +%{python2_sitelib}/%{modname}/ +%{python2_sitelib}/%{modname}-%{version}* + +%if 0%{?with_python3} +%files -n python3-nine +%doc README.rst porting.rst +%license LICENSE.rst +%{python3_sitelib}/%{modname}/ +%{python3_sitelib}/%{modname}-%{version}* + +%endif + +%changelog +* Sat Jan 10 2015 Ralph Bean - 0.3.4-2 +- Declare noarch. +- Remove unnecessary cflags. +- Remove Group tag, as per review. + +* Wed Jan 07 2015 Ralph Bean - 0.3.4-1 +- initial package for Fedora diff --git a/sources b/sources index e69de29..6ad0657 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b3415655bba05e8a1a9caa3f8d9f9343 nine-0.3.4.tar.gz