From 796bd193b23b84488ae0b76ad15f4f6d850c2535 Mon Sep 17 00:00:00 2001 From: zengliwen Date: Tue, 12 Mar 2024 20:58:08 +0800 Subject: [PATCH] Init Package --- husl-4.0.3.tar.gz | Bin 0 -> 3880 bytes python-husl.spec | 185 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 husl-4.0.3.tar.gz create mode 100644 python-husl.spec diff --git a/husl-4.0.3.tar.gz b/husl-4.0.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e04d9eb6abf633d6e36809b41340ef2808e50bab GIT binary patch literal 3880 zcmb8y_aoGg!vJu5WS?>NWrgg$&+3XID;Xu*naRF0!r2i*XN2pJz2iPv8QCLbZy`dN zS?ApQ`}_;fFR%aM1xco%S*+%MN(Q)i1O&>s2L*UbDN4&qD@X@A`jhJ0BR-p;Gt zu_d7W-61*0oF%UB&xxysg)oCvt-lW?`!iAo* zR!uo*uG!A`)JSY99<34_c+}~J*tW4Z)t8&#M(^gN%FXt_grG6bbLYHsvw_b7?21jA zux`6JA1|DjNA1BPyV8?+oU@)ODJ!#Xle2s2j(VXM)sd?HSg@wme?cSlDGeG_Cki5Y zRL6a`49q4fMog;6c;_%>oabV#7S3pj+|pFur#wx`tGZ>g;nS{jfK)u`BwcTwR=*oF zYh*#gW~v=^N>|V;h7|>)6=l9LC7#~AgWOW(*>|(&s?D`wt?-uGolx{QsrBgdQtVQ^ zBQo`y(%}3C+%#&=M#tj|chj!Zm5eE)=jP^vW7YGnPzMWHDQgmmRJEFe7H8JBGV)Tn z210E1GsZ9DkB8Wvsjjuc7=R7EtxJ;(y*Jl%JRdCS4k_9cM_PT?vyT3X z2>B=$fLrIGof6D-8_8|m%WOC4S>>P8j-hqq$eggZJZoc@&#EW`U02UpELK1LCuR@sok&oDX z)|Z+>huE_WE%}TmgTyBpN(gBixdIVa&G8xiAt@QSdLWCXmhgDe0ev(7!ivZpVrt?` zjR^&8y`B=udkYG><7=skRxY}L`;5_v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MIr0;*W^=~jRzBlk)$WS& zMkOQDv)1D)mVrnX3Zm21;HEZP-iLi{tHXX^fD8D)67?~?{+@-BE>nPl=S2ywsXMO` zKS}IQk`cB{an|!e-#c9afDcO2;tLG;&#py!)dHXmG%KZq`~e><$nGloJ4Z<8S+ z0nSn$P3||sv;mrrT3mX|8q8hhHh3uy-4sn7*5i{>3Bj>oi4=RJAa(m6_EmOw(~Xs( zMj9N*pMrj*^2;&%8^NyzmTF}=_q_owCnzh#!l3DfD!M$U?jq$Jv$FgpV+%WvTv$U! z963Hk zjbZ2IdF4z?MV{u%o%%DqUjt$)lP;rfD#rCyLR4`C{GE=%`wk81(GejNaE(T?vhJyN o`df)qe&WWGk?VdBc7ufMsrdpYbpL-uvJse=2kR9`5F{l30|v&4AOHXW literal 0 HcmV?d00001 diff --git a/python-husl.spec b/python-husl.spec new file mode 100644 index 0000000..604f2c5 --- /dev/null +++ b/python-husl.spec @@ -0,0 +1,185 @@ +%global _empty_manifest_terminate_build 0 +Name: python-husl +Version: 4.0.3 +Release: 1 +Summary: Human-friendly HSL +License: MIT +URL: http://www.husl-colors.org +Source0: https://files.pythonhosted.org/packages/85/49/089bab9b89e6b5ee99e1c1408664ea0c18a78a8fff3a90ce34daccd241de/husl-4.0.3.tar.gz +BuildArch: noarch + + +%description +[![Build Status](https://travis-ci.org/husl-colors/husl-python.svg?branch=master)](http://travis-ci.org/husl-colors/husl-python) +[![Package Version](https://img.shields.io/pypi/v/husl.svg)](https://pypi.python.org/pypi/husl/) + +A Python implementation of [HUSL](http://www.husl-colors.org) (revision 3). + +## Installation + +`pip install husl` + +## Usage + +**husl_to_hex(hue, saturation, lightness)** + +`hue` is a float between 0 and 360, `saturation` and `lightness` are floats between 0 and 100. This function returns the resulting color as a hex string. + +**husl_to_rgb(hue, saturation, lightness)** + +Like above, but returns a list of 3 floats between 0 and 1, for each RGB channel. + +**hex_to_husl(hex)** + +Takes a hex string and returns the HUSL color as a list of floats as defined above. + +**rgb_to_husl(red, green, blue)** + +Like above, but `red`, `green` and `blue` are passed as floats between 0 and 1. + +For HUSLp (the pastel variant), use `huslp_to_hex`, `huslp_to_rgb`, `hex_to_huslp` and `rgb_to_huslp`. + +## Testing + +Run `python setup.py test`. + +## Authors + +* Robert McGinley ([mcginleyr1](http://github.com/mcginleyr1)) +* Alexei Boronine ([boronine](http://github.com/boronine)) + + + +%package -n python3-husl +Summary: Human-friendly HSL +Provides: python-husl +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-wheel +BuildRequires: python3-pip +%description -n python3-husl +[![Build Status](https://travis-ci.org/husl-colors/husl-python.svg?branch=master)](http://travis-ci.org/husl-colors/husl-python) +[![Package Version](https://img.shields.io/pypi/v/husl.svg)](https://pypi.python.org/pypi/husl/) + +A Python implementation of [HUSL](http://www.husl-colors.org) (revision 3). + +## Installation + +`pip install husl` + +## Usage + +**husl_to_hex(hue, saturation, lightness)** + +`hue` is a float between 0 and 360, `saturation` and `lightness` are floats between 0 and 100. This function returns the resulting color as a hex string. + +**husl_to_rgb(hue, saturation, lightness)** + +Like above, but returns a list of 3 floats between 0 and 1, for each RGB channel. + +**hex_to_husl(hex)** + +Takes a hex string and returns the HUSL color as a list of floats as defined above. + +**rgb_to_husl(red, green, blue)** + +Like above, but `red`, `green` and `blue` are passed as floats between 0 and 1. + +For HUSLp (the pastel variant), use `huslp_to_hex`, `huslp_to_rgb`, `hex_to_huslp` and `rgb_to_huslp`. + +## Testing + +Run `python setup.py test`. + +## Authors + +* Robert McGinley ([mcginleyr1](http://github.com/mcginleyr1)) +* Alexei Boronine ([boronine](http://github.com/boronine)) + + + +%package help +Summary: Development documents and examples for husl +Provides: python3-husl-doc +%description help +[![Build Status](https://travis-ci.org/husl-colors/husl-python.svg?branch=master)](http://travis-ci.org/husl-colors/husl-python) +[![Package Version](https://img.shields.io/pypi/v/husl.svg)](https://pypi.python.org/pypi/husl/) + +A Python implementation of [HUSL](http://www.husl-colors.org) (revision 3). + +## Installation + +`pip install husl` + +## Usage + +**husl_to_hex(hue, saturation, lightness)** + +`hue` is a float between 0 and 360, `saturation` and `lightness` are floats between 0 and 100. This function returns the resulting color as a hex string. + +**husl_to_rgb(hue, saturation, lightness)** + +Like above, but returns a list of 3 floats between 0 and 1, for each RGB channel. + +**hex_to_husl(hex)** + +Takes a hex string and returns the HUSL color as a list of floats as defined above. + +**rgb_to_husl(red, green, blue)** + +Like above, but `red`, `green` and `blue` are passed as floats between 0 and 1. + +For HUSLp (the pastel variant), use `huslp_to_hex`, `huslp_to_rgb`, `hex_to_huslp` and `rgb_to_huslp`. + +## Testing + +Run `python setup.py test`. + +## Authors + +* Robert McGinley ([mcginleyr1](http://github.com/mcginleyr1)) +* Alexei Boronine ([boronine](http://github.com/boronine)) + + + +%prep +%autosetup -n husl-4.0.3 + +%build +%pyproject_build + +%install +%pyproject_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +touch filelist.lst +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-husl -f filelist.lst +%{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Mar 12 2024 Python_Bot - 4.0.3-1 +- Package Spec generated -- Gitee