!9 Update package

From: @liqiuyu123 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
This commit is contained in:
openeuler-ci-bot 2022-08-05 05:40:25 +00:00 committed by Gitee
commit e02904c935
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 147 additions and 46 deletions

90
0001-add-setup.py.patch Normal file
View File

@ -0,0 +1,90 @@
From ee8a0b6009f7aa8bef36b2d11f441020a5784016 Mon Sep 17 00:00:00 2001
From: liqiuyu123 <liqiuyu@kylinos.cn>
Date: Thu, 4 Aug 2022 14:35:58 +0800
Subject: [PATCH] add setup.py
---
setup.py | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
create mode 100644 setup.py
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..e88d95f
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,71 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2021 Vinay Sajip.
+# Licensed to the Python Software Foundation under a contributor agreement.
+# See LICENSE.txt and CONTRIBUTORS.txt.
+#
+
+import distutils.core
+from os.path import join, dirname
+
+import distlib
+
+
+class TestCommand(distutils.core.Command):
+ user_options = []
+
+ def run(self):
+ import sys
+
+ sys.path.append(join(dirname(__file__), 'tests'))
+ import test_all
+ sys.exit(test_all.main())
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+
+distutils.core.setup(
+ name='distlib',
+ version=distlib.__version__,
+ author='Vinay Sajip',
+ author_email='vinay_sajip@red-dove.com',
+ url='https://bitbucket.org/pypa/distlib',
+ download_url=('https://bitbucket.org/pypa/distlib/downloads/'
+ 'distlib-' + distlib.__version__ + '.zip'),
+ description='Distribution utilities',
+ long_description=('Low-level components of distutils2/packaging, '
+ 'augmented with higher-level APIs for making packaging easier.'),
+ license='Python license',
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Console',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Python Software Foundation License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
+ 'Topic :: Software Development',
+ ],
+ platforms='any',
+ packages=[
+ 'distlib'
+ ],
+ package_data={
+ 'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe',
+ 't64-arm.exe', 'w64-arm.exe'],
+ },
+ cmdclass={
+ 'test': TestCommand,
+ },
+)
--
2.37.0.windows.1

Binary file not shown.

BIN
distlib-0.3.5.tar.gz Normal file

Binary file not shown.

View File

@ -1,18 +0,0 @@
diff --git a/setup.py b/setup.py
index e88d95f..6e1e3df 100644
--- a/setup.py
+++ b/setup.py
@@ -61,10 +61,6 @@ distutils.core.setup(
packages=[
'distlib'
],
- package_data={
- 'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe',
- 't64-arm.exe', 'w64-arm.exe'],
- },
cmdclass={
'test': TestCommand,
},
--
1.8.3.1

View File

@ -1,14 +1,12 @@
%bcond_with check
%global _empty_manifest_terminate_build 0
Name: python-distlib
Version: 0.3.4
Version: 0.3.5
Release: 1
Summary: A library of packaging functionality
License: Python-2.0
URL: https://readthedocs.org/projects/distlib/
Source0: %pypi_source distlib %{version} zip
Patch0000: distlib_unbundle.patch
BuildRequires: python3-devel
URL: https://github.com/pypa/distlib
Source0: https://files.pythonhosted.org/packages/31/d5/e2aa0aa3918c8d88c4c8e4ebbc50a840e101474b98cd83d3c1712ffe5bb4/distlib-0.3.5.tar.gz
Patch0: 0001-add-setup.py.patch
BuildArch: noarch
%description
@ -17,34 +15,65 @@ basis for third-party packaging tools.
%package -n python3-distlib
Summary: A library of packaging functionality
%{?python_provide:%python_provide python3-distlib}
Provides: python-distlib
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-distlib
A library of packaging functionality which is intended to be used as the
basis for third-party packaging tools.
%prep
%autosetup -n distlib-%{version} -p1
%package help
Summary: Development documents and examples for distlib
Provides: python3-distlib-doc
%description help
A library of packaging functionality which is intended to be used as the
basis for third-party packaging tools.
rm distlib/*.exe
%prep
%autosetup -n distlib-0.3.5
%patch0
%build
%py3_build
%if %{with check}
%check
export PYTHONHASHSEED=0
%{python3} setup.py test
%endif
%install
%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
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-distlib
%doc README.rst LICENSE.txt
%{python3_sitelib}/distlib*
%files -n python3-distlib -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Aug 04 2022 liqiuyu <liqiuyu@kylinos.cn> - 0.3.5-1
- update to 0.3.5
* Thu Dec 09 2021 shixuantong <shixuantong@huawei.com> - 0.3.4-1
- update version to 0.3.4