Accepting request 359630 from home:Rotkraut
Add package python3-magic providing Python 3 bindings. OBS-URL: https://build.opensuse.org/request/show/359630 OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=126
This commit is contained in:
parent
1af14c6bef
commit
cdd247fd26
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 16 12:40:33 UTC 2016 - rolf@rotkraut.de
|
||||
|
||||
- Make the python command a macro.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 21 11:32:14 UTC 2016 - dmueller@suse.com
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
%define somajor 1
|
||||
%define libname libmagic%{somajor}
|
||||
|
||||
%define python python
|
||||
|
||||
Name: file
|
||||
BuildRequires: findutils
|
||||
BuildRequires: libtool
|
||||
@ -143,7 +145,7 @@ CFLAGS="$RPM_OPT_FLAGS -DHOWMANY=69632 -fPIE"
|
||||
%{__make} %{?_smp_mflags} pkgdatadir='$(datadir)' LDFLAGS="-pie"
|
||||
%if 0%{?build_python_bindings:1}
|
||||
pushd python
|
||||
python setup.py build
|
||||
%python setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 16 12:41:14 UTC 2016 - rolf@rotkraut.de
|
||||
|
||||
- Make the python command a macro.
|
||||
- Remove %py_requires.
|
||||
- Add dependency on libmagic.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 21 11:32:14 UTC 2016 - dmueller@suse.com
|
||||
|
||||
|
@ -16,6 +16,10 @@
|
||||
#
|
||||
|
||||
|
||||
%{expand:%(sed -n -e '/^%%define somajor/,/^%%define libname/p' <%_sourcedir/file.spec)}
|
||||
|
||||
%define python python
|
||||
|
||||
Name: python-magic
|
||||
%define build_python_bindings 1
|
||||
BuildRequires: findutils
|
||||
@ -28,9 +32,9 @@ Release: 0
|
||||
Summary: Python module to use libmagic
|
||||
License: BSD-3-Clause and BSD-4-Clause
|
||||
Group: Development/Languages/Python
|
||||
%py_requires
|
||||
Source99: file.spec
|
||||
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/file.spec)}
|
||||
Requires: %libname
|
||||
%global _sysconfdir /etc
|
||||
%global _miscdir %{_datadir}/misc
|
||||
|
||||
@ -43,9 +47,9 @@ interface.
|
||||
|
||||
%install
|
||||
pushd python
|
||||
python setup.py install --root=%{buildroot} \
|
||||
--prefix=%{_prefix} \
|
||||
--record-rpm=../python_files
|
||||
%python setup.py install --root=%{buildroot} \
|
||||
--prefix=%{_prefix} \
|
||||
--record-rpm=../python_files
|
||||
popd
|
||||
|
||||
%files -f python_files
|
||||
|
5
python3-magic.changes
Normal file
5
python3-magic.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 16 12:42:29 UTC 2016 - rolf@rotkraut.de
|
||||
|
||||
- Add package python3-magic.
|
||||
|
59
python3-magic.spec
Normal file
59
python3-magic.spec
Normal file
@ -0,0 +1,59 @@
|
||||
#
|
||||
# spec file for package python3-magic
|
||||
#
|
||||
# Copyright (c) 2016 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/
|
||||
#
|
||||
|
||||
|
||||
%{expand:%(sed -n -e '/^%%define somajor/,/^%%define libname/p' <%_sourcedir/file.spec)}
|
||||
|
||||
%define python python3
|
||||
|
||||
Name: python3-magic
|
||||
%define build_python_bindings 1
|
||||
BuildRequires: findutils
|
||||
BuildRequires: libtool
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: zlib-devel
|
||||
Url: http://www.darwinsys.com/file/
|
||||
Version: 5.25
|
||||
Release: 0
|
||||
Summary: Python module to use libmagic
|
||||
License: BSD-3-Clause and BSD-4-Clause
|
||||
Group: Development/Languages/Python
|
||||
Source99: file.spec
|
||||
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/file.spec)}
|
||||
Requires: %libname
|
||||
%global _sysconfdir /etc
|
||||
%global _miscdir %{_datadir}/misc
|
||||
|
||||
%description
|
||||
This package contains the python binding that require the magic "file"
|
||||
interface.
|
||||
|
||||
%prep
|
||||
%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/file.spec | sed -e '1d' -e '$d')}
|
||||
|
||||
%install
|
||||
pushd python
|
||||
%python setup.py install --root=%{buildroot} \
|
||||
--prefix=%{_prefix} \
|
||||
--record-rpm=../python_files
|
||||
popd
|
||||
|
||||
%files -f python_files
|
||||
%defattr(-,root,root)
|
||||
%doc python/README python/example.py
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user