Accepting request 539914 from home:Pharaoh_Atem:branches:Base:System
- Add Provides exclusion for private libraries in Python sitearch dirs - Use python2-devel for BR for building Python 2 bindings - Add a comment to note that prep and build stages come from rpm.spec - Properly quote the conditional for Obsoletes+Provides - Unify rpm-python and python3-rpm into singlespec - Switch the build to use setuptools-based build, so that the Python module is properly built with all its metadata OBS-URL: https://build.opensuse.org/request/show/539914 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=417
This commit is contained in:
parent
acb961758c
commit
1f26defe77
@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 8 15:56:04 UTC 2017 - ngompa13@gmail.com
|
||||
|
||||
- Add Provides exclusion for private libraries in Python sitearch dirs
|
||||
- Use python2-devel for BR for building Python 2 bindings
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 28 12:19:34 UTC 2017 - ngompa13@gmail.com
|
||||
|
||||
- Add a comment to note that prep and build stages come from rpm.spec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 16 13:49:18 UTC 2017 - ngompa13@gmail.com
|
||||
|
||||
- Properly quote the conditional for Obsoletes+Provides
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 15 04:03:00 UTC 2017 - ngompa13@gmail.com
|
||||
|
||||
- Unify rpm-python and python3-rpm into singlespec
|
||||
- Switch the build to use setuptools-based build, so that
|
||||
the Python module is properly built with all its metadata
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 20 14:41:34 CET 2013 - mls@suse.de
|
||||
|
||||
@ -13,6 +36,16 @@ Wed Jan 2 14:25:20 UTC 2013 - dmueller@suse.com
|
||||
|
||||
- Update to 4.10.2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 4 08:54:25 UTC 2012 - coolo@suse.com
|
||||
|
||||
- fix build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 22 13:24:30 UTC 2012 - idonmez@suse.com
|
||||
|
||||
- Update for rpm 4.10.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 23 11:16:26 CEST 2012 - mls@suse.de
|
||||
|
||||
@ -32,6 +65,11 @@ Tue Jan 17 10:28:42 UTC 2012 - saschpe@suse.de
|
||||
* Removed %clean section
|
||||
* Removed authors from description
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 17:12:41 CET 2012 - dmueller@suse.de
|
||||
|
||||
- Initial package [python3-rpm]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 11 09:28:28 UTC 2011 - coolo@suse.com
|
||||
|
@ -1,7 +1,8 @@
|
||||
#
|
||||
# spec file for package python3-rpm
|
||||
# spec file for package python-rpm
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 Neal Gompa <ngompa13@gmail.com>.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,7 +17,8 @@
|
||||
#
|
||||
|
||||
|
||||
Name: python3-rpm
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-rpm
|
||||
Version: 4.13.0.1
|
||||
Release: 0
|
||||
Summary: Python Bindings for Manipulating RPM Packages
|
||||
@ -34,17 +36,36 @@ BuildRequires: libtool
|
||||
BuildRequires: lua-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: popt-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel
|
||||
Requires: rpm = %{version}
|
||||
|
||||
%if "%{python_flavor}" == "python2"
|
||||
Obsoletes: rpm-python < %{version}-%{release}
|
||||
Provides: rpm-python = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%if "%{python_flavor}" == "python3"
|
||||
Obsoletes: rpm-python3 < %{version}-%{release}
|
||||
Provides: rpm-python3 = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
# Enable Python build sourced from rpm spec
|
||||
%global with_python 1
|
||||
|
||||
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)}
|
||||
%global with_python 3
|
||||
|
||||
%global __provides_exclude_from ^(%{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so)$
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
The python3-rpm package contains a module that permits applications
|
||||
written in the Python programming language to use the interface
|
||||
supplied by RPM Package Manager libraries.
|
||||
This package contains a module that permits applications written in
|
||||
the Python programming language to use the interface supplied by
|
||||
RPM Package Manager libraries.
|
||||
|
||||
This package should be installed if you want to develop Python programs
|
||||
that will manipulate RPM packages and databases.
|
||||
@ -52,20 +73,17 @@ that will manipulate RPM packages and databases.
|
||||
%prep
|
||||
%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')}
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_prefix}/lib
|
||||
# only installing in python/ does not work because rpm links against
|
||||
# installed libs at install time
|
||||
%make_install
|
||||
find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm
|
||||
pushd %{buildroot}/%{_libdir}/python3*/site-packages/rpm
|
||||
rm -f _rpm*.la _rpm*.a
|
||||
python3 %{_libdir}/python3*/py_compile.py *.py
|
||||
python3 -O %{_libdir}/python3*/py_compile.py *.py
|
||||
# The build stage is already declared and pulled in from rpm.spec
|
||||
pushd python
|
||||
%python_build
|
||||
popd
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/python*/*/*
|
||||
%install
|
||||
pushd python
|
||||
%python_install
|
||||
popd
|
||||
|
||||
%files %{python_files}
|
||||
%{python_sitearch}/rpm*
|
||||
|
||||
%changelog
|
@ -1,33 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 12 15:36:43 CEST 2013 - mls@suse.de
|
||||
|
||||
- update to rpm-4.11.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 2 14:25:09 UTC 2013 - dmueller@suse.com
|
||||
|
||||
- Update to 4.10.2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 4 08:54:25 UTC 2012 - coolo@suse.com
|
||||
|
||||
- fix build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 22 13:24:30 UTC 2012 - idonmez@suse.com
|
||||
|
||||
- Update for rpm 4.10.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 17 10:29:20 UTC 2012 - saschpe@suse.de
|
||||
|
||||
- Spec file cleanup:
|
||||
* Don't rm -rf %{buildroot}
|
||||
* Removed %clean section
|
||||
* Removed authors from description
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 17:12:41 CET 2012 - dmueller@suse.de
|
||||
|
||||
- Initial package
|
||||
|
@ -1,73 +0,0 @@
|
||||
#
|
||||
# spec file for package rpm-python
|
||||
#
|
||||
# Copyright (c) 2017 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
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
Name: rpm-python
|
||||
Version: 4.13.0.1
|
||||
Release: 0
|
||||
#!BuildIgnore: rpmlint-Factory
|
||||
Summary: Python Bindings for Manipulating RPM Packages
|
||||
License: GPL-2.0+
|
||||
Group: System/Packages
|
||||
Source99: rpm.spec
|
||||
BuildRequires: file-devel
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: libbz2-devel
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libelf-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libsemanage-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: lua-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: popt-devel
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel
|
||||
Requires: rpm = %{version}
|
||||
%py_requires
|
||||
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)}
|
||||
%global with_python 2
|
||||
|
||||
%description
|
||||
The rpm-python package contains a module that permits applications
|
||||
written in the Python programming language to use the interface
|
||||
supplied by RPM Package Manager libraries.
|
||||
|
||||
This package should be installed if you want to develop Python programs
|
||||
that will manipulate RPM packages and databases.
|
||||
|
||||
%prep
|
||||
%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')}
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_prefix}/lib
|
||||
# only installing in python/ does not work because rpm links against
|
||||
# installed libs at install time
|
||||
%make_install
|
||||
find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm
|
||||
pushd %{buildroot}/%py_sitedir/rpm
|
||||
rm -f _rpm*.a _rpm*.la
|
||||
python %py_libdir/py_compile.py *.py
|
||||
python -O %py_libdir/py_compile.py *.py
|
||||
popd
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/python*/*/*
|
||||
|
||||
%changelog
|
2
rpm.spec
2
rpm.spec
@ -288,9 +288,7 @@ pushd beecrypt
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
export PYTHON=python%{with_python}
|
||||
autoreconf -fi
|
||||
sed -i -e 's,{PYTHON_VERSION}mu,{PYTHON_VERSION}mu python${PYTHON_VERSION}m,' configure
|
||||
./configure --disable-dependency-tracking --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
|
||||
--libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --with-lua \
|
||||
--with-vendor=suse \
|
||||
|
Loading…
Reference in New Issue
Block a user