commit 716e05f159fce720ad45be07272f7a80b8115b83e74185192d95fa37a517efdf Author: Matej Cepl Date: Tue Dec 3 13:06:24 2019 +0000 Accepting request 753240 from devel:languages:python Rename package. OBS-URL: https://build.opensuse.org/request/show/753240 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-path?expand=0&rev=1 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/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/path-13.1.0.tar.gz b/path-13.1.0.tar.gz new file mode 100644 index 0000000..1fabb28 --- /dev/null +++ b/path-13.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97249b37e5e4017429a780920147200a2215e268c1a18fa549fec0b654ce99b7 +size 44958 diff --git a/python-path.changes b/python-path.changes new file mode 100644 index 0000000..6fff5e6 --- /dev/null +++ b/python-path.changes @@ -0,0 +1,236 @@ +------------------------------------------------------------------- +Tue Dec 3 13:56:29 CET 2019 - Matej Cepl + +- Update to 13.1.0: + - #170: Added read_text and read_bytes methods to align with + pathlib behavior. Deprecated text method. If you require + newline normalization of text, use + jaraco.text.normalize_newlines(Path.read_text()). + - #169: Renamed package from path.py to path. The docs make + reference to a pet name "path pie" for easier discovery. + - #169: Moved project at GitHub from jaraco/path.py to + jaraco/path. + - #171: Fixed exception in rmdir_p when target is not empty. + - #174: Rely on importlib.metadata on Python 3.8. + - Refreshed package metadata. + +- Rename of the package from path.py to path. + +------------------------------------------------------------------- +Mon Oct 21 08:18:00 UTC 2019 - Tomáš Chvátal + +- Add patch to build with pytest5: + * pytest5.patch + +------------------------------------------------------------------- +Fri Jul 26 16:56:38 CEST 2019 - Matej Cepl + +- Update to 12.0.1: + - #166: Removed 'universal' wheel support. + - #148: Dropped support for Python 2.7 and 3.4. + Moved 'path' into a package. + +------------------------------------------------------------------- +Fri Jul 19 10:05:17 UTC 2019 - Tomáš Chvátal + +- Update to 11.5.2: + * #163: Corrected 'pymodules' typo in package declaration. + +------------------------------------------------------------------- +Fri Jul 19 10:04:28 UTC 2019 - Tomáš Chvátal + +- Restrict version requirement on pytest to <5.x for now + +------------------------------------------------------------------- +Tue Feb 26 10:47:11 UTC 2019 - Tomáš Chvátal + +- Add missing python2 dependency on backports.os + +------------------------------------------------------------------- +Tue Feb 26 08:25:06 UTC 2019 - Tomáš Chvátal + +- Update to 11.5.0: + * Many fixes all around for detailed list see CHANGES.rst +- Use multibuild to avoid buildcycles + +------------------------------------------------------------------- +Tue Jul 4 09:45:39 UTC 2017 - aloisio@gmx.com + +- Update to version 10.3.1 + * #124: Fixed ``rmdir_p`` raising ``FileNotFoundError`` when + directory does not exist on Windows. + 10.3: + * #115: Added a new performance-optimized implementation + for listdir operations, optimizing ``listdir``, ``walk``, + ``walkfiles``, ``walkdirs``, and ``fnmatch``, presented + as the ``FastPath`` class. + Please direct feedback on this implementation to the ticket, + especially if the performance benefits justify it replacing + the default ``Path`` class. + 10.2: + * Symlink no longer requires the ``newlink`` parameter + and will default to the basename of the target in the + current working directory. + 10.1: + * #123: Implement ``Path.__fspath__`` per PEP 519. + 10.0: + * Once again as in 8.0 remove deprecated ``path.path``. + 9.1: + * #121: Removed workaround for #61 added in 5.2. ``path.py`` + now only supports file system paths that can be effectively + decoded to text. It is the responsibility of the system + implementer to ensure that filenames on the system are + decodeable by ``sys.getfilesystemencoding()``. + 9.0: + * Drop support for Python 2.6 and 3.2 as integration + dependencies (pip) no longer support these versions. + 8.3: + * Merge with latest skeleton, adding badges and test runs by + default under tox instead of pytest-runner. + * Documentation is no longer hosted with PyPI. + 8.2.1: + * #112: Update Travis CI usage to only deploy on Python 3.5. + 8.2: + * Refreshed project metadata based on `jaraco's project + skeleton _. + * Releases are now automatically published via Travis-CI. + * #111: More aggressively trap errors when importing + ``pkg_resources``. + 8.1.2: + * #105: By using unicode literals, avoid errors rendering the + backslash in __get_owner_windows. + +- Converted to single-spec + +------------------------------------------------------------------- +Tue Jul 4 09:40:55 UTC 2017 - aloisio@gmx.com + +- Update to version 10.3.1 (see CHANGES.rst) + +------------------------------------------------------------------- +Wed Sep 16 15:02:34 UTC 2015 - toddrme2178@gmail.com + +- Update to version 8.1.1 + * Restored path.path with a DeprecationWarning. + * Removed path.path. Clients must now refer to the canonical + name, path.Path as introduced in 6.2. + * Added support for resolving certain directories on a system to + platform-friendly locations using the appdirs library. + * In order to support "multipath" results, where multiple paths + are returned in a single, os.pathsep-separated string, a new + class MultiPath now represents those special results. This + functionality is experimental and may change. Feedback is + invited. + +------------------------------------------------------------------- +Wed Aug 12 14:22:58 UTC 2015 - toddrme2178@gmail.com + +- Update to version 7.6 + - Pull Request #100: Add ``merge_tree`` method for merging + two existing directory trees. + - Uses `setuptools_scm `_ + for version management. +- Update to version 7.5 + - #97: ``__rdiv__`` and ``__rtruediv__`` are now defined. +- Update to version 7.4 + - #93: chown now appears in docs and raises NotImplementedError if + ``os.chown`` isn't present. + - #92: Added compatibility support for ``.samefile`` on platforms without + ``os.samefile``. +- Update to version 7.3 + - #91: Releases now include a universal wheel. +- Update to version 7.2 + - In chmod, added support for multiple symbolic masks (separated by commas). + - In chmod, fixed issue in setting of symbolic mask with '=' where + unreferenced permissions were cleared. +- Update to version 7.1 + - #23: Added support for symbolic masks to ``.chmod``. +- Update to version 7.0 + - The ``open`` method now uses ``io.open`` and supports all of the + parameters to that function. ``open`` will always raise an ``OSError`` + on failure, even on Python 2. + - Updated ``write_text`` to support additional newline patterns. + - The ``text`` method now always returns text (never bytes), and thus + requires an encoding parameter be supplied if the default encoding is not + sufficient to decode the content of the file. +- Update to version 6.2 + - ``path`` class renamed to ``Path``. The ``path`` name remains as an alias + for compatibility. +- Update to version 6.1 + - ``chown`` now accepts names in addition to numeric IDs. +- Update to version 6.0 + - Drop support for Python 2.5. Python 2.6 or later required. + - Installation now requires setuptools. +- Update to version 5.3 + - Allow arbitrary callables to be passed to path.walk ``errors`` parameter. + Enables workaround for issues such as #73 and #56. +- Update to version 5.2 + - #61: path.listdir now decodes filenames from os.listdir when loading + characters from a file. On Python 3, the behavior is unchanged. On Python + 2, the behavior will now mimick that of Python 3, attempting to decode + all filenames and paths using the encoding indicated by + ``sys.getfilesystemencoding()``, and escaping any undecodable characters + using the 'surrogateescape' handler. +- Update to version 5.1 + - #53: Added ``path.in_place`` for editing files in place. +- Update to version 5.0 + - ``path.fnmatch`` now takes an optional parameter ``normcase`` and this + parameter defaults to self.module.normcase (using case normalization most + pertinent to the path object itself). Note that this change means that + any paths using a custom ntpath module on non-Windows systems will have + different fnmatch behavior. + - Issue #50: Methods that accept patterns (``listdir``, ``files``, ``dirs``, + ``walk``, ``walkdirs``, ``walkfiles``, and ``fnmatch``) will now use a + ``normcase`` attribute if it is present on the ``pattern`` parameter. The + path module now provides a ``CaseInsensitivePattern`` wrapper for strings + suitable for creating case-insensitive patterns for those methods. +- Update to version 4.4 + - Issue #44: _hash method would open files in text mode, producing + invalid results on Windows. Now files are opened in binary mode, producing + consistent results. + - Issue #47: Documentation is dramatically improved with Intersphinx links + to the Python os.path functions and documentation for all methods and + properties. +- Update to version 4.3 + - Issue #32: Add ``chdir`` and ``cd`` methods. +- Update to version 4.2 + - ``open()`` now passes all positional and keyword arguments through to the + underlying ``builtins.open`` call. +- Update to version 4.1 + - Native Python 2 and Python 3 support without using 2to3 during the build + process. +- Update to version 4.0 + - Added a ``chunks()`` method to a allow quick iteration over pieces of a + file at a given path. + - Issue #28: Fix missing argument to ``samefile``. + - Initializer no longer enforces `isinstance basestring` for the source + object. Now any object that supplies ``__unicode__`` can be used by a + ``path`` (except None). Clients that depend on a ValueError being raised + for ``int`` and other non-string objects should trap these types + internally. + - Issue #30: ``chown`` no longer requires both uid and gid to be provided + and will not mutate the ownership if nothing is provided. +- Update to version 3.2 + - Issue #22: ``__enter__`` now returns self. +- Update to version 3.1 + - Issue #20: `relpath` now supports a "start" parameter to match the + signature of `os.path.relpath`. +- Update to version 3.0 + - Minimum Python version is now 2.5. +- Update to version 2.6 + - Issue #5: Implemented `path.tempdir`, which returns a path object which is + a temporary directory and context manager for cleaning up the directory. + - Issue #12: One can now construct path objects from a list of strings by + simply using path.joinpath. +- Update to version 2.5 + - Issue #7: Add the ability to do chaining of operations that formerly only + returned None. + - Issue #4: Raise a TypeError when constructed from None. +- Update to version 2.4 + - No upstream changelog + +------------------------------------------------------------------- +Mon Jul 23 10:47:16 UTC 2012 - saschpe@suse.de + +- Initial version + diff --git a/python-path.spec b/python-path.spec new file mode 100644 index 0000000..5d2db59 --- /dev/null +++ b/python-path.spec @@ -0,0 +1,90 @@ +# +# spec file for package python-path +# +# Copyright (c) 2019 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%define skip_python2 1 +%define modname path +Name: python-path%{psuffix} +Version: 13.1.0 +Release: 0 +Summary: A module wrapper for os.path +License: MIT +URL: https://github.com/jaraco/path +Source: https://files.pythonhosted.org/packages/source/p/path/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module setuptools_scm >= 1.15.0} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-importlib-metadata >= 0.5 +BuildArch: noarch +# Renaming package +Provides: python-path.py = %{version}-%{release} +Obsoletes: python-path.py < %{version}-%{release} +%if %{with test} +BuildRequires: %{python_module %{modname} >= %{version}} +BuildRequires: %{python_module importlib-metadata >= 0.5} +BuildRequires: %{python_module pytest} +%endif +%python_subpackages + +%description +The path package implements a path objects as first-class +entities, allowing common operations on files to be invoked +on those path objects directly. + +%prep +%setup -q -n %{modname}-%{version} +%autopatch -p1 + +rm -rf %{modname}.egg-info +# no need to pull in flake +rm -f pytest.ini + +%build +%python_build + +%install +%if !%{with test} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +# need to set locale to avoid UnicodeEncodeError +export LANG=en_US.UTF-8 +# test_import_time -> relies on timing that varies in OBS +%pytest test_%{modname} -k 'not test_import_time' +%endif + +%if !%{with test} +%files %{python_files} +%license LICENSE +%doc CHANGES.rst README.rst +%{python_sitelib}/* +%endif + +%changelog