jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/346342 )
Change subject: Allow date-versioned pypi releases from setup.py ......................................................................
Allow date-versioned pypi releases from setup.py
This creates releases with versions like 3.0.20170403.
Bug: T152907 Change-Id: Ie2b67b936479cbfc33e64a194e3038f367bc006c --- M setup.py M tox.ini 2 files changed, 15 insertions(+), 4 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/setup.py b/setup.py index 560a408..d5167c7 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- -"""Installer script for Pywikibot 2.0 framework.""" +"""Installer script for Pywikibot 3.0 framework.""" # -# (C) Pywikibot team, 2009-2015 +# (C) Pywikibot team, 2009-2017 # # Distributed under the terms of the MIT license. # -from __future__ import absolute_import, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals
import itertools import os @@ -190,7 +190,17 @@ from setuptools import setup, find_packages
name = 'pywikibot' -version = '3.0-dev' +version = '3.0' + +try: + import subprocess + date = subprocess.check_output(['git', 'log', '-1', '--format=%ci']).strip() + date = date.split(" ")[0].replace("-", "") + version = version + "." + date +except Exception as e: + print(e) + version = version + "-dev" + github_url = 'https://github.com/wikimedia/pywikibot-core'
setup( diff --git a/tox.ini b/tox.ini index 7e0a0af..513d5cc 100644 --- a/tox.ini +++ b/tox.ini @@ -147,6 +147,7 @@ putty-ignore = generate_family_file.py : +T001, T003 pwb.py : +T001, T003 + setup.py : +T003 pywikibot/date.py,pywikibot/family.py,pywikibot/fixes.py,pywikibot/textlib.py,pywikibot/userinterfaces/terminal_interface_unix.py,pywikibot/userinterfaces/terminal_interface_win32.py,pywikibot/families/wikipedia_family.py : +E241 pywikibot/textlib.py : +N801 pywikibot/userinterfaces/transliteration.py : +N801
pywikibot-commits@lists.wikimedia.org