diff --git a/distlib-0.3.0.zip b/distlib-0.3.0.zip new file mode 100644 index 0000000..8a4d153 Binary files /dev/null and b/distlib-0.3.0.zip differ diff --git a/distlib_unbundle.patch b/distlib_unbundle.patch new file mode 100644 index 0000000..5ee9129 --- /dev/null +++ b/distlib_unbundle.patch @@ -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, + }, diff --git a/python-distlib.spec b/python-distlib.spec new file mode 100644 index 0000000..ce01346 --- /dev/null +++ b/python-distlib.spec @@ -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 - 0.3.0-2 +- Package init diff --git a/python-distlib.yaml b/python-distlib.yaml new file mode 100644 index 0000000..f12c59b --- /dev/null +++ b/python-distlib.yaml @@ -0,0 +1,4 @@ +version_control: pypi +src_repo: distlib +tag_prefix: ^ +seperator: .