|
@@ -1,44 +1,101 @@
|
|
|
-%define python_sitearch %(python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)')
|
|
|
-Summary: Python module for GNU parted
|
|
|
-Summary(ja): parted の python モジュール
|
|
|
-Name: pyparted
|
|
|
-Version: 3.8
|
|
|
-Release: 4%{?_dist_release}
|
|
|
-License: GPLv2+
|
|
|
-Group: System Environment/Libraries
|
|
|
+Summary: Python module for GNU parted
|
|
|
+Summary(ja): parted の python モジュール
|
|
|
+Name: pyparted
|
|
|
+Version: 3.11.2
|
|
|
+Release: 1%{?_dist_release}
|
|
|
+License: GPLv2+
|
|
|
+Group: System Environment/Libraries
|
|
|
+
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
|
|
|
Source0: https://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
|
|
-BuildRequires: python-devel, parted-devel >= 3.0
|
|
|
-Requires: parted >= 3.0
|
|
|
+# https://github.com/dcantrell/pyparted/issues/57
|
|
|
+Patch0: use-decimal-instead-of-float.patch
|
|
|
+
|
|
|
+BuildRequires: python-devel
|
|
|
+BuildRequires: python-setuptools
|
|
|
+BuildRequires: python-rpm-macros
|
|
|
+BuildRequires: python-six
|
|
|
+
|
|
|
+BuildRequires: python3-devel
|
|
|
+BuildRequires: python3-setuptools
|
|
|
+BuildRequires: python3-rpm-macros
|
|
|
+BuildRequires: python3-six
|
|
|
+
|
|
|
+BuildRequires: parted-devel >= 3.2
|
|
|
+
|
|
|
+Requires: parted >= 3.2
|
|
|
|
|
|
%description
|
|
|
Python modules for the parted library. It is used for manipulation
|
|
|
partition tables.
|
|
|
|
|
|
+%package -n python3-pyparted
|
|
|
+Summary: Python 3 module for GNU parted
|
|
|
+Summary(ja): parted の python モジュール
|
|
|
+Group: System Environment/Libraries
|
|
|
+
|
|
|
+%description -n python3-pyparted
|
|
|
+Python 3 modules for the parted library. It is used for manipulation
|
|
|
+partition tables.
|
|
|
+
|
|
|
%prep
|
|
|
%setup -q
|
|
|
+%patch0 -p1
|
|
|
+
|
|
|
+rm -rf %{py3dir}
|
|
|
+mkdir -p %{py3dir}
|
|
|
+cp -a . %{py3dir}
|
|
|
|
|
|
%build
|
|
|
-export CFLAGS="%{optflags}"
|
|
|
-%__make %{?_smp_mflags}
|
|
|
+PYTHON=python make %{?_smp_mflags}
|
|
|
+
|
|
|
+pushd %{py3dir}
|
|
|
+PYTHON=python3 make %{?_smp_mflags}
|
|
|
+popd
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
-%__make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
+PYTHON=python %__make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
+
|
|
|
+pushd %{py3dir}
|
|
|
+PYTHON=python3 %__make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
+popd
|
|
|
+
|
|
|
+%check
|
|
|
+PYTHON=python make test
|
|
|
+
|
|
|
+pushd %{py3dir}
|
|
|
+PYTHON=python3 make test
|
|
|
+popd
|
|
|
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root,-)
|
|
|
-%doc README COPYING AUTHORS ChangeLog
|
|
|
+%license COPYING
|
|
|
+%doc AUTHORS NEWS README TODO
|
|
|
%{python_sitearch}/parted
|
|
|
%{python_sitearch}/*.egg-info
|
|
|
%{python_sitearch}/*.so
|
|
|
|
|
|
+%files -n python3-pyparted
|
|
|
+%license COPYING
|
|
|
+%doc AUTHORS NEWS README TODO
|
|
|
+%{python3_sitearch}/_ped.*.so
|
|
|
+%{python3_sitearch}/parted
|
|
|
+%{python3_sitearch}/%{name}-%{version}-*.egg-info
|
|
|
+
|
|
|
%changelog
|
|
|
+* Mon Sep 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.11.2-1
|
|
|
+- new upstream release.
|
|
|
+- added python3 support.
|
|
|
+- imported Patch0 from upstream.
|
|
|
+
|
|
|
* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8-4
|
|
|
- rebuild with VineSeed environment
|
|
|
|