Skip to content

Commit

Permalink
update setup.py
Browse files Browse the repository at this point in the history
solve the problem that building would fail if dependency uninstalled
  • Loading branch information
Augus1999 authored Jan 30, 2022
1 parent b04d302 commit fbf73ee
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
# -*- coding: utf-8 -*-
# Author: Nianze A. TAO (Omozawa SUENO)
import os
import re
from pathlib import Path
from shutil import rmtree
from setuptools import setup, find_packages
from mol2chemfigPy3 import __version__
init_file = Path('mol2chemfigPy3') / 'common.py'

with open(init_file, mode='r', encoding='utf-8') as f:
lines = f.readlines()
for line in lines:
if 'program_version' in line:
version = re.findall(r'[0-9]+\.[0-9]+\.[0-9]+', line)
if len(version) != 0:
version = version[0]
print("version:", version)
break

with open("README.md", mode="r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
name='mol2chemfigPy3',
version=__version__,
version=version,
url='https://augus1999.github.io/mol2chemfigPy3/',
description='python3 version of mol2chemfig',
long_description=long_description,
Expand Down

0 comments on commit fbf73ee

Please sign in to comment.