diff --git a/.gitignore b/.gitignore index e69de29..b0f6fb7 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ansi-0.1.3.tar.gz diff --git a/python-ansi.spec b/python-ansi.spec new file mode 100644 index 0000000..8a97dad --- /dev/null +++ b/python-ansi.spec @@ -0,0 +1,84 @@ +%global with_python3 1 +Name: python-ansi +Version: 0.1.3 +Release: 3%{?dist} +Summary: ANSI cursor movement and graphics + +License: MIT +URL: https://github.com/tehmaze/ansi +Source0: https://pypi.python.org/packages/source/a/ansi/ansi-%{version}.tar.gz + +BuildRequires: python2-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif # if with_python3 +BuildArch: noarch + +%description +Various ANSI escape codes, used in moving the cursor in a text console or +rendering colored text with Python 2. + + +%if 0%{?with_python3} +%package -n python3-ansi +Summary: ANSI cursor movement and graphics + +%description -n python3-ansi +Various ANSI escape codes, used in moving the cursor in a text console or +rendering colored text with Python 3. +%endif # if with_python3 + +%prep +%setup -qc +mv ansi-%{version} python2 +pushd python2 +cp -pr README.md LICENSE.md ../ +popd + +%if 0%{?with_python3} +cp -a python2 python3 +%endif # with_python3 + +%build +pushd python2 +%{__python2} setup.py build +popd +%if 0%{?with_python3} +pushd python3 +%{__python3} setup.py build +popd +%endif # with_python3 + +%install +pushd python2 +%{__python2} setup.py install --skip-build --root %{buildroot} +popd +%if 0%{?with_python3} +pushd python3 +%{__python3} setup.py install --skip-build --root %{buildroot} +popd +%endif # if with_python3 + +%files +%license LICENSE.md +%doc README.md +%{python_sitelib}/* + +%if 0%{?with_python3} +%files -n python3-ansi +%license LICENSE.md +%doc README.md +%{python3_sitelib}/* +%endif # if with_python3 + +%changelog +* Mon Jul 27 2015 Sebastian Dyroff 0.1.3-3 +- Improve source url (BZ #1245356) +- Remove CFLAGS (BZ #1245356) +- Fix changelog (BZ #1245356) + +* Wed Jul 08 2015 Sebasitan Dyroff 0.1.3-2 +- Fix source url (BZ #1245356) + +* Tue Jul 07 2015 Sebasitan Dyroff 0.1.3-1 +- Initial packaging diff --git a/sources b/sources index e69de29..e1913f3 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +1bb74ca3479fc7c91bc4ff107a2603cf ansi-0.1.3.tar.gz