Konstin added a comment.

The source distribution on pypi is created with setuptools and therefore has access to the repository, so you could use e.g. setuptools_scm to write the current version to a .gitignore'd file. Even though this is possible, I'd recommend tracking the version explicitly in the code and/or build configuration. Modern build tools such as flit and poetry do even mandate this.

Querying github in setup.py fails when the building machine has no internet connection and will otherwise lead to really nasty non-deterministic bugs, so I'd definitely refrain from that. __init__.py currently states __version__ = __release__ = '3.1.dev0', which should also be corrected.
`


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

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

To: Konstin
Cc: Dalba, Dvorapa, zhuyifei1999, Framawiki, Xqt, MichaelSchoenitzer, Aklapper, Konstin, pywikibot-bugs-list, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to