Installer Scripts

make_dist script

Script to create a new distribution.

The following options are supported:


Print documentation of this file and of


Install the distribution as a local site-package. If a Pywikibot package is already there, it will be uninstalled first.


Upload the package to pypi. This cannot be done if the Pywikibot version is a development release.

-upgrade Upgrade distribution packages pip, setuptools, wheel and twine



[pwb] make_dist [options]


Requires Python 3.6+.

New in version 7.3.

Changed in version 7.4:

  • updates pip, setuptools, wheel and twine packages first

  • installs pre-releases over stable versions

  • also creates built distribution together with source distribution

  • -upgrade option was added


Remove all files which were copied to the pywikibot scripts folder.

Return type



Copy code entry point and i18n files to pywikibot.scripts folder. wrapper script is a console script entry point for the site-package. pywikibot i18n files are used for some translations. They are copied to the pywikibot scripts folder.

Return type



Handle arguments and print documentation if requested.

Read arguments from sys.argv and adjust it passing sdist to setuptools.setup.


Return whether dist is to be installed locally or to be uploaded

Return type

Tuple[bool, bool]


Script entry point.

Return type


setup script

Installer script for Pywikibot framework.

How to create a new distribution:

  • replace the developmental version string in by the corresponding final release

  • create the package with:

    make_dist remote
  • create a new tag with the version number of the final release

  • synchronize the local tags with the remote repositoy

  • merge current master branch to stable branch

  • push new stable branch to Gerrit and merge it the stable repository

  • prepare the next master release by increasing the version number in and adding developmental identifier

  • upload this patchset to Gerrit and merge it.


Find framework packages.


Get a validated pywikibot module version string.

The version number from pywikibot.__metadata__.__version__ is used. with ‘sdist’ option is used to create a new source distribution. In that case the version number is validated: Read tags from git. Verify that the new release is higher than the last repository tag and is not a developmental release.


pywikibot module version string

Return type



Setup entry point.


Check that Python is supported.


Read long description.

Combine included restructured text files which must be done before uploading because the source isn’t available after creating the package.