care for floats being passed as a result of erratic / instead of // when migrating...
[plnode-utils.git] / plnode-utils-vs.spec
1 %define name plnode-utils
2 %define version 0.2
3 %define taglevel 2
4
5 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
6
7 %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
8
9 Summary: Python utilities for a PlanetLab node
10 Name: %{name}
11 Version: %{version}
12 Release: %{release}
13 License: PlanetLab
14 Group: System Environment/Libraries
15 Source0: %{name}-%{version}.tar.gz
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
17
18 Vendor: PlanetLab
19 Packager: PlanetLab Central <support@planet-lab.org>
20 Distribution: PlanetLab %{plrelease}
21 URL: %{SCMURL}
22
23 Provides: bwlimit
24
25 %description
26 This python3 package provides utilities like bwlimit, used in various places on a PlanetLab node, nodemanager and mom among others. It aims at cleaning up the packaging scheme, as bwlimit used to ship with util-vserver-pl, but is relevant in the lxc variant as well.
27
28 %prep
29 %setup -q
30
31 %build
32 # xxx fixme
33 # this is where we chose which flavour of bwlimit gets shipped
34 cp plnode/bwlimit_vs.py plnode/bwlimit.py
35 # for backwards compatibilty until legacy packages import from plnode
36 cp plnode/bwlimit_vs.py bwlimit.py
37 python3 setup.py build
38
39 %install
40 python3 setup.py install --skip-build --root "$RPM_BUILD_ROOT"
41
42 %clean
43 rm -rf $RPM_BUILD_ROOT
44
45 # moved from util-vserver-pl package
46 %post
47 /usr/bin/bwlimit init
48
49 %files
50 %{python3_sitelib}/*
51 %{_bindir}/*
52
53 %changelog
54 * Mon Feb 11 2013 Stephen Soltesz <soltesz@opentechinstitute.org> - plnode-utils-0.2-2
55 - import bwlimit from plnode dir, and keep legacy support.