From a604324856da908d74e79b2eda8ecdfd7e9c0bb0 Mon Sep 17 00:00:00 2001 From: Gianluca Sforna Date: Oct 03 2018 20:42:37 +0000 Subject: upstream release 2018.03.4 remove python 2 build for Fedora 30 --- diff --git a/.gitignore b/.gitignore index deb4686..4409586 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /Release_2017_03_3.tar.gz /Release_2017_09_1.tar.gz /Release_2018_03_2.tar.gz +/Release_2018_03_4.tar.gz diff --git a/rdkit.spec b/rdkit.spec index cac1419..6694594 100644 --- a/rdkit.spec +++ b/rdkit.spec @@ -1,20 +1,15 @@ -# recommonmark is currently incompatible with commonmark -# as included in Fedora -# https://github.com/rtfd/recommonmark/issues/24 -%global with_docs 0 - +%global with_docs 1 %global with_tests 0 -%global with_py3 1 %global year 2018 %global month 03 -%global extraver 2 +%global extraver 4 %global pkgname Release_%{year}_%{month}_%{extraver} %global rootdir rdkit-%{pkgname} Name: rdkit Version: %{year}.%{month}.%{extraver} -Release: 3%{?dist} +Release: 1%{?dist} Summary: Chemical informatics and machine learning toolkit License: BSD URL: http://www.rdkit.org/ @@ -24,8 +19,6 @@ BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: flex BuildRequires: bison -BuildRequires: python2-devel -BuildRequires: boost-python2-devel BuildRequires: postgresql-server-devel # TODO: it is bad that rdkit's buildsystem uses CMAKE's FindPostgreSQL because # that is supposed to find libpq.so installation, not the info about PostgreSQL @@ -42,50 +35,30 @@ BuildRequires: chrpath BuildRequires: swig BuildRequires: java-devel BuildRequires: junit -%if 0%{?fedora} && 0%{?with_py3} BuildRequires: python3-devel BuildRequires: boost-python3-devel -%endif %if 0%{?with_docs} # Docs build deps -BuildRequires: python2-sphinx -BuildRequires: python2-recommonmark +BuildRequires: python-sphinx-latex +BuildRequires: python3-recommonmark BuildRequires: epydoc BuildRequires: doxygen BuildRequires: pandoc - -%if 0%{?fedora} -BuildRequires: texlive-collection-latexrecommended -BuildRequires: texlive-collection-fontsrecommended -BuildRequires: tex(titlesec.sty) -BuildRequires: tex(framed.sty) -BuildRequires: tex(threeparttable.sty) -BuildRequires: tex(wrapfig.sty) -BuildRequires: tex(upquote.sty) -BuildRequires: tex(multirow.sty) -BuildRequires: tex(capt-of.sty) -BuildRequires: tex(eqparbox.sty) -%endif +BuildRequires: latexmk %endif # Needed for tests %if 0%{?with_tests} -BuildRequires: python2-cairo -BuildRequires: xorg-x11-fonts-Type1 -BuildRequires: python2-pandas -BuildRequires: python2-pillow -%if 0%{?fedora} && 0%{?with_py3} BuildRequires: python3-cairocffi BuildRequires: python3-pandas BuildRequires: python3-pillow -%endif +BuildRequires: xorg-x11-fonts-Type1 %endif Patch0: rdkit-2015.03-use_cairo_backend_on_tests.patch Patch1: rdkit-2018.03-do_not_install_sping.patch Patch2: rdkit-2018.03-fix_cmake_files_path.patch -Patch3: rdkit-2018.03.2-fix_libraries_soname.patch Patch4: rdkit-2015.03-dont_install_contrib.patch Patch5: rdkit-2018.03-pg-build.patch @@ -112,19 +85,6 @@ Requires: %{name} = %{version}-%{release} Documentation files for %{name}. -%package -n python2-rdkit -Summary: Python 2 bindings for RDKit libraries -%{?python_provide:%python_provide python2-rdkit} -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python2-numpy -Requires: python2-cairo -Requires: python2-pillow -Requires: xorg-x11-fonts-Type1 - -%description -n python2-rdkit -Python 2 bindings for RDKit libraries - -%if 0%{?fedora} && 0%{?with_py3} %package -n python3-rdkit Summary: Python 3 bindings for RDKit libraries %{?python_provide:%python_provide python3-rdkit} @@ -136,7 +96,7 @@ Requires: xorg-x11-fonts-Type1 %description -n python3-rdkit Python 3 bindings for RDKit libraries -%endif + %package postgresql Summary: RDKit cartridge for PostgreSQL @@ -158,16 +118,13 @@ the steps detailed in: %{_docdir}/%{name}-postgresql/README -# Prepare for a double build according to -# https://fedoraproject.org/wiki/Packaging:Python_Appendix#Using_separate_build_directories %prep %setup -c -q -n %{rootdir} -mv %{rootdir} python2 -pushd python2 +mv %{rootdir} python3 +pushd python3 %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch5 -p1 rm -rf rdkit/sping @@ -176,55 +133,23 @@ rm -rf rdkit/sping cp -pr license.txt ReleaseNotes.* ../ popd -%if 0%{?with_py3} -cp -a python2 python3 find python3 -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python3}|' # fix tests scripts for python3 runtime find python3 -name 'test_list.py' | xargs sed -i 's/"python"/"python3"/g' find python3 -name 'test_list.py' | xargs sed -i "s/'python'/'python3'/g" sed -i.orig 's/python/python3/g' python3/Projects/DbCLI/TestDbCLI.py -%endif -find python2 -name '*.py' | xargs sed -i '1s|^#!.*|#!%{__python2}|' %build # fix rpmlint "unused-direct-shlib-dependency" export CXXFLAGS="%{optflags} -Wl,--as-needed" -# Python 2 build -pushd python2 -%cmake -D RDK_INSTALL_INTREE=OFF \ - -D CMAKE_BUILD_TYPE=RelWithDebInfo \ - -D RDK_BUILD_INCHI_SUPPORT:BOOL=ON \ - -D RDK_BUILD_THREADSAFE_SSS:BOOL=ON \ - -D RDK_BUILD_CAIRO_SUPPORT:BOOL=ON \ - -D RDK_BUILD_PGSQL:BOOL=ON \ - -D RDK_BUILD_DESCRIPTORS3D:BOOL=OFF \ - -D RDK_BUILD_COORDGEN_SUPPORT:BOOL=OFF \ - -D RDK_BUILD_MOLINTERCHANGE_SUPPORT:BOOL=OFF \ - -D RDK_PGSQL_STATIC:BOOL=OFF \ - -D RDK_INSTALL_STATIC_LIBS:BOOL=OFF \ - -D RDK_USE_FLEXBISON:BOOL=ON \ - -D RDK_TEST_MULTITHREADED:BOOL=ON \ - -D PYTHON_EXECUTABLE:FILEPATH=%{__python2} \ - -D PostgreSQL_CONFIG=%_bindir/pg_server_config \ -%ifnarch %{ix86} x86_64 - -D RDK_OPTIMIZE_NATIVE:BOOL=OFF \ -%endif - . -# -D RDK_BUILD_SWIG_WRAPPERS:BOOL=ON \ - -make %{?_smp_mflags} - -# PostgreSQL cartridge -pushd Code/PgSQL/rdkit -chrpath -d librdkit.so -popd +pushd python3 %if 0%{with_docs} # Documentation (does not currently build on EPEL) -export RDBASE=%{_builddir}/%{rootdir}/python2 +export RDBASE=%{_builddir}/%{rootdir}/python3 pushd rdkit epydoc --config epydoc.config popd @@ -235,11 +160,8 @@ pushd Docs/Book make latexpdf popd %endif -popd -%if 0%{?fedora} && 0%{?with_py3} # Python 3 build -pushd python3 %cmake -D RDK_INSTALL_INTREE=OFF \ -D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D RDK_BUILD_INCHI_SUPPORT:BOOL=ON \ @@ -261,11 +183,16 @@ pushd python3 # -D RDK_BUILD_SWIG_WRAPPERS:BOOL=ON \ make %{?_smp_mflags} -%endif + +# PostgreSQL cartridge +pushd Code/PgSQL/rdkit +chrpath -d librdkit.so +popd +popd %install -# install Python 2 bindings -pushd python2 +# install Python 3 bindings +pushd python3 make install DESTDIR=%{buildroot} pushd Code/PgSQL/rdkit # TODO: upstream installation should be fixed @@ -275,42 +202,20 @@ install -D rdkit--3.5.sql %{buildroot}%{_datadir}/pgsql/extension/rdkit--3.5.sql popd popd -%if 0%{?fedora} && 0%{?with_py3} -# install Python 3 bindings -pushd python3 -make install DESTDIR=%{buildroot} -popd -%endif - # remove installed doc files rm -r %{buildroot}/%{_datadir}/RDKit # Fix rpmlint warnings -FMCS=%{buildroot}%{python2_sitearch}/rdkit/Chem/fmcs/fmcs -sed '1{\@^#!%{__python2}@d}' $FMCS.py > $FMCS.new && -touch -r $FMCS.py $FMCS.new && -mv $FMCS.new $FMCS.py -rm $FMCS - -%if 0%{?fedora} && 0%{?with_py3} FMCS=%{buildroot}%{python3_sitearch}/rdkit/Chem/fmcs/fmcs sed '1{\@^#!%{__python3}@d}' $FMCS.py > $FMCS.new && touch -r $FMCS.py $FMCS.new && mv $FMCS.new $FMCS.py rm $FMCS -%endif + %check %if 0%{?with_tests} # exclude PostgreSQL tests as they require a running DB instance -pushd python2 -export RDBASE=%{_builddir}/%{rootdir}/python2 -export LD_LIBRARY_PATH=$RDBASE/lib -export PYTHONPATH=$RDBASE -ARGS="-V -E 'pythonTestSping|testPgSQL'" make test -popd - -%if 0%{?fedora} && 0%{?with_py3} pushd python3 export RDBASE=%{_builddir}/%{rootdir}/python3 export LD_LIBRARY_PATH=$RDBASE/lib @@ -318,7 +223,6 @@ export PYTHONPATH=$RDBASE ARGS="-V -E 'pythonTestSping|testPgSQL'" make test popd %endif -%endif %post -p /sbin/ldconfig @@ -337,24 +241,23 @@ popd %files doc %if 0%{?with_docs} -%doc python2/Docs/Book/_build/latex/RDKit.pdf +%doc python3/Docs/Book/_build/latex/RDKit.pdf %endif -%files -n python2-rdkit -%{python2_sitearch}/rdkit - -%if 0%{?fedora} && 0%{?with_py3} %files -n python3-rdkit %{python3_sitearch}/rdkit -%endif %files postgresql -%doc python2/Code/PgSQL/rdkit/README +%doc python3/Code/PgSQL/rdkit/README %{_libdir}/pgsql/rdkit.so %{_datadir}/pgsql/extension/rdkit--*.sql %{_datadir}/pgsql/extension/rdkit.control %changelog +* Tue Sep 25 2018 Gianluca Sforna - 2018.03.4-1 +- upstream release 2018.03.4 +- remove python 2 build for Fedora 30 + * Wed Sep 05 2018 Pavel Raiskup - 2018.03.2-3 - rebuild against postgresql-server-devel (rhbz#1618698) diff --git a/sources b/sources index 2e4711e..0851320 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Release_2018_03_2.tar.gz) = 2b39e7a79da4d4eabe5a02867f087178c2a6e28bcf6d30180d23b3c30916596ce90ab797bf5a14dbd188c06b0057b1e84b3ad6c6a3f433bf6404f8932c53acfe +SHA512 (Release_2018_03_4.tar.gz) = 00c94e856eba3f4e6fb11282690f11389eccdf5df23b88b7d7840948a15e9208a2c704bbd11a740e11e06227b2af9f72dd8c51086906c21435263b788ffc7f8a