Page MenuHomePhabricator

Making a pypi package pywikibot-scripts for officially supported scripts
Open, LowPublic


Currently to run any of the scripts, the user needs to clone the git repo. This is not a very nice method for python projects, as pip is the defacto for installing python packages.

It would be nice to make a pywikibot-scripts pypi packages which installs all pywikibot scripts. This way, for a user to install and run pywikibot's official scripts, all they'd have to do is:

$ pip install pywikibot-scripts
$ pwb <script name to run>

Note: The pwb command is described at

Event Timeline

The scripts are also provided as part of a tarball. but agreed that isnt very nice.

Most of our script users still use git to fetch/sync library and scripts together, otherwise their scripts fail.

It would be nice to have a console script which can find the script in different packages. I've commented more on T139143: Make a pywikibot entry point for scripts, but one approach is to create a package namespace , and that package namespace can provide the

I think @valhallasw created a task for moving scripts out of the -core repo, but I cant find it now.

So ideally we have a mechanism in place that allows scripts to be moved from an omnibus package into a separate package, and the user invocation is identical.

We did create a pywikibot-wiktionary to avoid that chunk of code landing in -core, but as I recall it has very little pywikibot usage. It should probably be split into a wiktionary library and a script that utilises both the wiktionary and pywikibot libraries.

Ideally we release 2.0 final, and then request that people put their hands up to be maintainers of a single script. There are many scripts that have one primary author over the years - that person may be happy to take more ownership, especially if we can set up the repo /packaging for them to maintain.

And then the remainder of the scripts could be grouped into sets of scripts with a common focus, e.g. Pywikibot-Wikidata , Pywikibot-Commons , etc.

Change 842959 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [IMPR] Provide an entry point to connect foreign scripts with pwb wapper

Aklapper removed Xqt as the assignee of this task.May 16 2024, 4:40 PM
Aklapper added a subscriber: Xqt.

@Xqt: Removing task assignee as this open task has been assigned for more than two years - see the email sent to all task assignees on 2024-04-15.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see for tips how to best manage your individual work in Phabricator. Thanks!