[python-husl] Import of python-husl

Sergio Pascual sergiopr at fedoraproject.org
Mon Nov 24 14:03:04 UTC 2014


commit 18b31ade180f7ee52d9f46b49ab883d0e871147c
Author: Sergio Pascual <sergiopr at fis.ucm.es>
Date:   Mon Nov 24 15:02:43 2014 +0100

    Import of python-husl

 .gitignore       |    1 +
 python-husl.spec |   74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources          |    1 +
 3 files changed, 76 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..74bcfce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/husl-4.0.1.tar.gz
diff --git a/python-husl.spec b/python-husl.spec
new file mode 100644
index 0000000..7f43c29
--- /dev/null
+++ b/python-husl.spec
@@ -0,0 +1,74 @@
+%global with_python3 1
+%global upname husl
+
+Name: python-%{upname}
+Version: 4.0.1
+Release: 1%{?dist}
+Summary: A Python implementation of HUSL
+License: MIT
+
+URL: http://github.com/boronine/pyhusl
+Source0: https://pypi.python.org/packages/source/h/husl/husl-%{version}.tar.gz
+BuildArch: noarch
+BuildRequires: python2-devel python-setuptools
+
+%description
+HUSL is a human-friendly alternative to HSL (Hue, Saturation and Lightness)
+color space. This package provides Python2 support
+
+%if 0%{?with_python3}
+%package -n python3-%{upname}
+Summary: A Python implementation of HUSL
+BuildRequires: python3-devel python3-setuptools
+
+%description -n python3-%{upname}
+HUSL is a human-friendly alternative to HSL (Hue, Saturation and Lightness)
+color space. This package provides Python3 support
+
+%endif # with_python3
+
+%prep
+%setup -q -n %{upname}-%{version}
+
+find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
+
+%build
+%{__python2} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python2} setup.py install --skip-build --root %{buildroot}
+ 
+%files
+%doc README.md LICENSE
+%{python2_sitelib}/husl*
+
+%if 0%{?with_python3}
+%files -n python3-%{upname}
+%doc README.md LICENSE
+%{python3_sitelib}/husl*
+%{python3_sitelib}/__pycache__/*
+%endif # with_python3
+
+%changelog
+* Fri Nov 21 2014 Sergio Pascual <sergiopr at fedoraproject.com> - 4.0.1-1
+- Initial SPEC
+
diff --git a/sources b/sources
index e69de29..c3b2b5f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d7e181892e3dae54ff38685b0c3977ff  husl-4.0.1.tar.gz


More information about the scm-commits mailing list