Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336845 )

Change subject: Implements about.py file pattern for metadata.
......................................................................

Implements about.py file pattern for metadata.

Change-Id: I94a025a720da06188b39a003a6ff1632b9c2c2bf
---
M pywikibase/__init__.py
A pywikibase/about.py
M setup.py
3 files changed, 27 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/wikibase 
refs/changes/45/336845/1

diff --git a/pywikibase/__init__.py b/pywikibase/__init__.py
index 8a251a6..a40148a 100644
--- a/pywikibase/__init__.py
+++ b/pywikibase/__init__.py
@@ -6,7 +6,12 @@
 from pywikibase.wikibasepage import WikibasePage
 from pywikibase.itempage import ItemPage
 from pywikibase.propertypage import PropertyPage
+from pywikibase.about import (__name__, __version__, __maintainer__,
+                              __maintainer_email__, __description__,
+                              __license__, __url__)
+
 
 # Not to mess with pyflakes
 __all__ = (Coordinate, WbQuantity, WbTime, ItemPage, Property, PropertyPage,
-           WikibasePage, Claim)
+           WikibasePage, Claim, __name__, __version__, __maintainer__,
+           __maintainer_email__, __description__, __license__, __url__)
diff --git a/pywikibase/about.py b/pywikibase/about.py
new file mode 100644
index 0000000..3d08987
--- /dev/null
+++ b/pywikibase/about.py
@@ -0,0 +1,10 @@
+__name__ = 'pywikibase'
+__version__ = '0.0.3'
+__maintainer__ = 'The Pywikibot team',
+__maintainer_email__ = '[email protected]',
+__description__ = "Python package to handle Wikibase DataModel"
+__license__ = 'MIT License'
+__url__ = 'https://www.mediawiki.org/wiki/Pywikibot'
+
+all = [__name__, __version__, __maintainer__, __maintainer_email__,
+       __description__,  __license__, __url__]
diff --git a/setup.py b/setup.py
index 81f0966..06d0f73 100644
--- a/setup.py
+++ b/setup.py
@@ -6,9 +6,14 @@
 # Distributed under the terms of the MIT license.
 #
 
+import os
 import sys
 
 from setuptools import find_packages, setup
+
+about_path = os.path.join(os.path.dirname(__file__), "pywikibase/about.py")
+exec(compile(open(about_path).read(), about_path, "exec"))
+
 
 PYTHON_VERSION = sys.version_info[:3]
 PY2 = (PYTHON_VERSION[0] == 2)
@@ -40,16 +45,15 @@
 
 name = 'pywikibase'
 version = '0.0.3'
-github_url = 'https://github.com/wikimedia/pywikibot-wikibase'
 
 setup(
-    name=name,
-    version=version,
-    description='Python package to handle Wikibase DataModel',
+    name=__name__,  # noqa
+    version=__version__,  # noqa
+    description=__description__,  # noqa
+    maintainer=__maintainer__,  # noqa
+    maintainer_email=__maintainer_email__,  # noqa
+    license=__license__,  # noqa
     long_description=open('README.rst').read(),
-    maintainer='The Pywikibot team',
-    maintainer_email='[email protected]',
-    license='MIT License',
     install_requires=dependencies,
     dependency_links=dependency_links,
     packages=find_packages(),

-- 
To view, visit https://gerrit.wikimedia.org/r/336845
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94a025a720da06188b39a003a6ff1632b9c2c2bf
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/wikibase
Gerrit-Branch: master
Gerrit-Owner: Halfak <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to