forked from pool/python-parted
- Add patch to tweak features detected in tests (parted changes
from suse): * python-parted-featurestest.patch - Add patch python-parted-parted-binary.patch to run parted full path as user does not see sbin binaries - Add patch no-last-flag-check.patch from debian - Add patch python-parted-unittests.patch from ubuntu to fix tests - Implement singlespec version for python3 - Refresh patch pyparted-3.10.patch to work with python3 - Enable testsuite to validate it somehow OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parted?expand=0&rev=8
This commit is contained in:
committed by
Git OBS Bridge
parent
ae81501588
commit
d7e8562b4a
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-parted
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 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,24 +16,34 @@
|
||||
#
|
||||
|
||||
|
||||
Summary: Python module for GNU parted
|
||||
License: GPL-2.0+
|
||||
Group: Development/Languages/Python
|
||||
Name: python-parted
|
||||
%define srcname pyparted
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-parted
|
||||
Version: 3.11.1
|
||||
Release: 0
|
||||
Url: http://fedorahosted.org/pyparted
|
||||
|
||||
Summary: Python module for GNU parted
|
||||
License: GPL-2.0-or-later
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/dcantrell/pyparted/
|
||||
Source0: https://github.com/dcantrell/pyparted/archive/v3.11.1.tar.gz#/%{srcname}-%{version}.tar.gz
|
||||
# catch exception for unknown 'disk flag', kkaempf@suse.de
|
||||
Patch: pyparted-3.10.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Patch0: pyparted-3.10.patch
|
||||
# do not check for PED_PARTITION)_LAST_FLAG as it is not part of ABI
|
||||
Patch1: no-last-flag-check.patch
|
||||
Patch2: python-parted-unittests.patch
|
||||
Patch3: python-parted-parted-binary.patch
|
||||
Patch4: python-parted-featurestest.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module six}
|
||||
# tests requires
|
||||
BuildRequires: e2fsprogs
|
||||
BuildRequires: parted
|
||||
Requires: parted
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: parted-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-devel >= 2.7
|
||||
BuildRequires: python-rpm-macros
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Python module for the parted library. It is used for manipulating
|
||||
@@ -41,20 +51,22 @@ partition tables.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{srcname}-%{version}
|
||||
%patch -p1
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags}
|
||||
%python_build
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%fdupes %{buildroot}
|
||||
%check
|
||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m unittest discover -v
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING NEWS README TODO
|
||||
%{python_sitearch}/_ped.so
|
||||
%files %{python_files}
|
||||
%license COPYING
|
||||
%doc AUTHORS NEWS README TODO
|
||||
%{python_sitearch}/_ped*.so
|
||||
%{python_sitearch}/parted
|
||||
%{python_sitearch}/%{srcname}-%{version}-*.egg-info
|
||||
|
||||
|
||||
Reference in New Issue
Block a user