File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed
Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 77from . import sequencer
88from . import utils
99from . import analyzer
10-
10+ from . _version import __version__
Original file line number Diff line number Diff line change 1+ # special file for defining the current version of the package
2+ __version__ = "0.4.3"
Original file line number Diff line number Diff line change 1- from setuptools import setup , find_packages
1+ import os
2+ import glob
3+ import shutil
4+ from setuptools import setup , find_packages , Command
5+ import codecs
6+ from os import path
7+
28
39# read the contents of your README file
4- from os import path
510this_directory = path .abspath (path .dirname (__file__ ))
611with open (path .join (this_directory , 'README.md' ), encoding = 'utf-8' ) as f :
712 long_description = f .read ()
813
914
15+ # set up automated versioning reading
16+ def read (rel_path ):
17+ here = os .path .abspath (os .path .dirname (__file__ ))
18+ with codecs .open (os .path .join (here , rel_path ), 'r' ) as fp :
19+ return fp .read ()
20+
21+ def get_version (rel_path ):
22+ for line in read (rel_path ).splitlines ():
23+ if line .startswith ('__version__' ):
24+ delim = '"' if '"' in line else "'"
25+ return line .split (delim )[1 ]
26+ else :
27+ raise RuntimeError ("Unable to find version string." )
28+
1029setup (name = 'pytesdaq' ,
11- version = '0.4.2' ,
30+ version = get_version ( 'pytesdaq/_version.py' ) ,
1231 description = 'DAQ and Intruments control for TES development' ,
1332 long_description = long_description ,
1433 long_description_content_type = 'text/markdown' ,
You can’t perform that action at this time.
0 commit comments