Package init

This commit is contained in:
chengzihan2 2020-06-22 11:28:55 +08:00
parent 9389bcc01b
commit 843b8a0474
4 changed files with 92 additions and 0 deletions

BIN
distlib-0.3.0.zip Normal file

Binary file not shown.

35
distlib_unbundle.patch Normal file
View File

@ -0,0 +1,35 @@
--- distlib-0.1.9/distlib/compat.py.orig 2014-06-06 09:58:21.317560756 +0200
+++ distlib-0.1.9/distlib/compat.py 2014-06-06 09:58:29.955611427 +0200
@@ -17,7 +17,7 @@ if sys.version_info[0] < 3:
from types import FileType as file_type
import __builtin__ as builtins
import ConfigParser as configparser
- from ._backport import shutil
+ import shutil
from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
from urllib import (urlretrieve, quote as _quote, unquote, url2pathname,
pathname2url, ContentTooShortError, splittype)
@@ -267,7 +267,7 @@ except ImportError: # pragma: no cover
try:
import sysconfig
except ImportError: # pragma: no cover
- from ._backport import sysconfig
+ import sysconfig
try:
callable = callable
--- distlib-0.1.9/setup.py.orig 2014-06-06 10:19:13.971997156 +0200
+++ distlib-0.1.9/setup.py 2014-06-06 10:19:20.012034150 +0200
@@ -62,12 +62,7 @@ distutils.core.setup(
platforms='any',
packages=[
'distlib',
- 'distlib._backport',
],
- package_data={
- 'distlib._backport': ['sysconfig.cfg'],
- 'distlib': ['t32.exe', 't64.exe', 'w32.exe', 'w64.exe'],
- },
cmdclass={
'test': TestCommand,
},

53
python-distlib.spec Normal file
View File

@ -0,0 +1,53 @@
%bcond_with check
Name: python-distlib
Version: 0.3.0
Release: 2
Summary: A library of packaging functionality
License: Python
URL: https://readthedocs.org/projects/distlib/
Source0: %pypi_source distlib %{version} zip
Patch0000: distlib_unbundle.patch
BuildRequires: python3-devel
BuildArch: noarch
%description
A library of packaging functionality which is intended to be used as the
basis for third-party packaging tools.
%package -n python3-distlib
Summary: A library of packaging functionality
%{?python_provide:%python_provide python3-distlib}
%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
rm distlib/*.exe
rm -rf distlib/_backport
rm tests/test_shutil.py*
rm tests/test_sysconfig.py*
%build
%py3_build
%if %{with check}
%check
export PYTHONHASHSEED=0
%{python3} setup.py test
%endif
%install
%py3_install
%files -n python3-distlib
%doc README.rst LICENSE.txt
%{python3_sitelib}/distlib
%{python3_sitelib}/distlib-%{version}-py?.?.egg-info
%changelog
* Fri Jun 5 2020 chengzihan <chengzihan2@huawei.com> - 0.3.0-2
- Package init

4
python-distlib.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: distlib
tag_prefix: ^
seperator: .