Verified Commit 102f59bc authored by Duncan Macleod's avatar Duncan Macleod Committed by Adam Mercer
Browse files

lalmetaio: remove support for python2

parent 06de8b97
......@@ -106,7 +106,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_SED
LALSUITE_CHECK_PYTHON([2.6])
LALSUITE_CHECK_PYTHON([3.5])
# check for supported mac os x version
LALSUITE_OSX_VERSION_CHECK
......
......@@ -7,7 +7,6 @@ EXTRA_DIST = \
lalmetaio-octave.install \
liblalmetaio-dev.install \
liblalmetaio@LIBMAJOR@.install \
python-lalmetaio.install \
python3-lalmetaio.install \
rules \
lalsuite.mk \
......
......@@ -12,17 +12,11 @@ Build-Depends:
libmetaio-dev (>= @MIN_METAIO_VERSION@),
liboctave-dev,
pkg-config (>= 0.18.0),
python-all-dev,
python-lal (>= @MIN_LAL_VERSION@~),
python-mock,
python-pathlib,
python-pytest,
python3-all-dev,
python3-lal (>= @MIN_LAL_VERSION@~),
python3-pytest,
rsync,
swig (>= @MIN_SWIG_VERSION@) | swig3.0 (>= @MIN_SWIG_VERSION@),
X-Python-Version: >= 2.7
X-Python3-Version: >= 3.5
Standards-Version: 3.9.8
......@@ -55,30 +49,6 @@ Provides: lalmetaio-dev (= ${binary:Version})
Replaces: lalmetaio-dev (<< 2.0.0-2~)
Breaks: lalmetaio-dev (<< 2.0.0-2~)
Package: lalmetaio-python
Depends: python-lalmetaio, ${misc:Depends}
Architecture: all
Priority: extra
Section: oldlibs
Description: transitional package
lalmetaio-python was renamed python-lalmetaio,
this is a transitional package, it can safely be removed.
Package: python-lalmetaio
Section: python
Replaces: lalmetaio-python (<< 1.3.1.1-1~)
Breaks: lalmetaio-python (<< 1.3.1.1-1~)
Architecture: any
Depends:
${misc:Depends},
${python:Depends},
${shlibs:Depends},
liblalmetaio@LIBMAJOR@ (= ${binary:Version}),
python-lal (>= @MIN_LAL_VERSION@~),
Description: Python bindings for LALMetaIO
The LSC Algorithm MetaIO Library for gravitational wave data analysis.
This package contains Python bindings for the LAL MetaIO library.
Package: lalmetaio-python3
Depends: python3-lalmetaio, ${misc:Depends}
Architecture: all
......
../../gnuscripts/debian/pkg-python.install
\ No newline at end of file
......@@ -7,9 +7,6 @@
%undefine nightly
%endif
# borrowed from python3-rpm-macros
%define pyYdir %{_builddir}/pythonY-%{name}-%{version}-%{release}
# -- metadata ---------------
Name: @PACKAGE@
......@@ -37,18 +34,6 @@ BuildRequires: make
# swig
BuildRequires: swig >= @MIN_SWIG_VERSION@
%if 0%{?rhel} != 0 && 0%{?rhel} < 8
# python2
BuildRequires: python2-rpm-macros
BuildRequires: python-devel
BuildRequires: python2-lal >= @MIN_LAL_VERSION@
BuildRequires: python2-mock
BuildRequires: python2-numpy >= @MIN_NUMPY_VERSION@
BuildRequires: python-pathlib
BuildRequires: pytest
BuildRequires: rsync
%endif
# python3x
BuildRequires: python-srpm-macros
BuildRequires: python3-rpm-macros
......@@ -69,7 +54,7 @@ Summary: LSC Algorithm MetaIO Library - runtime tools
Group: LAL
Requires: lib%{name} = %{version}-%{release}
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
Obsoletes: python2-%{name} <= 2.0.2-1
%description
The LSC Algorithm MetaIO Library for gravitational wave data analysis.
This package provides the runtime tools.
......@@ -99,24 +84,6 @@ The LSC Algorithm MetaIO Library for gravitational wave data analysis. This
package contains files needed build applications that use the LAL MetaIO
library.
%if 0%{?rhel} != 0 && 0%{?rhel} < 8
# python2-lalmetaio
%package -n python2-%{name}
Summary: Python %{python2_version} Bindings for LALMetaIO
Group: LAL
Requires: lib%{name} = %{version}-%{release}
Requires: python
Requires: python2-lal >= @MIN_LAL_VERSION@
Requires: python2-numpy >= @MIN_NUMPY_VERSION@
Provides: %{name}-python = %{version}-%{release}
Provides: deprecated()
Obsoletes: %{name}-python < %{version}-%{release}
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-%{name}
The LSC Algorithm Library for gravitational wave data analysis.
This package provides the Python %{python2_version} bindings for LALMetaIO.
%endif
# python3x-lalmetaio
%package -n python%{python3_pkgversion}-%{name}
Summary: Python %{python3_version} Bindings for LALMetaIO
......@@ -147,42 +114,14 @@ This package provides the Octave bindings for LALMetaIO.
%setup -q -n %{name}-%{version}%{?nightly:-%{nightly}}
%build
# build C library with python3
%configure %{configure_opts} --disable-gcc-flags --enable-swig PYTHON=%{__python3}
%{__make} %{?_smp_mflags} V=1
%if 0%{?rhel} != 0 && 0%{?rhel} < 8
# build python2 library (copy things so we don't have to rebuild them)
rm -rf %pyYdir
rsync -ra . %pyYdir
pushd %pyYdir
rm -rfv python/%{name}/*.{la,lo,o} python/%{name}/.libs
%configure %{configure_opts} --disable-doxygen --disable-gcc-flags --disable-swig-octave --enable-swig-python PYTHON=%{__python2}
%{__make} V=1 -C swig
%{__make} V=1 -C python/%{name}
%{__make} V=1 -C bin bin_PROGRAMS="" dist_bin_SCRIPTS=""
popd
%endif
%check
# C + python3 + octave
%{__make} %{?_smp_mflags} V=1 VERBOSE=1 check
%if 0%{?rhel} != 0 && 0%{?rhel} < 8
# python2
[ -d %pyYdir/test/python ] && %{__make} %{?_smp_mflags} V=1 VERBOSE=1 -C %pyYdir -C test/python check
%endif
%install
# C + python3 + octave
%make_install
%if 0%{?rhel} != 0 && 0%{?rhel} < 8
# python2
%{__make} -C %pyYdir -C swig install-exec-am DESTDIR=%{?buildroot}
%{__make} -C %pyYdir -C python/%{name} install DESTDIR=%{?buildroot}
%endif
find $RPM_BUILD_ROOT%{_libdir} -name '*.la' -delete
%post -n lib%{name} -p /sbin/ldconfig
......@@ -210,14 +149,6 @@ rm -Rf ${RPM_BUILD_DIR}/%{name}-%{version}%{?nightly:-%{nightly}}
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%if 0%{?rhel} != 0 && 0%{?rhel} < 8
%files -n python2-%{name}
%defattr(-,root,root)
%doc README.md
%license COPYING
%{python2_sitearch}/*
%endif
%files -n python%{python3_pkgversion}-%{name}
%defattr(-,root,root)
%doc README.md
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment