Commit 60c8c0ff authored by Patrick Godwin's avatar Patrick Godwin
Browse files

remove python 2 support

parent fbeaf743
......@@ -4,9 +4,6 @@ stages:
- test
- deploy
variables:
YUM_OPTS: "-y -q --setopt=cachedir=${CI_PROJECT_DIR}/.cache/yum --setopt=keepcache=1 --disablerepo=htcondor"
# -- dist -------------------
dist:tarball:
......@@ -39,19 +36,14 @@ build:el7:
dependencies:
- dist:tarball
before_script:
- yum update ${YUM_OPTS}
- yum install ${YUM_OPTS}
- yum update -y
- yum install -y
rpm-build
epel-rpm-macros
python-rpm-macros
python3-rpm-macros
python-setuptools
python36-setuptools
python2-six
python36-six
python2-urllib3
python36-urllib3
python-yaml
python3-PyYAML
script:
- mkdir -pv dist/el7
......@@ -71,27 +63,18 @@ build:el7:
dependencies:
- dist:tarball
before_script:
- apt-get update -yqq
- apt-get install -yq
- apt-get update -y
- apt-get install -y
dpkg-dev
debhelper
dh-python
python-all-dev
python3-all-dev
python-setuptools
python3-setuptools
python-six
python3-six
python-bottle
python3-bottle
python-numpy
python3-numpy
python-yaml
python3-yaml
python-h5py
python3-h5py
python-ligo-common
python-urllib3
python3-urllib3
help2man
script:
......@@ -107,9 +90,9 @@ build:el7:
paths:
- dist/debian
build:debian:stretch:
build:debian:buster:
<<: *build_debian
image: igwn/software:stretch
image: igwn/software:buster
# -- test -------------------
......@@ -120,44 +103,11 @@ build:debian:stretch:
- dist:tarball
variables:
PYTHON: python2
before_script:
- ${PYTHON} -m pip install -r requirements.txt
- ${PYTHON} -m pip install dist/ligo-scald*.tar.gz
- ${PYTHON} -m pip install
"pytest==3.0.*"
"pytest-cov"
"kafka-python"
script:
- export SCALDRC_PATH=etc/example_config.yml
- ${PYTHON} -m pytest -v --doctest-modules --cov=ligo/scald --ignore build/ --ignore dist/ --ignore doc/ --ignore setup.py
test:el7-python2:
<<: *test
image: igwn/software:el7
dependencies:
- build:el7
before_script:
- yum ${YUM_OPTS} remove python2-apipkg python36-apipkg
- yum ${YUM_OPTS} install
python-pytest
python2-pytest-cov
- yum ${YUM_OPTS} --nogpgcheck localinstall dist/el7/python2-ligo-scald-*.rpm
- yum ${YUM_OPTS} --nogpgcheck localinstall dist/el7/ligo-scald-*.rpm
- yum ${YUM_OPTS} install python2-confluent-kafka
after_script:
- scald --help
- scald serve --help
- scald deploy --help
- scald mock --help
- scald aggregate --help
- scald report --help
cache:
key: "${CI_JOB_NAME}"
paths:
- .cache/yum
allow_failure: true
- ${PYTHON} -m pytest -v --cov=ligo.scald
test:el7-python3:
test:el7:
<<: *test
image: igwn/software:el7
dependencies:
......@@ -165,58 +115,27 @@ test:el7-python3:
variables:
PYTHON: python3
before_script:
- yum ${YUM_OPTS} remove python2-apipkg python36-apipkg
- yum ${YUM_OPTS} install
- yum -y remove python2-apipkg python36-apipkg
- yum -y install
python36-pytest
python36-pytest-cov
- yum ${YUM_OPTS} --nogpgcheck localinstall dist/el7/python36-ligo-scald-*.rpm
- yum ${YUM_OPTS} install python36-confluent-kafka
- yum -y install python36-confluent-kafka
- yum -y --nogpgcheck localinstall dist/el7/python36-ligo-scald-*.rpm
cache:
key: "${CI_JOB_NAME}"
paths:
- .cache/yum
test:debian-python2:stretch:
<<: *test
image: igwn/software:stretch
dependencies:
- build:debian:stretch
before_script:
- apt-get update -yqq
- apt-get install -yq
python-pytest
python-pytest-cov
python-six
python-bottle
python-numpy
python-yaml
python-h5py
python-ligo-common
python-urllib3
- dpkg -i dist/python-ligo-scald_*_all.deb
- pip install kafka-python confluent-kafka==0.11.5
after_script:
- scald --help
- scald serve --help
- scald deploy --help
- scald mock --help
- scald aggregate --help
- scald report --help
cache:
key: "${CI_JOB_NAME}"
paths:
- .cache/apt
test:debian-python3:stretch:
test:debian:buster:
<<: *test
image: igwn/software:stretch
image: igwn/software:buster
dependencies:
- build:debian:stretch
- build:debian:buster
variables:
PYTHON: python3
before_script:
- apt-get update -yqq
- apt-get install -yq
- apt-get update -y
- apt-get install -y
python3-pytest
python3-pytest-cov
python3-six
......@@ -226,8 +145,8 @@ test:debian-python3:stretch:
python3-h5py
python3-ligo-common
python3-urllib3
python3-confluent-kafka
- dpkg -i dist/python3-ligo-scald_*_all.deb
- pip3 install kafka-python confluent-kafka==0.11.5
cache:
key: "${CI_JOB_NAME}"
paths:
......@@ -243,7 +162,7 @@ docs:
before_script:
- ${PYTHON} -m pip install -U setuptools pip
- ${PYTHON} -m pip install dist/ligo-scald*.tar.gz
- yum ${YUM_OPTS} install graphviz
- yum -y install graphviz
- ${PYTHON} -m pip install sphinx==1.7.9 sphinxcontrib-programoutput sphinx_rtd_theme
script:
- ${PYTHON} -m sphinx -b html doc site -E
......
......@@ -2,21 +2,9 @@ Source: ligo-scald
Maintainer: Patrick Godwin <patrick.godwin@ligo.org>
Section: python
Priority: optional
Build-Depends: debhelper (>= 9), dh-python, python-all-dev, python3-all-dev, python-setuptools, python3-setuptools, python-six, python3-six,
help2man
Build-Depends: debhelper (>= 9), dh-python, python3-all-dev, python3-setuptools, python3-six, help2man
Standards-Version: 3.8.4
X-Python-Version: >=2.7
X-Python3-Version: >=3.4
Package: python-ligo-scald
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python-bottle, python-dateutil, python-numpy, python-yaml, python-h5py, python-ligo-common, python-urllib3
Provides: ${python:Provides}
Description: SCalable Analytics for Ligo/virgo/kagra Data
ligo-scald is a gravitational-wave monitoring and dynamic data visualization
tool.
.
This package provides Python support.
X-Python3-Version: >=3.6
Package: python3-ligo-scald
Architecture: all
......
%define name ligo-scald
%define version 0.7.2
%define unmangled_version 0.7.2
%define release 1
%define release 2
Summary: SCalable Analytics for Ligo/virgo/kagra Data
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
Source0: http://software.ligo.org/lscsoft/source/%{name}-%{unmangled_version}.tar.gz
Source0: http://software.igwn.org/lscsoft/source/%{name}-%{unmangled_version}.tar.gz
License: GPLv2+
Group: Development/Libraries
Prefix: %{_prefix}
......@@ -42,26 +42,6 @@ Requires: python%{python3_pkgversion}-ligo-scald
ligo-scald is a gravitational-wave monitoring and dynamic data visualization
tool. This package provides the `scald` command-line interface.
# -- python2-ligo-scald
%package -n python2-%{name}
Summary: %{summary}
Requires: python-dateutil
Requires: python-future
Requires: python-six
Requires: python-urllib3
Requires: python2-bottle
Requires: python2-h5py
Requires: python2-ligo-common
Requires: python2-numpy
Requires: python2-pyyaml
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-%{name}
ligo-scald is a gravitational-wave monitoring and dynamic data visualization
tool. This package provides the Python %{python2_version} library.
# -- python3-ligo-scald
%package -n python%{python3_pkgversion}-%{name}
......@@ -87,12 +67,9 @@ tool. This package provides the Python %{python3_version} library.
%setup -n %{name}-%{unmangled_version}
%build
%py2_build
%py3_build
%install
# install python2 first to have {prefix}/bin/ populated by python3
%py2_install
%py3_install
%clean
......@@ -102,10 +79,6 @@ rm -rf $RPM_BUILD_ROOT
%license LICENSE
%{_bindir}/scald
%files -n python2-%{name}
%license LICENSE
%{python2_sitelib}/*
%files -n python%{python3_pkgversion}-%{name}
%license LICENSE
%{python3_sitelib}/*
......@@ -4,7 +4,6 @@ from setuptools import setup
install_requires = [
'bottle >= 0.12',
'h5py >= 2.3',
'ligo-common >= 1.0',
'numpy >= 1.7',
'PyYAML >= 3.10',
'urllib3 >= 1.10',
......@@ -34,6 +33,7 @@ setup(
],
},
python_requires = '>=3.6.*',
install_requires = install_requires,
zip_safe = False,
......
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