M7350/oe-core/bitbake/setup.py

74 lines
3.2 KiB
Python
Raw Normal View History

2024-09-09 08:52:07 +00:00
#!/usr/bin/env python
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (C) 2003 Chris Larson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), "lib"))
from bb import __version__
from glob import glob
from distutils.command.clean import clean
from distutils.command.build import build
from distutils.core import setup
doctype = "html"
class Clean(clean):
def run(self):
clean.run(self)
origpath = os.path.abspath(os.curdir)
2024-09-09 08:57:42 +00:00
os.chdir(os.path.join(origpath, 'doc'))
2024-09-09 08:52:07 +00:00
make = os.environ.get('MAKE') or 'make'
2024-09-09 08:57:42 +00:00
os.system('%s clean-%s DOC=bitbake-user-manual' % (make, doctype))
2024-09-09 08:52:07 +00:00
class Build(build):
def run(self):
build.run(self)
origpath = os.path.abspath(os.curdir)
2024-09-09 08:57:42 +00:00
os.chdir(os.path.join(origpath, 'doc'))
2024-09-09 08:52:07 +00:00
make = os.environ.get('MAKE') or 'make'
2024-09-09 08:57:42 +00:00
ret = os.system('%s %s DOC=bitbake-user-manual' % (make, doctype))
2024-09-09 08:52:07 +00:00
if ret != 0:
print("ERROR: Unable to generate html documentation.")
sys.exit(ret)
os.chdir(origpath)
setup(name='bitbake',
version = __version__,
requires = ["ply", "progressbar"],
package_dir = {"": "lib"},
2024-09-09 08:57:42 +00:00
packages = ["bb.server", "bb.parse.parse_py", "bb.parse",
"bb.fetch2", "bb.ui.crumbs", "bb.ui", "bb.pysh", "bb", "prserv", "bb.tests"],
2024-09-09 08:52:07 +00:00
py_modules = ["codegen"],
2024-09-09 08:57:42 +00:00
scripts = ["bin/bitbake", "bin/bitbake-layers", "bin/bitbake-diffsigs", "bin/bitbake-prserv", "bin/bitbake-selftest", "bin/image-writer"],
2024-09-09 08:52:07 +00:00
data_files = [("share/bitbake", glob("conf/*") + glob("classes/*")),
2024-09-09 08:57:42 +00:00
("share/doc/bitbake-%s/bitbake-user-manual" % __version__, glob("doc/bitbake-user-manual/html/*"))],
2024-09-09 08:52:07 +00:00
cmdclass = {
"build": Build,
"clean": Clean,
},
license = 'GPLv2',
2024-09-09 08:57:42 +00:00
url = 'http://www.openembedded.org/wiki/BitBake',
2024-09-09 08:52:07 +00:00
description = 'BitBake build tool',
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 rudimentary inheritance 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.',
author = 'BitBake Development Team',
author_email = 'bitbake-dev@lists.berlios.de',
)