From: Ed Bartosh Date: Wed, 31 Oct 2012 14:19:50 +0000 (+0200) Subject: Repackaged pythonic way X-Git-Tag: v1.0~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b65f83d36d25f5377ec5823ee3a2e1d66635be0;p=tools%2Fbmap-tools.git Repackaged pythonic way As this package has been splitted to script and API it makes sense to utilize proper Python packaging( so called Python Egg) using setuptools functionality. This change does exactly that. All building and installation is done using setup.py. Debian and RPM packaging has been updated accordingly. Artem: tweak package description and my e-mail address. Change-Id: I46a6ad4e9c5b869190e4a001dc6fa274cae2ca7e Signed-off-by: Ed Bartosh Signed-off-by: Artem Bityutskiy --- diff --git a/debian/control b/debian/control index 166cb01..f3f3026 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: bmap-tools Maintainer: Ed Bartosh Section: python Priority: optional -Build-Depends: debhelper (>= 7) +Build-Depends: debhelper (>= 7), python-all, python-distribute Standards-Version: 3.8.4 XS-Python-Version: current @@ -11,4 +11,4 @@ Architecture: all Depends: ${misc:Depends}, ${python:Depends} XB-Python-Version: ${python:Versions} Description: Bmap tools - Bmap-flasher - Flash an image file to a block device using the block map (bmap) + Bmap-flasher - Flash an image file to a block device using the block map (bmap) diff --git a/packaging/bmap-tools.dsc b/packaging/bmap-tools.dsc index a2f63b8..2cafdf3 100644 --- a/packaging/bmap-tools.dsc +++ b/packaging/bmap-tools.dsc @@ -5,6 +5,6 @@ Architecture: all Version: 0.1.0 Maintainer: Ed Bartosh Standards-Version: 3.8.4 -Build-Depends: debhelper (>= 7.0) -Files: - 1c730ad6a7474a9aef288e1beea38ab9 5865 bmap-tools_0.1.0.tar.gz +Build-Depends: debhelper (>= 7), python-all, python-distribute +Files: + 002b1492e8ebee0d01d58620a91c87cc 8145 bmap-tools_0.1.0.tar.gz diff --git a/packaging/bmap-tools.spec b/packaging/bmap-tools.spec index 2027a5a..4b79aca 100644 --- a/packaging/bmap-tools.spec +++ b/packaging/bmap-tools.spec @@ -8,7 +8,7 @@ BuildArch: noarch URL: http://otctools.jf.intel.com Source0: %{name}_%{version}.tar.gz -Requires: python-distribute +BuildRequires: python-distribute %description Bmap-flasher - Flash an image file to a block device using the block map (bmap). @@ -21,11 +21,13 @@ Bmap-flasher - Flash an image file to a block device using the block map (bmap). %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/%{_bindir} -install -m 755 bmap-flasher $RPM_BUILD_ROOT/%{_bindir} +python setup.py install --prefix=%{_prefix} --root=%{buildroot} %files %defattr(-,root,root,-) +%dir /usr/lib/python*/site-packages/bmaptools +/usr/lib/python*/site-packages/bmap_tools* +/usr/lib/python*/site-packages/bmaptools/* %{_bindir}/* %changelog diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..b698fef --- /dev/null +++ b/setup.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +from setuptools import setup, find_packages + +setup( + name = "bmap-tools", + description = "Bmap tools", + author = "Artem Bityutskiy", + author_email = "artem.bityutskiy@linux.intel.com", + version = "0.1.0", + scripts = ['bmap-flasher'], + packages = find_packages(), + license='GPLv2', + long_description="Tools to generate block map (AKA bmap) and flash " \ + "images using bmap", +)