in pypi 3.0.20170403 package /scripts tolder and files in root (pwb.py, generate_pamily_files.py, ...) are missing
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | None | T164095 pypi package does not contain scripts folder | |||
Open | Xqt | T139144 Making a pypi package pywikibot-scripts for officially supported scripts | |||
Declined | None | T115784 pip install . in pywikibot should install scripts/ in /usr/local/bin | |||
Open | Xqt | T139143 Make a pywikibot entry point for scripts | |||
Resolved | Feature | Xqt | T270474 Allow using pywikibot without user-config.py and PYWIKIBOT_NO_USER_CONFIG=1 |
Event Timeline
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 ;-)
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.
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.
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
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.
We have packages that contain scripts, but they are not the PyPI packages. Those can be found at https://tools.wmflabs.org/pywikibot/ .
See also:
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
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).