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 -- [email protected]
To unsubscribe send an email to [email protected]