forked from pool/python-pipreqs
- Don't use %python3_only command, but properly use alternatives.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pipreqs?expand=0&rev=5
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 18 20:42:58 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Don't use %python3_only command, but properly use alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 24 10:47:46 UTC 2020 - pgajdos@suse.com
|
Tue Mar 24 10:47:46 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -32,6 +32,8 @@ BuildRequires: python-rpm-macros
|
|||||||
Requires: python-docopt
|
Requires: python-docopt
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
Requires: python-yarg
|
Requires: python-yarg
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module docopt}
|
BuildRequires: %{python_module docopt}
|
||||||
@@ -51,16 +53,23 @@ chmod a-x pipreqs/pipreqs.py
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/pipreqs
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Ignore tests that require network access
|
# Ignore tests that require network access
|
||||||
%pytest -k 'not (test_get_imports_info or test_ignored_directory or test_init or test_init_overwrite or teset_init_savepath or test_omit_version)'
|
%pytest -k 'not (test_get_imports_info or test_ignored_directory or test_init or test_init_overwrite or teset_init_savepath or test_omit_version)'
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative pipreqs
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative pipreqs
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc AUTHORS.rst README.rst
|
%doc AUTHORS.rst README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%python3_only %{_bindir}/pipreqs
|
%python_alternative %{_bindir}/pipreqs
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user