Skip to content

Commit

Permalink
Read version number from new module
Browse files Browse the repository at this point in the history
  • Loading branch information
tsproisl committed Jul 2, 2019
1 parent a09a1cd commit 3db2b7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@
from os import path
from setuptools import setup

from somajo import __version__
version = {}
with open("somajo/version.py") as fh:
exec(fh.read(), version)

here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst')) as fh:
long_description = fh.read()

setup(
name='SoMaJo',
version=__version__,
version=version["__version__"],
author='Thomas Proisl, Peter Uhrig',
author_email='[email protected]',
packages=[
Expand All @@ -42,7 +44,7 @@
"tokens_with_plus_or_ampersand.txt"]
},
url="https://github.com/tsproisl/SoMaJo",
download_url='https://github.com/tsproisl/SoMaJo/archive/v%s.tar.gz' % __version__,
download_url='https://github.com/tsproisl/SoMaJo/archive/v%s.tar.gz' % version["__version__"],
license='GNU General Public License v3 or later (GPLv3+)',
description='A tokenizer and sentence splitter for German and English web and social media texts.',
long_description=long_description,
Expand Down
2 changes: 1 addition & 1 deletion somajo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from somajo import tokenizer
from somajo import sentence_splitter

__version__ = "1.10.1"
from .version import __version__

Tokenizer = tokenizer.Tokenizer
SentenceSplitter = sentence_splitter.SentenceSplitter

0 comments on commit 3db2b7f

Please sign in to comment.