From 5e0c1e3dd804270eb8ec9b3d70eb56387939bbea Mon Sep 17 00:00:00 2001 From: Yusuke Matsui Date: Tue, 6 Oct 2020 09:56:09 +0900 Subject: [PATCH] for v0.3.0. Move the version description to __init__.py --- manga109api/__init__.py | 1 + setup.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/manga109api/__init__.py b/manga109api/__init__.py index f11eaf5..0f26477 100644 --- a/manga109api/__init__.py +++ b/manga109api/__init__.py @@ -1,2 +1,3 @@ __all__ = ['Parser'] +__version__ = '0.3.0' from .manga109api import Parser diff --git a/setup.py b/setup.py index 9d48c46..753c91b 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ from setuptools import setup, find_packages +import re with open('README.md') as f: readme = f.read() @@ -8,9 +9,15 @@ for line in f: requirements.append(line.rstrip()) +with open('manga109api/__init__.py') as f: + # Version is written in manga109api/__init__.py + # This function simply reads it + version = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1) + + setup( name='manga109api', - version='0.2.1', + version=version, description='Simple python API to read annotation data of Manga109', long_description=readme, long_description_content_type='text/markdown',