Page MenuHomePhabricator

pypi package does not contain scripts folder
Open, LowPublic

Description

in pypi 3.0.20170403 package /scripts tolder and files in root (pwb.py, generate_pamily_files.py, ...) are missing

Event Timeline

Xqt created this task.Apr 28 2017, 4:27 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptApr 28 2017, 4:27 PM

This is supposed to be the case, as the pypi package is supposed to be used as library, not as command line tool.

If we want to support this, we should:

  • make sure pwb.py is deployed in a /bin/ directory
  • make sure scripts/ is deployed under e.g. site-packages/pywikibot/scripts (not site-packages/scripts, which happened in the initial pypi packages)
  • deploy generate-* in that scripts/ directory as well (I think)
  • make sure pwb.py can find the correct files ;-)
Xqt added a comment.Apr 29 2017, 7:21 AM

I am wondering, older pypi packages did contain the whole Framework including scripts, pwb.py and generate....py

This is supposed to be the case, as the pypi package is supposed to be used as library, not as command line tool.

+1. I wish there is a reduced dependency on user-config.py as well, but that is of course a separate task.

jayvdb added a subscriber: jayvdb.May 28 2017, 5:55 AM

I am wondering, older pypi packages did contain the whole Framework including scripts, pwb.py and generate....py

As long as I can remember, older pypi packages did not include scripts.

IMO it would be better to create a second package 'pywikibot-scripts' that provides the scripts, and then it can have mandatory dependencies on all the packages needed to make those scripts work correctly.

Multichill triaged this task as High priority.May 28 2017, 11:17 AM
Multichill added a subscriber: Multichill.

Why don't we just include the scripts? The whole point of having a package is to make it easier to use for beginners. Beginners use scripts by not including these we make it much harder for them to use

Xqt added a comment.May 28 2017, 12:15 PM

As long as I can remember, older pypi packages did not include scripts.

I am pretty sure most of them contained scripts. Anyway pypi seems good for side package but scripts is not designed for that an we should find another solution for it.

Xqt added a comment.May 28 2017, 12:38 PM

You are right. Only rc4 contained the whole package including scripts and main directory
see: https://pypi.python.org/pypi?:action=files&name=pywikibot&version=2.0rc4

Why don't we just include the scripts? The whole point of having a package is to make it easier to use for beginners.

No. The whole point of having a PyPI package is to have a canonical easy and supported way to install pywikibot as a library, not clutter site-packages with all the irrelevant files (T57584). Separating the scripts into pywikibot-scripts sound like a better idea, but I have no idea how they are supposed to be called (T115784).

Xqt lowered the priority of this task from High to Low.Sep 28 2018, 3:15 AM