15
0
forked from pool/python-gps3

- Convert to pip-based build

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gps3?expand=0&rev=3
This commit is contained in:
2025-05-27 14:08:30 +00:00
committed by Git OBS Bridge
parent da1c938797
commit a11cb9d8f5
2 changed files with 19 additions and 10 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 27 14:07:46 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Sun Nov 10 09:01:21 UTC 2019 - Martin Hauke <mardnh@gmx.de>

View File

@@ -1,6 +1,7 @@
#
# spec file for package python-gps3
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2019, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
@@ -12,21 +13,23 @@
# 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-gps3
Version: 0.33.3+git.20171101
Release: 0
License: MIT
Summary: Python interface for gpsd
Url: https://github.com/wadda/gps3
License: MIT
Group: Development/Languages/Python
URL: https://github.com/wadda/gps3
Source: gps3-%{version}.tar.xz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%python_subpackages
@@ -36,17 +39,17 @@ Python interface for gpsd.
%prep
%setup -q -n gps3-%{version}
# don't use env
find . -name "*.py" -exec sed -i 's|#!/usr/bin/env python3.5|#!/usr/bin/python3|g' {} \;
find . -name "*.py" -exec sed -i 's|#!/usr/bin/env python3|#!/usr/bin/python3|g' {} \;
find . -name "*.py" -exec sed -i 's|#!%{_bindir}/env python3.5|#!%{_bindir}/python3|g' {} \;
find . -name "*.py" -exec sed -i 's|#!%{_bindir}/env python3|#!%{_bindir}/python3|g' {} \;
# drop shebang
find gps3/ -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
find examples/ -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
# remove examples
rm -rf %{buildroot}%{_datadir}/gps3
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -55,6 +58,7 @@ rm -rf %{buildroot}%{_datadir}/gps3
%license LICENSE
%doc DESCRIPTION.rst README.md
%doc examples/
%{python_sitelib}/*
%{python_sitelib}/gps3
%{python_sitelib}/gps3-%{version}*-info
%changelog