File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from setuptools import setup , find_packages
2- import src
32import os
43if len (os .environ .get ("TRAVIS_TAG" , "" ))== 0 :
54 long_description = ""
65else :
76 import pypandoc
87 long_description = pypandoc .convert ('README.md' , 'rst' )
98
9+ import re
10+ # https://milkr.io/kfei/5-common-patterns-to-version-your-Python-package/4
11+ def get_version (path ):
12+ VERSIONFILE = path
13+ initfile_lines = open (VERSIONFILE , 'rt' ).readlines ()
14+ VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
15+ for line in initfile_lines :
16+ mo = re .search (VSRE , line , re .M )
17+ if mo :
18+ return mo .group (1 )
19+ raise RuntimeError ('Unable to find version string in %s.' % (VERSIONFILE ,))
1020
1121requirements = [
1222 "numpy" ,
1525]
1626
1727setup (name = 'jamotools' ,
18- version = src . __version__ ,
28+ version = get_version ( ' src/__init__.py' ) ,
1929 description = 'A library for Korean Jamo split and vectorize.' ,
2030 long_description = long_description ,
2131 classifiers = [
Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ envlist=py27,
44 py35,
55 py36
66skip_missing_interpreters =True
7+ skipsdist =True
78
89[testenv]
910deps =ddt
10- commands =python -m unittest discover -s test
11+ commands =/bin/bash -c " pip wheel --no-deps --wheel-dir=./dist ."
12+ /bin/bash -c " pip install dist/*.whl"
13+ /bin/bash -c " python -m unittest discover -s test"
You can’t perform that action at this time.
0 commit comments