[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-23 Thread JJMC89
JJMC89 added a comment.


  > Sure but is that really what is wanted?
  
  Yes.
  
  > People should have the choice importing the framework and pywikibot_scripts 
should be installed optional (and pywikibot-scripts become its own package at 
Python Package Index).
  
  Why? I don't see any real benefit to having a separate PyPI package, only a 
substantial maintenance burden. After all, some scripts are already in the 
current PyPI package.

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

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

To: Xqt, JJMC89
Cc: Xqt, Aklapper, pywikibot-bugs-list, JJMC89, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, Dvorapa, Altostratus, 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


[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-22 Thread gerritbot
gerritbot added a comment.


  Change 842929 **merged** by jenkins-bot:
  
  [pywikibot/core@master] [FIX] Enable site-package installation from git 
repository (Part 2)
  
  https://gerrit.wikimedia.org/r/842929

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

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

To: Xqt, gerritbot
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


[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-22 Thread gerritbot
gerritbot added a comment.


  Change 842909 **merged** by Xqt:
  
  [pywikibot/core@master] [FIX] Enable site-package installation from git 
repository (Part 1)
  
  https://gerrit.wikimedia.org/r/842909

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

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

To: Xqt, gerritbot
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


[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-20 Thread Xqt
Xqt added a comment.


  > You only need one setup.py that will install multiple site-packages.
  
  Sure but is that really what is wanted? People should have the choice 
importing the framework and pywikibot_scripts should be installed optional (and 
pywikibot-scripts become its own package at Python Package Index). On the other 
hand installing from the repository instead from PyPI and having both installed 
would also be fine if PyPI is an alternative. So we can have both ways.

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


[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-18 Thread JJMC89
JJMC89 added a comment.


  You only need one setup.py that will install multiple site-packages. I did 
some quick testing by updating as below and things seem to work. It installs 3 
site-packages: pywikibot, pywikibot_i18n, and pywikibot_scripts.
  
pywikibot-core
├── MANIFEST.in# updated as below
├── pywikibot
├── pywikibot_i18n # moved from ./scripts/i18n (git submodule 
pywikibot-i18n)
├── pywikibot_scripts  # from current ./scripts but without i18n and 
./pywikibot/scripts
│   └── __main__.py# moved from ./pwb.py
├── docs   # [git only] unchanged
├── maintenance# [git only] if needed for maintenance scripts that 
should not be packaged/distributed
├── tests  # [git only] unchanged
├── pwb.py # [git only] if needed temporarily for compatibility
└── setup.py   # updated as below
  
  
  
diff --git a/MANIFEST.in b/MANIFEST.in
index 0952697fc..32cf5355a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1,2 @@
-graft pywikibot/scripts/i18n/pywikibot
\ No newline at end of file
+include pywikibot_i18n/*/*.json
+
diff --git a/setup.py b/setup.py
index e0e424ea5..5f15c1951 100755
--- a/setup.py
+++ b/setup.py
@@ -234,7 +234,7 @@ def get_packages(name) -> List[str]:  # pragma: no cover
 except ImportError:
 sys.exit(
 'setuptools >= 40.1.0 is required to create a new 
distribution.')
-packages = find_namespace_packages(include=[name + '.*'])
+packages = find_namespace_packages(include=[name + '*'])
 return [str(name)] + packages


@@ -289,7 +289,7 @@ def main() -> None:  # pragma: no cover
 },
 entry_points={
 'console_scripts': [
-'pwb = pywikibot.scripts.pwb:run',
+'pwb = pywikibot_scripts.__main__:run',
 ],
 },
 classifiers=[

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

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

To: Xqt, JJMC89
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


[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-18 Thread Xqt
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
│  └── 
│  └── i18n
│  └── 
├── scripts
│  └── 
│  └── i18n
│  └── 
├── docs
├── tests

pywikibot-i18n
├── 

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  
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 
). 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


[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-17 Thread JJMC89
JJMC89 added a comment.


  We shouldn't be using a custom way to make the distribution. That is just 
asking for things to be broken like this.
  
  It would be simplest from a packaging standpoint to change the git directory 
structure (below) and distribute three packages in the current pywikibot.
  
  name=current
├── pywikibot
├── scripts
│   └── i18n
└── pwb.py
  
  
  
  name=proposed
├── pywikibot
├── pywikibot_i18n
└── pywikibot_scripts
└── pwb.py

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

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

To: Xqt, JJMC89
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


[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-15 Thread gerritbot
gerritbot added a comment.


  Change 842929 had a related patch set uploaded (by Xqt; author: Xqt):
  
  [pywikibot/core@master] [FIX] Enable site-package installation from git 
repository (Part 2)
  
  https://gerrit.wikimedia.org/r/842929

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

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

To: gerritbot
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


[Pywikipedia-bugs] [Maniphest] [Commented On] T320851: pwb console script does not work when pip installed from git

2022-10-15 Thread gerritbot
gerritbot added a comment.


  Change 842909 had a related patch set uploaded (by Xqt; author: Xqt):
  
  [pywikibot/core@master] [FXI] Enable site-package installation from git 
repository (Part 1)
  
  https://gerrit.wikimedia.org/r/842909

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

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

To: gerritbot
Cc: Xqt, Aklapper, pywikibot-bugs-list, JJMC89, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, Dvorapa, Altostratus, 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