1
0
python-packaging/python-packaging.spec
Todd R 5004914bfa Accepting request 590421 from home:TheBlackCat:branches:devel:languages:python
- Update to version 17.1
  * Fix utils.canonicalize_version when supplying non PEP 440 versions.
- Update to version 17.0
  * Drop support for python 2.6, 3.2, and 3.3.
  * Define minimal pyparsing version to 2.0.2 (#91).
  * Add epoch, release, pre, dev, and post attributes to Version and LegacyVersion (#34).
  * Add Version().is_devrelease and LegacyVersion().is_devrelease to make it easy to determine if a release is a development release.
  * Add utils.canonicalize_version to canonicalize version strings or Version instances (#121).

OBS-URL: https://build.opensuse.org/request/show/590421
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=19
2018-03-22 20:43:19 +00:00

79 lines
2.5 KiB
RPMSpec

#
# spec file for package python-packaging
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-packaging
Version: 17.1
Release: 0
Summary: Core utilities for Python packages
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/pypa/packaging
Source: https://pypi.io/packages/source/p/packaging/packaging-%{version}.tar.gz
BuildRequires: %{python_module base}
BuildRequires: %{python_module pyparsing >= 2.0.2}
BuildRequires: %{python_module six}
BuildRequires: python-rpm-macros
# do not add setuptools dependency, this is now a dependency
# of setuptools. Ensure that all dependencies also don't depend
# on setuptools
# (at the moment, six and pyparsing are ok)
%if %{with test}
BuildRequires: %{python_module pretend}
BuildRequires: %{python_module pytest}
%endif
# older versions produce:
# File "/usr/lib/python2.7/site-packages/packaging/requirements.py", line 59, in <module>
# MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
# TypeError: __call__() takes exactly 2 arguments (1 given)
Requires: python-pyparsing >= 2.0.2
Requires: python-six
BuildArch: noarch
%python_subpackages
%description
Core utilities for Python packages
%prep
%setup -q -n packaging-%{version}
%build
%python_build
%install
%python_install
# ensure egg-info is a directory
%{python_expand rm %{buildroot}%{$python_sitelib}/*.egg-info
cp -r packaging.egg-info %{buildroot}%{$python_sitelib}/packaging-%{version}-py%{$python_version}.egg-info
}
%if %{with test}
%check
%python_exec %{_bindir}/py.test
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGELOG.rst LICENSE README.rst
%{python_sitelib}/packaging
%{python_sitelib}/packaging-%{version}-py*.egg-info/
%changelog