From 0dcd7edfde3b78d381f5a783bb488a067ae90d6f488e9aad72dfd7e13b17fa31 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 16 Jun 2025 06:21:37 +0000 Subject: [PATCH] - Switch to pyroject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-crayons?expand=0&rev=17 --- .gitattributes | 23 ++++++++++++++++ .gitignore | 1 + crayons-0.4.0.tar.gz | 3 +++ python-crayons.changes | 58 ++++++++++++++++++++++++++++++++++++++++ python-crayons.spec | 60 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 145 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 crayons-0.4.0.tar.gz create mode 100644 python-crayons.changes create mode 100644 python-crayons.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/crayons-0.4.0.tar.gz b/crayons-0.4.0.tar.gz new file mode 100644 index 0000000..8a9aac6 --- /dev/null +++ b/crayons-0.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4a95433721246b157e057eb6c3119a57746707a9c826ad4692de1d1a2b70f37 +size 5374 diff --git a/python-crayons.changes b/python-crayons.changes new file mode 100644 index 0000000..ca6d684 --- /dev/null +++ b/python-crayons.changes @@ -0,0 +1,58 @@ +------------------------------------------------------------------- +Mon Jun 16 06:12:19 UTC 2025 - Steve Kowalik + +- Switch to pyroject macros. + +------------------------------------------------------------------- +Fri Jun 18 15:29:37 UTC 2021 - Matej Cepl + +- Fix Source URL + +------------------------------------------------------------------- +Tue Jun 15 17:32:37 UTC 2021 - Matej Cepl + +- Don't own everything under sitelib. +- Run some tests (and use GitHub tarball to get it) + +------------------------------------------------------------------- +Wed Jan 6 04:58:19 UTC 2021 - Steve Kowalik + +- Update to 0.4.0 + * Check that sys.stdout object has isatty attribute in addition to it + being True + + If using a custom object that does not have the isatty attribute and + you would still like color, you can set the CLINT_FORCE_COLOR environment + variable + * Explicitly set incoming parameter to crayons to string (so that len, etc. + work as expected) +- Drop LICENSE as a separate source, now included in the upstream tarball. + +------------------------------------------------------------------- +Mon Feb 24 05:03:28 UTC 2020 - Steve Kowalik + +- Update to 0.3.0 + * Rewrites clean to just remove ANSI codes, not whatever it was doing before (which seemed to be stripping all characters from the string) + * Adds random function to get a random color (thanks @azillion) + * Adds replace_color function to allow setting replacement for a given color (e.g. replace blue with magneta) (thanks @frostming) + * Adds reset_replace_color to reset any replacement colors set +- Update URL in the spec to be correct +- Write a description + +------------------------------------------------------------------- +Mon Mar 4 14:43:50 UTC 2019 - Ondřej Súkup + +- update to 0.2.0 + * Add crayons.enable() + * color funcs generated from __all__ var + * Disable colors on TERM=dumb + +------------------------------------------------------------------- +Fri May 11 21:52:30 UTC 2018 - toddrme2178@gmail.com + +- Don't forget python_module workaround. + +------------------------------------------------------------------- +Mon Nov 20 12:18:02 UTC 2017 - mimi.vx@gmail.com + +- initial package + diff --git a/python-crayons.spec b/python-crayons.spec new file mode 100644 index 0000000..36b14ef --- /dev/null +++ b/python-crayons.spec @@ -0,0 +1,60 @@ +# +# spec file for package python-crayons +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define modname crayons +Name: python-crayons +Version: 0.4.0 +Release: 0 +Summary: Colored strings for terminal usage +License: MIT +URL: https://github.com/MasterOdin/crayons +Source: https://github.com/MasterOdin/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module colorama} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +Requires: python-colorama +BuildArch: noarch +%python_subpackages + +%description +Crayons is a simple module to give you colored strings for terminal usage. +Included colors are red, green, yellow, blue, black, magenta, cyan, white, +and normal. + +%prep +%setup -q -n %{modname}-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install + +%check +%python_exec test_crayons.py + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/%{modname}.py +%{python_sitelib}/%{modname}-%{version}.dist-info +%pycache_only %{python_sitelib}/__pycache__/%{modname}.*.pyc + +%changelog