Skip to content
Snippets Groups Projects
Verified Commit 74eeeab3 authored by Duncan Macleod's avatar Duncan Macleod
Browse files

move command line into separate package

parent b910fd98
No related branches found
No related tags found
1 merge request!27Move command line into separate package
......@@ -131,8 +131,9 @@ source:debian:stretch:
# install enough to create a src RPM and parse the build dependencies
- *yum-update
- yum ${YUM_OPTS} install
yum-utils
epel-rpm-macros
rpm-build
yum-utils
script:
- pushd dist
- SRC_RPM="${PKG_NAME}-*.src.rpm"
......
gwdatafind (1.0.4-2) unstable; urgency=low
* rebuild to separate python library and command-line packages
-- Duncan Macleod <duncan.macleod@ligo.org> Fri, 11 Jan 2019 10:14:00 +0000
gwdatafind (1.0.4-1) unstable; urgency=low
* packaging release to include command-line scripts in python2 package
......
......@@ -7,38 +7,37 @@ Priority: optional
Standards-Version: 3.9.1
X-Python-Version: >= 2.7
X-Python3-Version: >= 3.4
Build-Depends: debhelper (>= 9),
dh-python,
python-all,
python3-all,
python-setuptools,
python3-setuptools,
python-six,
python3-six,
python-openssl,
python3-openssl,
python-ligo-segments,
python3-ligo-segments,
help2man,
python-pytest (>= 2.8.0),
python3-pytest (>= 2.8.0),
python-mock
Build-Depends:
debhelper (>= 9),
dh-python,
python-all,
python-ligo-segments,
python-mock,
python-pytest (>= 2.8.0),
python-setuptools,
python3-all,
python3-ligo-segments,
python3-openssl,
python3-setuptools,
python3-six,
help2man,
python3-pytest (>= 2.8.0),
# -- python-gwdatafind --------------------------------------------------------
Package: python-gwdatafind
Architecture: all
Depends: ${misc:Depends},
${python:Depends},
python-six (>= 1.9.0),
python-ligo-segments
Conflicts: glue (<< 1.61.0),
Depends:
${misc:Depends},
${python:Depends},
python-ligo-segments,
python-six (>= 1.9.0),
Description: The client library for the LIGO Data Replicator (LDR) service
The DataFind service allows users to query for the location of
Gravitational-Wave Frame (GWF) files containing data from the
current gravitational-wave detectors.
.
The DataFind service allows users to query for the location of
Gravitational-Wave Frame (GWF) files containing data from the
current gravitational-wave detectors.
.
This package provides the Python 2 library.
# -- python3-gwdatafind -------------------------------------------------------
......@@ -49,8 +48,26 @@ Depends: ${misc:Depends},
python3-six (>= 1.9.0),
python3-ligo-segments
Description: The client library for the LIGO Data Replicator (LDR) service
The DataFind service allows users to query for the location of
Gravitational-Wave Frame (GWF) files containing data from the
current gravitational-wave detectors.
.
The DataFind service allows users to query for the location of
Gravitational-Wave Frame (GWF) files containing data from the
current gravitational-wave detectors.
This package provides the Python 3 library.
# -- gwdatafind ---------------------------------------------------------------
Package: gwdatafind
Architecture: all
Depends:
${misc:Depends},
${python3:Depends},
python3-gwdatafind,
Conflicts:
glue (<< 1.61.0),
python-gwdatafind (<< 1.0.4-3),
Description: The client library for the LIGO Data Replicator (LDR) service
The DataFind service allows users to query for the location of
Gravitational-Wave Frame (GWF) files containing data from the
current gravitational-wave detectors.
.
This package provides the command-line interface `gw_data_find'.
......@@ -2,9 +2,9 @@
export PYBUILD_NAME = gwdatafind
# build man page for gw_data_find for python2
# build man page for gw_data_find for python3
# Automatically generate man pages with help2man
export PYBUILD_AFTER_INSTALL_python2 := \
export PYBUILD_AFTER_INSTALL_python3 := \
echo 'Generating man pages with help2man' && \
mkdir -p {destdir}/usr/share/man/man1 && \
env PYTHONPATH={destdir}{install_dir} \
......@@ -14,9 +14,9 @@ export PYBUILD_AFTER_INSTALL_python2 := \
{destdir}/usr/bin/gw_data_find \
-o {destdir}/usr/share/man/man1/gw_data_find.1
# redirect Python 3 entry points to bogus path
export PYBUILD_INSTALL_ARGS_python3 = --install-scripts=/ignore
export PYBUILD_AFTER_INSTALL_python3 = rm -rf {destdir}/ignore
# redirect Python 2 entry points to bogus path
export PYBUILD_INSTALL_ARGS_python2 = --install-scripts=/ignore
export PYBUILD_AFTER_INSTALL_python2 = rm -rf {destdir}/ignore
%:
dh $@ --with python2,python3 --buildsystem=pybuild
%define name gwdatafind
%define version 1.0.4
%define release 2
%define release 3
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
Summary: The client library for the LIGO Data Replicator (LDR) service
Group: Development/Libraries
License: GPLv3
License: GPL-3.0-or-later
Url: https://gwdatafind.readthedocs.io/
Source0: https://pypi.io/packages/source/g/%{name}/%{name}-%{version}.tar.gz
Packager: Duncan Macleod <duncan.macleod@ligo.org>
......@@ -16,22 +15,35 @@ Packager: Duncan Macleod <duncan.macleod@ligo.org>
BuildArch: noarch
# build dependencies
BuildRequires: rpm-build
BuildRequires: python-rpm-macros
BuildRequires: python-srpm-macros
BuildRequires: python-rpm-macros
BuildRequires: python2-rpm-macros
BuildRequires: python3-rpm-macros
BuildRequires: epel-rpm-macros
# python2-gwdatafind
BuildRequires: python2-setuptools
# python3-gwdatafind
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: help2man
# testing dependencies (python3x only)
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-pyOpenSSL
# gwdatafind (requires all runtime requirements for python3-gwdatafind)
BuildRequires: python%{python3_pkgversion}-ligo-segments
BuildRequires: python%{python3_pkgversion}-pyOpenSSL
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: help2man
# testing dependencies (including runtime deps for python2-gwdatafind)
BuildRequires: man-db
BuildRequires: pyOpenSSL
BuildRequires: python-six
BuildRequires: python2-ligo-segments
BuildRequires: python%{python3_pkgversion}-pytest >= 2.8.0
# -- gwdatafind
Requires: python%{python3_pkgversion}-%{name}
Conflicts: glue < 1.61.0
Conflicts: python2-%{name} < 1.0.4-3
%description
The DataFind service allows users to query for the location of
Gravitational-Wave Frame (GWF) files containing data from the current
......@@ -45,7 +57,6 @@ Summary: Python %{python2_version} library for the LIGO Data Replicator (LDR) s
Requires: python-six
Requires: pyOpenSSL
Requires: python2-ligo-segments
Conflicts: glue < 1.61.0
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-%{name}
The DataFind service allows users to query for the location of
......@@ -76,16 +87,11 @@ Python %{python3_version} interface libraries.
%py2_build
%py3_build
%check
%{__python3} -m pytest --pyargs %{name}
%install
%py3_install
# install py2 last so that /usr/bin/gw_data_find comes from that
%py2_install
# make man page for gw_data_find
%py3_install
mkdir -vp %{buildroot}%{_mandir}/man1
env PYTHONPATH="%{buildroot}%{python2_sitelib}" \
env PYTHONPATH="%{buildroot}%{python3_sitelib}" \
help2man \
--source %{name} \
--version-string %{version} \
......@@ -93,16 +99,32 @@ help2man \
--output %{buildroot}%{_mandir}/man1/gw_data_find.1 \
%{buildroot}%{_bindir}/gw_data_find
%check
mkdir tests
pushd tests
# test python2
env PYTHONPATH="%{buildroot}%{python2_sitelib}" %{__python2} -m gwdatafind --help
# test python3
env PYTHONPATH="%{buildroot}%{python3_sitelib}" %{__python3} -m pytest --pyargs gwdatafind
env PYTHONPATH="%{buildroot}%{python3_sitelib}" %{__python3} -m gwdatafind --help
env PYTHONPATH="%{buildroot}%{python3_sitelib}" PATH="%{buildroot}%{_bindir}:${PATH}" gw_data_find --help
# test man pages
env MANPATH="%{buildroot}%{_mandir}" man -P cat gw_data_find
%clean
rm -rf $RPM_BUILD_ROOT
%files -n python2-%{name}
%files
%license LICENSE
%doc README.md
%{_bindir}/gw_data_find
%{python2_sitelib}/*
%{_mandir}/man1/gw_data_find.1*
%files -n python2-%{name}
%license LICENSE
%doc README.md
%{python2_sitelib}/*
%files -n python%{python3_pkgversion}-%{name}
%license LICENSE
%doc README.md
......@@ -110,6 +132,10 @@ rm -rf $RPM_BUILD_ROOT
# -- changelog
%changelog
* Wed Jun 17 2020 Duncan Macleod <duncan.macleod@ligo.org> 1.0.4-3
- separate bindir into separate package
%changelog
* Fri Jul 12 2019 Duncan Macleod <duncan.macleod@ligo.org> 1.0.4-2
- fixed incorrect installation of /usr/bin/gw_data_find
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment