diff --git a/rhel7-sausage-api.spec b/rhel7-sausage-api.spec index 1dd0f0e..bb8331e 100644 --- a/rhel7-sausage-api.spec +++ b/rhel7-sausage-api.spec @@ -1,70 +1,70 @@ %define name sausage-api -%define version 0.1.0 -%define unmangled_version 0.1.0 -%define unmangled_version 0.1.0 +%define version 0.1.1 +%define unmangled_version 0.1.1 +%define unmangled_version 0.1.1 %define release 1 Summary: SLURM account usage API Name: %{name} Version: %{version} Release: %{release} Source0: %{name}-%{unmangled_version}.tar.gz License: GPLv3 Group: Application/System BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE Url: https://c4science.ch/source/sausage-api/ BuildRequires: python3-setuptools, python36-falcon3, python36-gunicorn, python36-elasticsearch6 Requires: python36-falcon3, python36-gunicorn, python36-elasticsearch6 %description SLURM account usage Falcon API service This project implements a Falcon API service to display CPU / GPU consumption per account in a Slurm cluster. The service queries the elastic instance created by the jobcomp/elasticsearch plugin provided by SchedMD. %prep %setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version} %build python3 setup.py build %install python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES /usr/bin/mkdir -p %{buildroot}/etc/systemd/system/ /usr/bin/mkdir -p %{buildroot}/etc/sausage/ install -m 755 sausage_api.service %{buildroot}/etc/systemd/system/ install -m 644 sausage-api.cfg %{buildroot}/etc/sausage/ install -m 644 sausage-api.json %{buildroot}/etc/sausage/ %clean rm -rf $RPM_BUILD_ROOT %files -f INSTALLED_FILES %defattr(-,root,root) /etc/systemd/system/sausage_api.service /etc/sausage/sausage-api.cfg /etc/sausage/sausage-api.json %pre getent group sausage >/dev/null || groupadd -r sausage getent passwd sausage >/dev/null || useradd -r -g sausage -d /var/spool/sausage -s /sbin/nologin sausage %post %if 0%{?rhel} < 8 /bin/systemctl --system daemon-reload &> /dev/null /bin/systemctl --system enable sausage_api &> /dev/null %endif %postun %if 0%{?rhel} < 8 /bin/systemctl --system daemon-reload &> /dev/nul %endif diff --git a/setup.py b/setup.py index c3aaace..e2864b7 100644 --- a/setup.py +++ b/setup.py @@ -1,36 +1,36 @@ #!/usr/bin/env python from setuptools import setup, find_packages desc = '' with open('README.rst') as f: desc = f.read() setup( name='sausage-api', scripts=['sausage-api'], - version='0.1.0', + version='0.1.1', description=('SLURM account usage API'), long_description=desc, url='', author='Antonio J. Russo', author_email='antonio.russo@epfl.ch', license='GPL v3', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Natural Language :: English', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Topic :: System :: Logging' ], keywords=['hpc', 'supercomputers', 'consumption', 'billing', 'slurm'], packages=find_packages(exclude=['docs', 'test*']), install_requires=[ 'falcon>=3.0.0', 'gunicorn>=20.1.0', 'elasticsearch>=7.12.1' ], )