Xqt added a comment.

  This is more difficult: On  one side we have the directory mode with the 
pywkibot framework and the script in it and a lot of bot owners use it in that 
way. But also the CI tests works with that structure. On the other hand we have 
the Python Package Index and the Pywikibot framework is shipped in this way. 
Currently we have this structure:
  
    pywikibot-core
    ├── make_dist.py
    ├── pwb.py
    ├── setup.py
    ├── pywikibot
    │   └── scripts
    │      └── <scripts>
    │      └── i18n
    │          └── <pywikibot-bundle>
    ├── scripts
    │  └── <scripts>
    │  └── i18n
    │      └── <bundles>
    ├── docs
    ├── tests
    
    pywikibot-i18n
    ├── <bundles>
    
    pywikibot-delinker
    ...
  
  scripts/i18n is embedded as subpackage and works more or less. Currently 
`make_dist.py` copies the pywikibot bundle to the pywikibot/scripts/i18n and 
the pwb.py wrapper script to pywikibot/scripts. This works because there is a 
scripts entry point which calls pywikibot.scripts.pwb:run().
  
  With thos change <https://gerrit.wikimedia.org/r/c/pywikibot/core/+/842929> 
the pwb.py wrapper scripts is renamed to wrapper.py and resides in 
pywikibot/scripts. The `pwb.py` becomes a caller script which is necessary for 
directory mode only. `make_dist.py` only copies the pywikibot i18n bundle but 
this can be omitted because a minimal 'en' bundle is already there. This 
minimal change enables installing pywikibot as a site-package from a git (or 
svn?) repository instead from the PyPI.
  
  I think it is easy to change to that structure that you proposed. Instead 
having the submodule inside scripts path we have it in root directory of the 
pywikibot-core framework.
  This is easy to implement for directory mode but I've no glue yet how to 
include the package date if it is outside the package (pywikibot) folder.
  
  Another problem is to bundle pywikibot-scripts as a site-package (like here 
<https://gerrit.wikimedia.org/r/c/pywikibot/core/+/842959>). setup.py cannot be 
used for both packages and you cannot have different script names for setup.

TASK DETAIL
  https://phabricator.wikimedia.org/T320851

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, JJMC89, Jersione, Hellket777, 
LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, 
SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, 
Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, 
Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, Maathavan, 
Dvorapa, Altostratus, Neuronton, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
_______________________________________________
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org

Reply via email to