Xover added a comment.
I don't particularly care how the various bits of the distro is broken into
pieces, but for anyone who primarily wants to use the finished scripts the PyPI
package is a bit useless right now. Installing the pywikibot package and then
having to do a git checkout of it too in order to use it is… well, let's call
it "not optimal" and leave it at that.
In terms of use cases, the number of people who can and want to use the
officially supported scripts > the number of people who primarily want to write
their own scripts (use pywikibot as a pure framework) > the number of people
who want to develop pywikibot itself. The git checkout (or tarball download,
or…) should only be //necessary// for the latter group; and if you can only
//optimize// for one of the former then pick the first group. You can still use
pywikibot as a pure framework even if the scripts are included in the package,
but you can't (sensibly) use the scripts if they aren't available at all.
In other words, the precise packaging is really an optimization problem where
you need to find a good balance between different needs. First step is to make
the scripts available in the package at all, then consider whether they should
be split out into separate packages to avoid annoying the purists^W^W^W make
dependency management easier and reduce installed footprint. But the scripts do
need to be available in a package (ASAP) irrespective of whether that package
is `pywikibot`, `pywikibot-scripts`, or `pywikibot-adminscripts`.
I ran into this yesterday because I needed to sysop-protect a bunch of pages
and my usual go-to PAWS apparently lacks the right OAuth grants. So I switched
to the local git checkout on my mac, `git pull origin master`, and try to run
`pwb.py protect` it in place only to have it throw due to lacking the
`requests` library. So I turn to Homebrew (a macos package manager) to install
it without cluttering up the system python, only to find that because of
reasons they have stopped distributing Python libraries and are suggesting
either `pip` inside a venv or `pipx` (that handles the venv for you). So…
> pipx install pywikibot
> pipx inject pywikibot requests
…and then figure out that the scripts are for some inexplicable reason not
included. I happen to have a git checkout so I can run the scripts there, but
had that been the next step in the installation instructions I would have just
dropped it. Having to also `pipx inject pywikibot pywikibot-scripts` is
reasonable, but git is not a tool you should point non-developers at.
PS. Either way the docs need to be updated. The statement "Scripts are only
available with Pywikibot if installed in directory mode and not as site
package"—which, as best I can tell, is trying to communicate that the scripts
are not included in the PyPI package—is impenetrable. Neither "directory mode"
nor "site package" or universally understood terms and are not explained or
defined in the docs.
TASK DETAIL
https://phabricator.wikimedia.org/T139144
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xover
Cc: Xover, Xqt, RhinosF1, zhuyifei1999, DrTrigon, jayvdb, valhallasw, Aklapper,
Zppix, pywikibot-bugs-list, AbdealiJK, mevo, PotsdamLamb, Jyoo1011,
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Aram, Viztor, Wenyi, Tbscho,
MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Masti,
Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]