Cross-platform using Pip

Our application is already set up to be distributed with pip. You can test this out yourself by opening a terminal window inside the root folder for your text editor and using the following commands:

$ python3 -m venv build-env
$ source build-env/bin/activate
$ pip install .

Provided that you are in the same directory as your setup.py file, pip should be able to parse this and install your text editor to your new virtual environment. You should now be able to run the tkedit command and be shown your text editor application!

If you wish to install the module globally, skip the creation of the virtual environment and just run sudo pip install .. This should install your text editor on your system so that it can be run from anywhere.

Whilst simple, the pip being used is a barrier to entry for any users who may not have Python installed or who are put off by using the command line. Let's have a look at how we can package our application into an executable file for each OS.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset