forked from pool/python-geomet
Accepting request 809540 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/809540 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-geomet?expand=0&rev=2
This commit is contained in:
commit
39777b95b4
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 26 06:34:21 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
||||
|
||||
- %python3_only -> %python_alternative
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 20 08:14:34 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -30,6 +30,8 @@ BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-click
|
||||
Requires: python-six
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module click}
|
||||
@ -49,17 +51,29 @@ GeoJSON <-> WKT/WKB conversion utilities
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/geomet
|
||||
rm %{buildroot}%{_prefix}/LICENSE
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
export PATH=$PATH:%{buildroot}%{_bindir}
|
||||
%pytest
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
%{python_expand \
|
||||
sed -i 's:geomet:geomet-%{$python_version}:' geomet/tests/test_cli.py
|
||||
export PYTHONPATH=:%{buildroot}%{$python_sitelib}
|
||||
$python -m pytest
|
||||
}
|
||||
|
||||
%post
|
||||
%python_install_alternative geomet
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative geomet
|
||||
|
||||
%files %{python_files}
|
||||
%doc AUTHORS.txt README.md
|
||||
%license LICENSE
|
||||
%python3_only %{_bindir}/geomet
|
||||
%python_alternative %{_bindir}/geomet
|
||||
%{python_sitelib}/geomet
|
||||
%{python_sitelib}/geomet-%{version}-py*.egg-info
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user