diff --git a/src/ann_solo/__init__.py b/src/ann_solo/__init__.py index ba55347..6363de4 100644 --- a/src/ann_solo/__init__.py +++ b/src/ann_solo/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.3.0' +__version__ = '0.3.1' from .ann_solo import ann_solo diff --git a/src/setup.py b/src/setup.py index 197f477..849a000 100644 --- a/src/setup.py +++ b/src/setup.py @@ -1,9 +1,9 @@ +import codecs +import os import setuptools import numpy as np -import ann_solo - try: import Cython.Distutils except ImportError: @@ -12,8 +12,26 @@ use_cython = True +def read(rel_path): + here = os.path.abspath(os.path.dirname(__file__)) + # Intentionally *not* adding an encoding option to open, See: + # https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690 + with codecs.open(os.path.join(here, rel_path), 'r') as fp: + return fp.read() + + +def get_version(rel_path): + for line in read(rel_path).splitlines(): + if line.startswith('__version__'): + delim = '"' if '"' in line else "'" + return line.split(delim)[1] + else: + raise RuntimeError('Unable to find version string') + + DISTNAME = 'ann_solo' -VERSION = ann_solo.__version__ +# https://packaging.python.org/guides/single-sourcing-package-version/ +VERSION = get_version('ann_solo/__init__.py') DESCRIPTION = 'Spectral library search engine optimized for fast open ' \ 'modification searching' with open('README.md') as f_in: diff --git a/src/wrapper.py b/src/wrapper.py deleted file mode 100644 index e316fa3..0000000 --- a/src/wrapper.py +++ /dev/null @@ -1,10 +0,0 @@ -from ann_solo import ann_solo - - -ann_solo.ann_solo('../../data/interim/iprg2012/human_yeast_targetdecoy.splib', - '../../data/external/iprg2012/iPRG2012.mgf', - 'iPRG2012.mztab', - ['--precursor_tolerance_mass', '20', - '--precursor_tolerance_mode', 'ppm', - '--fragment_mz_tolerance', '0.02', - '--remove_precursor'])