File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212from .api .task import Task
1313from .api .user import User
1414
15- __version__ = '0.1.0rc1 '
15+ __version__ = '0.1.0rc2 '
Original file line number Diff line number Diff line change 1+ import codecs
2+ import os .path
13from setuptools import setup , find_packages
2- from maproulette import __version__
34
45with open ("README.md" , "r" ) as readme :
56 long_description = readme .read ()
67
8+
9+ def read (rel_path ):
10+ here = os .path .abspath (os .path .dirname (__file__ ))
11+ with codecs .open (os .path .join (here , rel_path ), 'r' ) as fp :
12+ return fp .read ()
13+
14+
15+ def get_version (rel_path ):
16+ for line in read (rel_path ).splitlines ():
17+ if line .startswith ('__version__' ):
18+ delim = '"' if '"' in line else "'"
19+ return line .split (delim )[1 ]
20+ else :
21+ raise RuntimeError ("Unable to find version string." )
22+
23+
724name = "maproulette"
8- version = __version__
25+ version = get_version ( f" { name } /__init__.py" )
926setup (name = name ,
1027 version = version ,
1128 description = "A Python API wrapper for MapRoulette" ,
You can’t perform that action at this time.
0 commit comments