<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15135</bug_id>
          
          <creation_ts>2023-06-06 15:28:47 +0000</creation_ts>
          <short_desc>Can bitbake provide a setup.py or pyproject.toml to package it like gentoo portage</short_desc>
          <delta_ts>2023-06-08 14:56:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.0.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="wuzhenyu@ustc.edu">wuzhenyu</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95635</commentid>
    <comment_count>0</comment_count>
    <who name="wuzhenyu@ustc.edu">wuzhenyu</who>
    <bug_when>2023-06-06 15:28:47 +0000</bug_when>
    <thetext>For example,
&lt;https://github.com/gentoo/portage/blob/master/setup.py&gt; make portage can be packaged and uploaded to [PYPI](https://pypi.org/project/portage/#files), and it make it more easy to be pacakged by other linux distribution like [Arch Linux](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=portage). So Why not bitbake do it? The uploading to PYPI can be done easily by CI/CD.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95636</commentid>
    <comment_count>1</comment_count>
    <who name="wuzhenyu@ustc.edu">wuzhenyu</who>
    <bug_when>2023-06-06 16:39:25 +0000</bug_when>
    <thetext>```diff
From d8edeb24a63d467e8084a3b464bccd3271e1f9a5 Mon Sep 17 00:00:00 2001
From: Wu Zhenyu &lt;wuzhenyu@ustc.edu&gt;
Date: Wed, 7 Jun 2023 00:21:01 +0800
Subject: [PATCH] support package

use `python -m build` to build package
set PYPI_API_TOKEN to upload it to PYPI
---
 .github/workflows/python.yml |  44 ++++++++++++
 .gitignore                   | 128 ++++++++++++++++++++++++++++++++++-
 lib/bb/server/process.py     |   5 +-
 pyproject.toml               | 108 +++++++++++++++++++++++++++++
 4 files changed, 282 insertions(+), 3 deletions(-)
 create mode 100644 .github/workflows/python.yml
 create mode 100644 pyproject.toml

diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
new file mode 100644
index 0000000..ab3f7ba
--- /dev/null
+++ b/.github/workflows/python.yml
@@ -0,0 +1,44 @@
+---
+&quot;on&quot;:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+# https://github.com/softprops/action-gh-release/issues/236
+permissions:
+  contents: write
+
+env:
+  PYTHONUTF8: &quot;1&quot;
+  python-version: 3.x
+  cache: pip
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v4
+        with:
+          python-version: ${{env.python-version}}
+          cache: ${{env.cache}}
+      - name: Install dependencies
+        run: |
+          pip install build
+      - name: Build
+        run: |
+          python -m build
+      - uses: pypa/gh-action-pypi-publish@release/v1
+        if: startsWith(github.ref, &apos;refs/tags/&apos;)
+        with:
+          password: ${{secrets.PYPI_API_TOKEN}}
+      - uses: actions/upload-artifact@v3
+        if: &quot;! startsWith(github.ref, &apos;refs/tags/&apos;)&quot;
+        with:
+          path: |
+            dist/*
+      - uses: softprops/action-gh-release@v1
+        if: startsWith(github.ref, &apos;refs/tags/&apos;)
+        with:
+          files: |
+            dist/*
diff --git a/.gitignore b/.gitignore
index fbf9eb2..c646b0f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,3 @@
-*.pyc
-*.pyo
 *~
 pyshtables.py
 /doc/manual/html/
@@ -16,3 +14,129 @@ lib/toaster/contrib/tts/backlog.txt
 lib/toaster/contrib/tts/log/*
 lib/toaster/contrib/tts/.cache/*
 lib/bb/tests/runqueue-tests/bitbake-cookerdaemon.log
+
+# Python.gitignore:
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+#   However, in case of collaboration, if having platform-specific dependencies or dependencies
+#   having no cross-platform support, pipenv may install dependencies that don&apos;t work, or not
+#   install all needed dependencies.
+#Pipfile.lock
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 7616ef5..e5d1cbd 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -32,6 +32,7 @@ import stat
 import bb.server.xmlrpcserver
 from bb import daemonize
 from multiprocessing import queues
+from shutil import which
 
 logger = logging.getLogger(&apos;BitBake&apos;)
 
@@ -619,7 +620,9 @@ class BitBakeServer(object):
         os.close(self.readypipe)
         os.set_inheritable(self.bitbake_lock.fileno(), True)
         os.set_inheritable(self.readypipein, True)
-        serverscript = os.path.realpath(os.path.dirname(__file__) + &quot;/../../../bin/bitbake-server&quot;)
+        serverscript = which(&quot;bitbake-server&quot;)
+        if serverscript is None:
+            serverscript = os.path.realpath(os.path.dirname(__file__) + &quot;/../../../bin/bitbake-server&quot;)
         os.execl(sys.executable, &quot;bitbake-server&quot;, serverscript, &quot;decafbad&quot;, str(self.bitbake_lock.fileno()), str(self.readypipein), self.logfile, self.bitbake_lock.name, self.sockname,  str(self.server_timeout or 0), str(int(self.profile)), str(self.xmlrpcinterface[0]), str(self.xmlrpcinterface[1]))
 
 def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpcinterface, profile):
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..f189284
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,108 @@
+[build-system]
+requires = [&quot;setuptools_scm[toml] &gt;= 6.2&quot;]
+build-backend = &quot;setuptools.build_meta&quot;
+
+# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
+[project]
+name = &quot;bitbake&quot;
+description = &quot;&quot;
+readme = &quot;README.md&quot;
+requires-python = &quot;&gt;= 3.7&quot;
+keywords = [&quot;yocto&quot;]
+version = &quot;2.4.1&quot;
+classifiers = [
+  &quot;Development Status :: 3 - Alpha&quot;,
+  &quot;Intended Audience :: Developers&quot;,
+  &quot;Topic :: Software Development :: Build Tools&quot;,
+  &quot;License :: OSI Approved :: GNU General Public License v3 (GPLv3)&quot;,
+  &quot;Operating System :: Microsoft :: Windows&quot;,
+  &quot;Operating System :: POSIX&quot;,
+  &quot;Operating System :: Unix&quot;,
+  &quot;Operating System :: MacOS&quot;,
+  &quot;Programming Language :: Python :: 3 :: Only&quot;,
+  &quot;Programming Language :: Python :: 3&quot;,
+  &quot;Programming Language :: Python :: 3.7&quot;,
+  &quot;Programming Language :: Python :: 3.8&quot;,
+  &quot;Programming Language :: Python :: 3.9&quot;,
+  &quot;Programming Language :: Python :: 3.10&quot;,
+  &quot;Programming Language :: Python :: 3.11&quot;,
+  &quot;Programming Language :: Python :: Implementation :: CPython&quot;,
+  &quot;Programming Language :: Python :: Implementation :: PyPy&quot;,
+]
+dynamic = [&quot;optional-dependencies&quot;]
+
+[[project.authors]]
+name = &quot;Tim Ansell&quot;
+email = &quot;mithro@mithis.net&quot;
+
+[[project.authors]]
+name = &quot;Phil Blundell&quot;
+email = &quot;pb@handhelds.org&quot;
+
+[[project.authors]]
+name = &quot;Seb Frankengul&quot;
+email = &quot;seb@frankengul.org&quot;
+
+[[project.authors]]
+name = &quot;Holger Freyther&quot;
+email = &quot;holger@moiji-mobile.com&quot;
+
+[[project.authors]]
+name = &quot;Marcin Juszkiewicz&quot;
+email = &quot;marcin@juszkiewicz.com.pl&quot;
+
+[[project.authors]]
+name = &quot;Chris Larson&quot;
+email = &quot;kergoth@handhelds.org&quot;
+
+[[project.authors]]
+name = &quot;Ulrich Luckas&quot;
+email = &quot;luckas@musoft.de&quot;
+
+[[project.authors]]
+name = &quot;Mickey Lauer&quot;
+email = &quot;mickey@Vanille.de&quot;
+
+[[project.authors]]
+name = &quot;Richard Purdie&quot;
+email = &quot;rpurdie@rpsys.net&quot;
+
+[[project.authors]]
+name = &quot;Holger Schurig&quot;
+email = &quot;holgerschurig@gmx.de&quot;
+
+[project.license]
+text = &quot;GPL v2&quot;
+
+[project.urls]
+Homepage = &quot;https://bitbake.readthedocs.io&quot;
+Download = &quot;https://github.com/Freed-Wu/bitbake/releases&quot;
+&quot;Bug Report&quot; = &quot;https://github.com/Freed-Wu/bitbake/issues&quot;
+Source = &quot;https://github.com/Freed-Wu/bitbake&quot;
+
+[tool.setuptools]
+script-files = [
+  &quot;bin/bitbake&quot;,
+  &quot;bin/bitbake-diffsigs&quot;,
+  &quot;bin/bitbake-dumpsig&quot;,
+  &quot;bin/bitbake-getvar&quot;,
+  &quot;bin/bitbake-hashclient&quot;,
+  &quot;bin/bitbake-hashserv&quot;,
+  &quot;bin/bitbake-layers&quot;,
+  &quot;bin/bitbake-prserv&quot;,
+  &quot;bin/bitbake-selftest&quot;,
+  &quot;bin/bitbake-server&quot;,
+  &quot;bin/bitbake-worker&quot;,
+  &quot;bin/git-make-shallow&quot;,
+  &quot;bin/toaster&quot;,
+  &quot;bin/toaster-eventreplay&quot;,
+]
+
+[tool.setuptools.packages.find]
+where = [&quot;lib&quot;]
+
+[tool.setuptools.data-files]
+&quot;share/man/man1&quot; = [&quot;doc/bitbake.1&quot;]
+
+[tool.setuptools.dynamic.optional-dependencies.toaster]
+file = &quot;toaster-requirements.txt&quot;
-- 
2.40.1
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95637</commentid>
    <comment_count>2</comment_count>
    <who name="wuzhenyu@ustc.edu">wuzhenyu</who>
    <bug_when>2023-06-06 16:43:31 +0000</bug_when>
    <thetext>Sorry, this is right:

```diff
From 83220c57dd7075e6836d890d6114c2a9b6584c0e Mon Sep 17 00:00:00 2001
From: Wu Zhenyu &lt;wuzhenyu@ustc.edu&gt;
Date: Wed, 7 Jun 2023 00:21:01 +0800
Subject: [PATCH] support package

use `python -m build` to build package
set PYPI_API_TOKEN to upload it to PYPI
---
 .github/workflows/python.yml |  44 ++++++++++++
 .gitignore                   | 128 ++++++++++++++++++++++++++++++++++-
 lib/bb/server/process.py     |   5 +-
 pyproject.toml               | 108 +++++++++++++++++++++++++++++
 4 files changed, 282 insertions(+), 3 deletions(-)
 create mode 100644 .github/workflows/python.yml
 create mode 100644 pyproject.toml

diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
new file mode 100644
index 0000000..ab3f7ba
--- /dev/null
+++ b/.github/workflows/python.yml
@@ -0,0 +1,44 @@
+---
+&quot;on&quot;:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+# https://github.com/softprops/action-gh-release/issues/236
+permissions:
+  contents: write
+
+env:
+  PYTHONUTF8: &quot;1&quot;
+  python-version: 3.x
+  cache: pip
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v4
+        with:
+          python-version: ${{env.python-version}}
+          cache: ${{env.cache}}
+      - name: Install dependencies
+        run: |
+          pip install build
+      - name: Build
+        run: |
+          python -m build
+      - uses: pypa/gh-action-pypi-publish@release/v1
+        if: startsWith(github.ref, &apos;refs/tags/&apos;)
+        with:
+          password: ${{secrets.PYPI_API_TOKEN}}
+      - uses: actions/upload-artifact@v3
+        if: &quot;! startsWith(github.ref, &apos;refs/tags/&apos;)&quot;
+        with:
+          path: |
+            dist/*
+      - uses: softprops/action-gh-release@v1
+        if: startsWith(github.ref, &apos;refs/tags/&apos;)
+        with:
+          files: |
+            dist/*
diff --git a/.gitignore b/.gitignore
index fbf9eb2..c646b0f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,3 @@
-*.pyc
-*.pyo
 *~
 pyshtables.py
 /doc/manual/html/
@@ -16,3 +14,129 @@ lib/toaster/contrib/tts/backlog.txt
 lib/toaster/contrib/tts/log/*
 lib/toaster/contrib/tts/.cache/*
 lib/bb/tests/runqueue-tests/bitbake-cookerdaemon.log
+
+# Python.gitignore:
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+#   However, in case of collaboration, if having platform-specific dependencies or dependencies
+#   having no cross-platform support, pipenv may install dependencies that don&apos;t work, or not
+#   install all needed dependencies.
+#Pipfile.lock
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 7616ef5..e5d1cbd 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -32,6 +32,7 @@ import stat
 import bb.server.xmlrpcserver
 from bb import daemonize
 from multiprocessing import queues
+from shutil import which
 
 logger = logging.getLogger(&apos;BitBake&apos;)
 
@@ -619,7 +620,9 @@ class BitBakeServer(object):
         os.close(self.readypipe)
         os.set_inheritable(self.bitbake_lock.fileno(), True)
         os.set_inheritable(self.readypipein, True)
-        serverscript = os.path.realpath(os.path.dirname(__file__) + &quot;/../../../bin/bitbake-server&quot;)
+        serverscript = which(&quot;bitbake-server&quot;)
+        if serverscript is None:
+            serverscript = os.path.realpath(os.path.dirname(__file__) + &quot;/../../../bin/bitbake-server&quot;)
         os.execl(sys.executable, &quot;bitbake-server&quot;, serverscript, &quot;decafbad&quot;, str(self.bitbake_lock.fileno()), str(self.readypipein), self.logfile, self.bitbake_lock.name, self.sockname,  str(self.server_timeout or 0), str(int(self.profile)), str(self.xmlrpcinterface[0]), str(self.xmlrpcinterface[1]))
 
 def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpcinterface, profile):
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..3d22005
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,108 @@
+[build-system]
+requires = [&quot;setuptools_scm[toml] &gt;= 6.2&quot;]
+build-backend = &quot;setuptools.build_meta&quot;
+
+# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
+[project]
+name = &quot;bitbake&quot;
+description = &quot;&quot;
+readme = &quot;README.md&quot;
+requires-python = &quot;&gt;= 3.7&quot;
+keywords = [&quot;yocto&quot;]
+version = &quot;2.4.1&quot;
+classifiers = [
+  &quot;Development Status :: 3 - Alpha&quot;,
+  &quot;Intended Audience :: Developers&quot;,
+  &quot;Topic :: Software Development :: Build Tools&quot;,
+  &quot;License :: OSI Approved :: GNU General Public License v3 (GPLv3)&quot;,
+  &quot;Operating System :: Microsoft :: Windows&quot;,
+  &quot;Operating System :: POSIX&quot;,
+  &quot;Operating System :: Unix&quot;,
+  &quot;Operating System :: MacOS&quot;,
+  &quot;Programming Language :: Python :: 3 :: Only&quot;,
+  &quot;Programming Language :: Python :: 3&quot;,
+  &quot;Programming Language :: Python :: 3.7&quot;,
+  &quot;Programming Language :: Python :: 3.8&quot;,
+  &quot;Programming Language :: Python :: 3.9&quot;,
+  &quot;Programming Language :: Python :: 3.10&quot;,
+  &quot;Programming Language :: Python :: 3.11&quot;,
+  &quot;Programming Language :: Python :: Implementation :: CPython&quot;,
+  &quot;Programming Language :: Python :: Implementation :: PyPy&quot;,
+]
+dynamic = [&quot;optional-dependencies&quot;]
+
+[[project.authors]]
+name = &quot;Tim Ansell&quot;
+email = &quot;mithro@mithis.net&quot;
+
+[[project.authors]]
+name = &quot;Phil Blundell&quot;
+email = &quot;pb@handhelds.org&quot;
+
+[[project.authors]]
+name = &quot;Seb Frankengul&quot;
+email = &quot;seb@frankengul.org&quot;
+
+[[project.authors]]
+name = &quot;Holger Freyther&quot;
+email = &quot;holger@moiji-mobile.com&quot;
+
+[[project.authors]]
+name = &quot;Marcin Juszkiewicz&quot;
+email = &quot;marcin@juszkiewicz.com.pl&quot;
+
+[[project.authors]]
+name = &quot;Chris Larson&quot;
+email = &quot;kergoth@handhelds.org&quot;
+
+[[project.authors]]
+name = &quot;Ulrich Luckas&quot;
+email = &quot;luckas@musoft.de&quot;
+
+[[project.authors]]
+name = &quot;Mickey Lauer&quot;
+email = &quot;mickey@Vanille.de&quot;
+
+[[project.authors]]
+name = &quot;Richard Purdie&quot;
+email = &quot;rpurdie@rpsys.net&quot;
+
+[[project.authors]]
+name = &quot;Holger Schurig&quot;
+email = &quot;holgerschurig@gmx.de&quot;
+
+[project.license]
+text = &quot;GPL v2&quot;
+
+[project.urls]
+Homepage = &quot;https://docs.yoctoproject.org/bitbake&quot;
+Download = &quot;https://git.openembedded.org/bitbake&quot;
+&quot;Bug Report&quot; = &quot;https://bugzilla.yoctoproject.org&quot;
+Source = &quot;https://git.openembedded.org/bitbake&quot;
+
+[tool.setuptools]
+script-files = [
+  &quot;bin/bitbake&quot;,
+  &quot;bin/bitbake-diffsigs&quot;,
+  &quot;bin/bitbake-dumpsig&quot;,
+  &quot;bin/bitbake-getvar&quot;,
+  &quot;bin/bitbake-hashclient&quot;,
+  &quot;bin/bitbake-hashserv&quot;,
+  &quot;bin/bitbake-layers&quot;,
+  &quot;bin/bitbake-prserv&quot;,
+  &quot;bin/bitbake-selftest&quot;,
+  &quot;bin/bitbake-server&quot;,
+  &quot;bin/bitbake-worker&quot;,
+  &quot;bin/git-make-shallow&quot;,
+  &quot;bin/toaster&quot;,
+  &quot;bin/toaster-eventreplay&quot;,
+]
+
+[tool.setuptools.packages.find]
+where = [&quot;lib&quot;]
+
+[tool.setuptools.data-files]
+&quot;share/man/man1&quot; = [&quot;doc/bitbake.1&quot;]
+
+[tool.setuptools.dynamic.optional-dependencies.toaster]
+file = &quot;toaster-requirements.txt&quot;
-- 
2.40.1
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95662</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-06-08 14:56:19 +0000</bug_when>
    <thetext>We encourage distributions to not package bitbake, but instead expect people using bitbake to bundle it with the layers they&apos;re using.  This is mainly because the bitbake API changes in each major release so there&apos;s a high chance that the distribution-provided bitbake isn&apos;t compatible with the layers that you&apos;re trying to use, at which point having a distribution-provided bitbake is pointless.

There&apos;s a related question over having pyproject.toml so that you can build a wheel of bitbake, and whether pypi should have all of the releases, but right now the maintainers stance is that you bundle bitbake with your layers.

Also considering bitbake&apos;s git repository is hosted at git.openembedded.org I&apos;m not sure how useful a .github/workflows/python.yml would be.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>