add python3 subpackage (#1285258)
This commit is contained in:
parent
4e78b1f4dc
commit
538cd1bc91
|
@ -5,7 +5,7 @@
|
|||
%{!?python2_sitearch:%global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
|
||||
# we don't want to provide private Perl or Python extension libs
|
||||
%global __provides_exclude_from ^(%{perl_vendorarch}/auto/.*\\.so|%{python2_sitearch}/.*\\.so)$
|
||||
%global __provides_exclude_from ^(%{perl_vendorarch}/auto|%{python2_sitearch}|%{python3_sitearch})/.*\\.so$
|
||||
|
||||
Name: openbabel
|
||||
Version: 2.3.90
|
||||
|
@ -109,14 +109,25 @@ BuildRequires: perl-devel
|
|||
%description -n perl-%{name}
|
||||
Perl wrapper for the Open Babel library.
|
||||
|
||||
%package -n python-%{name}
|
||||
%package -n python2-%{name}
|
||||
Group: System Environment/Libraries
|
||||
Summary: Python wrapper for the Open Babel library
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
BuildRequires: python2-devel
|
||||
%{?python_provide:%python_provide python2-%{name}}
|
||||
|
||||
%description -n python-%{name}
|
||||
Python wrapper for the Open Babel library.
|
||||
%description -n python2-%{name}
|
||||
Python2 wrapper for the Open Babel library.
|
||||
|
||||
%package -n python3-%{name}
|
||||
Group: System Environment/Libraries
|
||||
Summary: Python wrapper for the Open Babel library
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
BuildRequires: python3-devel
|
||||
%{?python_provide:%python_provide python3-%{name}}
|
||||
|
||||
%description -n python3-%{name}
|
||||
Python3 wrapper for the Open Babel library.
|
||||
|
||||
%package -n ruby-%{name}
|
||||
Summary: Ruby wrapper for the Open Babel library
|
||||
|
@ -148,12 +159,21 @@ for man in *.1; do
|
|||
rm $html
|
||||
fi
|
||||
done
|
||||
popd
|
||||
|
||||
mkdir python3
|
||||
for f in *; do
|
||||
if [ "$f" != "python3" ]; then
|
||||
cp -a $f python3/
|
||||
fi
|
||||
done
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||
-DBUILD_GUI:BOOL=ON \
|
||||
-DPYTHON_BINDINGS:BOOL=ON \
|
||||
-DPYTHON_EXECUTABLE=%{__python2} \
|
||||
-DPERL_BINDINGS:BOOL=ON \
|
||||
-DRUBY_BINDINGS:BOOL=ON \
|
||||
-DOPENBABEL_USE_SYSTEM_INCHI=true \
|
||||
|
@ -164,8 +184,32 @@ done
|
|||
.
|
||||
make VERBOSE=1 %{?_smp_mflags}
|
||||
|
||||
BUILD_DIR=$PWD
|
||||
pushd python3
|
||||
%cmake \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||
-DBUILD_GUI:BOOL=OFF \
|
||||
-DPYTHON_BINDINGS:BOOL=ON \
|
||||
-DPYTHON_EXECUTABLE=%{__python3} \
|
||||
-DPERL_BINDINGS:BOOL=OFF \
|
||||
-DRUBY_BINDINGS:BOOL=OFF \
|
||||
-DOPENBABEL_USE_SYSTEM_INCHI=true \
|
||||
-DENABLE_VERSIONED_FORMATS=false \
|
||||
-DRUN_SWIG=true \
|
||||
-DENABLE_TESTS:BOOL=OFF \
|
||||
-DOPTIMIZE_NATIVE=OFF \
|
||||
-DBINDINGS_ONLY:BOOL=ON \
|
||||
-DBABEL_SYSTEM_LIBRARY=$BUILD_DIR/%{_lib}/libopenbabel.so \
|
||||
.
|
||||
make VERBOSE=1 %{?_smp_mflags} bindings_python
|
||||
popd
|
||||
|
||||
%install
|
||||
make VERBOSE=1 DESTDIR=%{buildroot} install
|
||||
pushd python3
|
||||
export DESTDIR=%{buildroot}
|
||||
%cmake -DCOMPONENT=bindings_python -P cmake_install.cmake
|
||||
popd
|
||||
|
||||
rm %{buildroot}%{_libdir}/cmake/openbabel2/*.cmake
|
||||
|
||||
|
@ -212,13 +256,19 @@ make test
|
|||
%dir %{perl_vendorarch}/*/Chemistry/OpenBabel
|
||||
%{perl_vendorarch}/*/Chemistry/OpenBabel/OpenBabel.so
|
||||
|
||||
%files -n python-%{name}
|
||||
%files -n python2-%{name}
|
||||
%{python2_sitearch}/_openbabel.so
|
||||
%{python2_sitearch}/openbabel.py*
|
||||
%{python2_sitearch}/pybel.py*
|
||||
# Egg-info is not generated in 2.3.2, see upstream bug 837
|
||||
#%%{python_sitearch}/openbabel*.egg-info
|
||||
|
||||
%files -n python3-%{name}
|
||||
%{python3_sitearch}/_openbabel.so
|
||||
%{python3_sitearch}/openbabel.py
|
||||
%{python3_sitearch}/pybel.py
|
||||
%{python3_sitearch}/__pycache__/*
|
||||
|
||||
%files -n ruby-%{name}
|
||||
%{ruby_vendorarchdir}/openbabel.so
|
||||
|
||||
|
@ -228,6 +278,7 @@ make test
|
|||
- fix macro usage
|
||||
- update to current Git master HEAD
|
||||
- fix narrowing conversion compilation error
|
||||
- add python3 subpackage (#1285258)
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.90-0.8.20150402gita345105
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
|
Loading…
Reference in New Issue