Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
e421d4a5f5
!13 Update package
From: @liqiuyu123 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2022-12-06 06:12:46 +00:00
liqiuyu123
2576c8b34a update package 2022-12-06 13:43:35 +08:00
openeuler-ci-bot
39b62a2828
!11 update to version 4.1.0
From: @wang--ge 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2022-11-02 08:43:07 +00:00
wang--ge
f647aaf409 update to version 4.1.0 2022-11-02 15:14:55 +08:00
openeuler-ci-bot
4a0546cf1d !7 [sync] PR-5: Provides python-humanize
From: @openeuler-sync-bot
Reviewed-by: @yangzhao_kl
Signed-off-by: @yangzhao_kl
2021-09-28 06:40:25 +00:00
caodongxia
8028915d7b Provides python-humanize
(cherry picked from commit 9a167364d42834d9285a2c856aa85b4a4faa93d2)
2021-09-28 14:32:56 +08:00
openeuler-ci-bot
9b7e6a3708 !4 remove python2 subpackage
From: @lei_ju
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-10-29 18:37:28 +08:00
lei_ju
e3bf7314f1 remove python2 subpackage 2020-10-29 10:39:12 +08:00
openeuler-ci-bot
04c12758f7 !3 python-humanize
Merge pull request !3 from wangef/master
2020-05-19 14:25:50 +08:00
wwx913452
77d044bc0c added python-humanize.yaml 2020-05-07 10:46:47 +08:00
5 changed files with 94 additions and 45 deletions

View File

@ -0,0 +1,23 @@
From 808e6eea0818aabca60c8093c914f711686830bc Mon Sep 17 00:00:00 2001
From: liqiuyu123 <liqiuyu@kylinos.cn>
Date: Wed, 9 Nov 2022 17:38:08 +0800
Subject: [PATCH] add version to setup.cfg
---
setup.cfg | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.cfg b/setup.cfg
index 54cbbc6..bed650f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,6 @@
[metadata]
name = humanize
+version = 4.4.0
description = Python humanize utilities
long_description = file: README.md
long_description_content_type = text/markdown
--
2.37.1.windows.1

Binary file not shown.

BIN
humanize-4.4.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,77 +1,99 @@
%global _empty_manifest_terminate_build 0
Name: python-humanize
Version: 0.5.1
Release: 16
Version: 4.4.0
Release: 1
Summary: python humanize module
License: MIT
URL: https://github.com/jmoiron/humanize
Source0: https://pypi.python.org/packages/source/h/humanize/humanize-%{version}.tar.gz
URL: https://github.com/python-humanize/humanize
Source0: https://files.pythonhosted.org/packages/51/19/3e1adf0e7a8c8361496b085edcab2ddcd85410735a2b6fdd044247fc5b75/humanize-4.4.0.tar.gz
Patch0: 0001-add-version-to-setup.cfg.patch
BuildArch: noarch
BuildRequires: python2-setuptools python2-devel python3-devel python3-setuptools python3-tools
Requires: python3-importlib-metadata
%description
Python module that includes various common humanization utilities.
%package -n python2-humanize
Summary: python2 humanize module
Provides: python-humanize = 0.5.1-15
Obsoletes: python-humanize < 0.5.1-15
%description -n python2-humanize
Python2 module that includes various common humanization utilities.
%package -n python3-humanize
Summary: python3 humanize module
Summary: Python humanize utilities
Provides: python-humanize = 4.4.0
BuildRequires: python3-devel
BuildRequires: python3-freezegun
BuildRequires: python3-pytest
BuildRequires: python3-pytest-cov
BuildRequires: python3-setuptools
%description -n python3-humanize
Python module that includes various common humanization utilities.
%package help
Summary: Development documents and examples for humanize
Provides: python3-humanize-doc
%description help
Python3 module that includes various common humanization utilities.
%prep
%autosetup -p1 -n humanize-%{version}
for lib in humanize/time.py humanize/filesize.py humanize/number.py; do
sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
touch -r $lib $lib.new && mv $lib.new $lib
done
rm -rf %{py3dir}
cp -a . %{py3dir}
%setup -n humanize-4.4.0
%patch0 -p1
%build
pushd %{py3dir}
LANG=en_US.UTF-8 /usr/bin/python3 setup.py build
popd
/usr/bin/python2 setup.py build
%py3_build
%install
pushd %{py3dir}
LANG=en_US.UTF-8 /usr/bin/python3 setup.py install --skip-build --root %{buildroot}
%find_lang humanize
%py3_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}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
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
/usr/bin/python2 setup.py install --skip-build --root %{buildroot}
%find_lang humanize
sed -i 's|^.*%{python3_sitelib}.*||' humanize.lang
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check
%if %{?_with_check:1}%{!?_with_check:0}
/usr/bin/python2 setup.py test
pushd %{py3dir}
LANG=en_US.UTF-8 /usr/bin/python3 setup.py test
popd
%endif
%files -n python2-humanize -f humanize.lang
%doc README.rst LICENCE
%dir %{python2_sitelib}/humanize
%{python2_sitelib}/humanize/*.py*
%{python2_sitelib}/humanize-%{version}-py%{python2_version}.egg-info
%exclude %{_usr}/lib/python*/site-packages/humanize/locale/*/LC_MESSAGES/*.po
%files -n python3-humanize -f %{py3dir}/humanize.lang
%doc README.rst LICENCE
%dir %{python3_sitelib}/humanize
%{python3_sitelib}/humanize/*.py
%{python3_sitelib}/humanize/__pycache__
%{python3_sitelib}/humanize-%{version}-py%{python3_version}.egg-info
%exclude %{_usr}/lib/python*/site-packages/humanize/locale/*/LC_MESSAGES/*.po
%files -n python3-humanize -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Mon Oct 24 2022 liqiuyu <liqiuyu@kylinos.cn> - 4.4.0-1
- Upgrade to version 4.4.0
* Wed Nov 02 2022 Ge Wang <wangge20@h-partners.com> - 4.1.0-1
- Upgrade to version 4.1.0
* Mon Sep 27 2021 caodongxia <caodongxia@huawei.com> - 0.5.1-18
- Provides python-humanize
* Wed Oct 21 2020 leiju <leiju4@huawei.com> - 0.5.1-17
- rename python2 subpackage
* Sun Mar 22 2020 Shuaishuai Song <songshuaishuai2@huawei.com> - 0.5.1-16
- disable make check
* Thu Dec 19 2019 Shuaishuai Song <songshuaishuai2@huawei.com> - 0.5.1-15
- package init

4
python-humanize.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: python-humanize/humanize
tag_prefix: ^
separator: .