// vim:set filetype=asciidoc:
[[pyproject-gui]]
=== pyproject.toml (Python3, GUI)

Here is an example of creating a simple Debian package from a Python3 GUI program using *pyproject.toml*.

Let's assume this upstream tarball to be *debhello-1.3.tar.gz*.

Let's get the source and make the Debian package.

.Download *debhello-1.3.tar.gz*
----
include::../examples/debhello-1.3_build-1/step000.slog[]
----

Here, the content of this *debhello* source tree as follows.

.*pyproject.toml* (v=1.3) -- https://www.python.org/dev/peps/pep-0517/[PEP 517] configuration
----
include::../examples/debhello-1.3_build-1/step103.slog[]
----

.*MANIFEST.in* (v=1.3) -- for tar-ball.
----
include::../examples/debhello-1.3_build-1/step104.slog[]
----

.*src/debhello/\\__init__.py* (v=1.3)
----
include::../examples/debhello-1.3_build-1/step105.slog[]
----

.*src/debhello/main.py* (v=1.3) -- command entry point
----
include::../examples/debhello-1.3_build-1/step106.slog[]
----

Let's package this with the *debmake* command.  Here, the **-b':py3'** option is used to specify that the generated binary package contains Python3 script and module files.

----
include::../examples/debhello-1.3_build-1/step200.slog[lines=1..3]
 ...
include::../examples/debhello-1.3_build-1/step200.slog-sanity[]
 ...
----

The result is practically the same as in "`<<pyproject>>`".

Let's make this Debian package better as the maintainer.

.*debian/rules* (maintainer version, v=1.3):
----
include::../examples/debhello-1.3_build-1/step301.slog[]
----

.*debian/control* (maintainer version, v=1.3):
----
include::../examples/debhello-1.3_build-1/step302.slog[]
----

Please note the manually added *python3-gi* and *gir1.2-gtk-3.0* dependencies.

The rest of the packaging activities are practically the same as in <pyproject>>.

Here is the generated dependency list of *debhello_1.3-1_all.deb*.

.The generated dependency list of *debhello_1.3-1_all.deb*:
----
include::../examples/debhello-1.3_build-1/step702.slog[]
----
