Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from hhk7734/setup
Browse files Browse the repository at this point in the history
setup.py: refactor
  • Loading branch information
hhk7734 authored Feb 6, 2022
2 parents becc193 + e2ae7e3 commit 3840b56
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
SOFTWARE.
"""

from os import path
from pathlib import Path

from setuptools import setup

BASE_DIR = path.dirname(path.abspath(__file__))
CHANGELOG_PATH = path.join(BASE_DIR, "CHANGELOG")
BASE_DIR = Path(__file__).parent
CHANGELOG_PATH = BASE_DIR / "CHANGELOG"

with open(CHANGELOG_PATH, "r") as f:
version = f.readline()
version = version.split()
version = version[1][1:-1]
with CHANGELOG_PATH.open(encoding="utf-8") as fd:
version = fd.readline().strip().split()[1]

setup(version=version)

0 comments on commit 3840b56

Please sign in to comment.