diff --git a/.circleci/config.yml b/.circleci/config.yml index 07b1ceb5c..e8b0a91d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -232,6 +232,13 @@ jobs: environment: PIP_FLAGS: " " + el7:3.6: + <<: *centos-build + docker: + - image: igwn/base:el7 + environment: + PIP_FLAGS: " " + # -- deploy --------------- deploy: @@ -309,6 +316,9 @@ workflows: filters: tags: only: /^v.*/ + - el7:3.6: + requires: + - sdist # deploy - deploy: diff --git a/ci/install-el.sh b/ci/install-el.sh index c4ac02276..8904eb766 100644 --- a/ci/install-el.sh +++ b/ci/install-el.sh @@ -22,12 +22,24 @@ # -- setup -------------------------------------- +# install basic build dependencies +yum -y -q update + +yum -y -q install \ + rpm-build \ + yum-utils \ + epel-rpm-macros + +# correct issue with missing tzdata files +# https://listserv.fnal.gov/scripts/wa.exe?A2=ind1910&L=SCIENTIFIC-LINUX-USERS&P=21164 +yum -y -q reinstall tzdata + # determine python prefix, even though we only install for python2 if [[ "${PYTHON_VERSION}" == "2.7" ]]; then PY_PREFIX="python2" else - PY_PREFIX="python${PYTHON_VERSION/./}" + PY_PREFIX="python$(rpm --eval "%python3_pkgversion")" fi # -- build -------------------------------------- @@ -38,17 +50,6 @@ TARBALL="$(pwd)/gwpy-*.tar.*" mkdir build pushd build -yum -y -q update - -# correct issue with missing tzdata files -# https://listserv.fnal.gov/scripts/wa.exe?A2=ind1910&L=SCIENTIFIC-LINUX-USERS&P=21164 -yum -y -q reinstall tzdata - -# install basic build dependencies -yum -y -q install \ - rpm-build \ - yum-utils - # build src rpm SRPM=$(rpmbuild --define "_topdir ${TOPDIR}" -ts ${TARBALL} | cut -d\ -f2) @@ -66,38 +67,28 @@ RPM="${TOPDIR}/RPMS/noarch/${PY_PREFIX}-gwpy-*.rpm" yum -y -q --nogpgcheck localinstall ${RPM} # -- extras ------------------------------------- -# -# This is explicitly only set up for python2.7 on RHEL7 -# # install system-level extras yum -y -q install \ which \ - python2-pip \ - python2-pytest \ - python2-pytest-cov \ - python2-mock \ - python2-freezegun \ - python-sqlparse \ - python-beautifulsoup4 \ - python-sqlalchemy \ - python2-PyMySQL \ - m2crypto \ - glue \ - dqsegdb \ - python-psycopg2 \ - python-pandas \ - python2-root \ - python2-nds2-client \ - python2-ldas-tools-framecpp \ - python2-lalframe \ - python2-lalsimulation \ - python-ligo-lw \ + ${PY_PREFIX}-beautifulsoup4 \ + ${PY_PREFIX}-dqsegdb \ + ${PY_PREFIX}-freezegun \ + ${PY_PREFIX}-glue \ + ${PY_PREFIX}-lalframe \ + ${PY_PREFIX}-lalsimulation \ + ${PY_PREFIX}-ligo-lw \ + ${PY_PREFIX}-m2crypto \ + ${PY_PREFIX}-nds2-client \ + ${PY_PREFIX}-pandas \ + ${PY_PREFIX}-pip \ + ${PY_PREFIX}-psycopg2 \ + ${PY_PREFIX}-PyMySQL \ + ${PY_PREFIX}-pytest \ + ${PY_PREFIX}-pytest-cov \ + ${PY_PREFIX}-root \ + ${PY_PREFIX}-sqlparse \ + ${PY_PREFIX}-sqlalchemy \ texlive-dvipng-bin texlive-latex-bin-bin \ - texlive-type1cm texlive-collection-fontsrecommended - -# HACK: fix missing file from ldas-tools-framecpp -if [ -d /usr/lib64/${PYTHON}/site-packages/LDAStools -a \ - ! -f /usr/lib64/${PYTHON}/site-packages/LDAStools/__init__.py ]; then - touch /usr/lib64/${PYTHON}/site-packages/LDAStools/__init__.py -fi + texlive-type1cm texlive-collection-fontsrecommended \ +; diff --git a/etc/spec.template b/etc/spec.template index daedb63ba..5c690e5c0 100644 --- a/etc/spec.template +++ b/etc/spec.template @@ -11,13 +11,18 @@ Summary: {{ description }} License: {{ license }} URL: {{ url }} -Source0: https://files.pythonhosted.org/packages/source/g/%{srcname}/%{srcname}-%{version}.tar.gz +Source0: %pypi_source BuildArch: noarch BuildRequires: rpm-build BuildRequires: python-rpm-macros +BuildRequires: python-srpm-macros BuildRequires: python2-rpm-macros +BuildRequires: python3-rpm-macros +BuildRequires: epel-rpm-macros + BuildRequires: python2-setuptools +BuildRequires: python%{python3_pkgversion}-setuptools %description {{ long_description }} @@ -43,12 +48,34 @@ Requires: python2-tqdm >= 4.10.0 Requires: python2-gwosc Requires: python2-dqsegdb2 Requires: python2-gwdatafind - %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} {{ long_description }} +# -- python3-gwpy ------------------------------------------------------------- + +%package -n python%{python3_pkgversion}-%{srcname} +Summary: %{summary} +Requires: python%{python3_pkgversion}-astropy >= 1.1.1 +Requires: python%{python3_pkgversion}-dateutil +Requires: python%{python3_pkgversion}-dqsegdb2 +Requires: python%{python3_pkgversion}-gwdatafind +Requires: python%{python3_pkgversion}-gwosc +Requires: python%{python3_pkgversion}-h5py >= 1.3 +Requires: python%{python3_pkgversion}-lal >= 6.14.0 +Requires: python%{python3_pkgversion}-ldas-tools-framecpp >= 2.6.0 +Requires: python%{python3_pkgversion}-ligo-segments >= 1.0.0 +Requires: python%{python3_pkgversion}-matplotlib >= 1.2.0 +Requires: python%{python3_pkgversion}-numpy >= 1.7.1 +Requires: python%{python3_pkgversion}-scipy >= 0.12.1 +Requires: python%{python3_pkgversion}-six >= 1.5 +Requires: python%{python3_pkgversion}-tqdm >= 4.10.0 +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} + +%description -n python%{python3_pkgversion}-%{srcname} +{{ long_description }} + # -- build stages ------------------------------------------------------------- %prep @@ -56,8 +83,10 @@ Requires: python2-gwdatafind %build %py2_build +%py3_build %install +%py3_install %py2_install # -- files -------------------------------------------------------------------- @@ -68,6 +97,11 @@ Requires: python2-gwdatafind %{python2_sitelib}/* %{_bindir}/gwpy-plot +%files -n python%{python3_pkgversion}-%{srcname} +%license LICENSE +%doc README.md +%{python3_sitelib}/* + # -- changelog ---------------------------------------------------------------- %changelog