Skip to content
Permalink
Browse files

determine package version without importing wikipedia in setup.py (fix

  • Loading branch information
goldsmith committed May 31, 2014
1 parent 53ec93a commit bb07795ea76b99ee4c97ea45b7cfce75647b2e00
Showing with 9 additions and 5 deletions.
  1. +9 −5 setup.py
@@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
import os
import codecs
import os
import re
import setuptools

import wikipedia


def local_file(file):
return codecs.open(
@@ -17,11 +16,16 @@ def local_file(file):
if line.strip() != ''
]

version = '.'.join(map(str, wikipedia.__version__))
version = re.search(
"^__version__ = \((\d+), (\d+), (\d+)\)$",
local_file('wikipedia/__init__.py').read(),
re.MULTILINE
).groups()


setuptools.setup(
name = "wikipedia",
version = version,
version = '.'.join(version),
author = "Jonathan Goldsmith",
author_email = "jhghank@gmail.com",
description = "Wikipedia API for Python",

0 comments on commit bb07795

Please sign in to comment.
You can’t perform that action at this time.