14
0

Accepting request 704286 from home:pgajdos

- version update to 0.6
  * no changelog available
- run tests
- convert to singlespec

OBS-URL: https://build.opensuse.org/request/show/704286
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requirements-detector?expand=0&rev=5
This commit is contained in:
Todd R
2019-05-20 18:19:01 +00:00
committed by Git OBS Bridge
parent c1087a30f7
commit c22f5bca53
4 changed files with 43 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-requirements-detector
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 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
@@ -12,27 +12,31 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-requirements-detector
Version: 0.4
Version: 0.6
Release: 0
Summary: Python tool to find and list requirements of a Python project
License: MIT
Group: Development/Languages/Python
Url: https://github.com/landscapeio/requirements-detector
Source: https://pypi.python.org/packages/source/r/requirements-detector/requirements-detector-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
# https://github.com/landscapeio/requirements-detector/issues/25
Source: https://github.com/landscapeio/requirements-detector/archive/%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module astroid}
BuildRequires: %{python_module nose}
# /SECTION
Requires: python-astroid >= 1.0.0
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
BuildRequires: fdupes
BuildArch: noarch
%endif
%python_subpackages
%description
requirements-detector is a simple Python tool which attempts to find and list the requirements of a Python project.
@@ -43,14 +47,26 @@ When run from the root of a Python project, it will try to ascertain which libra
%setup -q -n requirements-detector-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_clone -a %{buildroot}%{_bindir}/detect-requirements
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files
%defattr(-,root,root,-)
%{_bindir}/detect-requirements
%check
%python_expand PYTHONPATH=%{buildroot}%{$pthon_sitelib} nosetests-%{$python_bin_suffix}
%post
%python_install_alternative detect-requirements
%postun
%python_uninstall_alternative detect-requirements
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/*
%python_alternative %{_bindir}/detect-requirements
%changelog