diff options
author | Richard Purdie <richard@openedhand.com> | 2005-08-31 10:47:56 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2005-08-31 10:47:56 +0000 |
commit | f54da734eb7b69e8e34de505bd89a13479e230e0 (patch) | |
tree | f796bea6f5683dfe3d591ca5390d12fd78e59c96 /bitbake/setup.py | |
parent | 4b46c1f6e891b1ddd5968536440b888661fade3e (diff) | |
download | poky-f54da734eb7b69e8e34de505bd89a13479e230e0.tar.gz |
Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@2 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/setup.py')
-rwxr-xr-x | bitbake/setup.py | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/bitbake/setup.py b/bitbake/setup.py new file mode 100755 index 0000000000..a94c967d99 --- /dev/null +++ b/bitbake/setup.py | |||
@@ -0,0 +1,69 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # ex:ts=4:sw=4:sts=4:et | ||
3 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
4 | # | ||
5 | # Copyright (C) 2003 Chris Larson | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify it under | ||
8 | # the terms of the GNU General Public License as published by the Free Software | ||
9 | # Foundation; either version 2 of the License, or (at your option) any later | ||
10 | # version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, but WITHOUT | ||
13 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
14 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
15 | # | ||
16 | # You should have received a copy of the GNU General Public License along with | ||
17 | # this program; if not, write to the Free Software Foundation, Inc., 59 Temple | ||
18 | # Place, Suite 330, Boston, MA 02111-1307 USA. | ||
19 | |||
20 | from distutils.core import setup | ||
21 | import os, sys | ||
22 | |||
23 | # bbdir = os.path.join(sys.prefix, 'share', 'bitbake') | ||
24 | # docdir = os.path.join(sys.prefix, 'share', 'doc') | ||
25 | bbdir = os.path.join('bitbake') | ||
26 | docdir = os.path.join('doc') | ||
27 | |||
28 | def clean_doc(type): | ||
29 | origpath = os.path.abspath(os.curdir) | ||
30 | os.chdir(os.path.join(origpath, 'doc', 'manual')) | ||
31 | make = os.environ.get('MAKE') or 'make' | ||
32 | os.system('%s clean-%s' % (make, type)) | ||
33 | |||
34 | def generate_doc(type): | ||
35 | origpath = os.path.abspath(os.curdir) | ||
36 | os.chdir(os.path.join(origpath, 'doc', 'manual')) | ||
37 | make = os.environ.get('MAKE') or 'make' | ||
38 | ret = os.system('%s %s' % (make, type)) | ||
39 | if ret != 0: | ||
40 | print "ERROR: Unable to generate html documentation." | ||
41 | sys.exit(ret) | ||
42 | os.chdir(origpath) | ||
43 | |||
44 | if 'bdist' in sys.argv[1:]: | ||
45 | generate_doc('html') | ||
46 | |||
47 | sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'lib')) | ||
48 | import bb | ||
49 | import glob | ||
50 | setup(name='bitbake', | ||
51 | version=bb.__version__, | ||
52 | license='GPL', | ||
53 | url='http://developer.berlios.de/projects/bitbake/', | ||
54 | description='BitBake build tool', | ||
55 | long_description='BitBake is a simple tool for the execution of tasks. It is derived from Portage, which is the package management system used by the Gentoo Linux distribution. It is most commonly used to build packages, as it can easily use its rudamentary inheritence to abstract common operations, such as fetching sources, unpacking them, patching them, compiling them, and so on. It is the basis of the OpenEmbedded project, which is being used for OpenZaurus, Familiar, and a number of other Linux distributions.', | ||
56 | author='Chris Larson', | ||
57 | author_email='clarson@elinux.org', | ||
58 | packages=['bb', 'bb.parse', 'bb.parse.parse_py'], | ||
59 | package_dir={'bb': os.path.join('lib', 'bb')}, | ||
60 | scripts=[os.path.join('bin', 'bitbake'), | ||
61 | os.path.join('bin', 'bbimage')], | ||
62 | data_files=[(os.path.join(bbdir, 'conf'), [os.path.join('conf', 'bitbake.conf')]), | ||
63 | (os.path.join(bbdir, 'classes'), [os.path.join('classes', 'base.bbclass')]), | ||
64 | (os.path.join(docdir, 'bitbake-%s' % bb.__version__, 'html'), glob.glob(os.path.join('doc', 'manual', 'html', '*.html'))), | ||
65 | (os.path.join(docdir, 'bitbake-%s' % bb.__version__, 'pdf'), glob.glob(os.path.join('doc', 'manual', 'pdf', '*.pdf'))),], | ||
66 | ) | ||
67 | |||
68 | if 'bdist' in sys.argv[1:]: | ||
69 | clean_doc('html') | ||