forked from pool/python-packaging
- update for single-spec
- drop setuptools dependency, as this is itself now a dependency of setuptools - run tests conditionally, to minimize dependency tree - ensure egg-info is a directory (distutils would install it as file) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=14
This commit is contained in:
parent
aa0bdf3adc
commit
05d0d79017
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 23 11:45:52 UTC 2017 - jmatejek@suse.com
|
||||
|
||||
- update for single-spec
|
||||
- drop setuptools dependency, as this is itself now a dependency
|
||||
of setuptools
|
||||
- run tests conditionally, to minimize dependency tree
|
||||
- ensure egg-info is a directory (distutils would install it as file)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 17:55:31 UTC 2016 - tbechtold@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-packaging
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 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
|
||||
@ -16,6 +16,9 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_with test
|
||||
|
||||
%{?!python_module:%define python_module() python-%{1} python3-%{1}}
|
||||
Name: python-packaging
|
||||
Version: 16.8
|
||||
Release: 0
|
||||
@ -24,20 +27,23 @@ 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-devel
|
||||
BuildRequires: python-pretend
|
||||
BuildRequires: python-pyparsing
|
||||
BuildRequires: python-pytest
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-six
|
||||
BuildRequires: %{python_module base}
|
||||
BuildRequires: %{python_module pyparsing}
|
||||
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
|
||||
Requires: python-pyparsing
|
||||
Requires: python-six
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Core utilities for Python packages
|
||||
@ -46,17 +52,24 @@ Core utilities for Python packages
|
||||
%setup -q -n packaging-%{version}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
%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
|
||||
py.test
|
||||
%python_exec %{_bindir}/py.test
|
||||
%endif
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc CHANGELOG.rst LICENSE README.rst
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/packaging
|
||||
%{python_sitelib}/packaging-%{version}-py*.egg-info/
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user