Skip to content

Commit

Permalink
Fix import in setup.py
Browse files Browse the repository at this point in the history
Fixes #8.
  • Loading branch information
bittremieux committed Jul 7, 2020
1 parent 2b084f3 commit 76b9ea8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/ann_solo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.3.0'
__version__ = '0.3.1'

from .ann_solo import ann_solo

Expand Down
24 changes: 21 additions & 3 deletions src/setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import codecs
import os
import setuptools

import numpy as np

import ann_solo

try:
import Cython.Distutils
except ImportError:
Expand All @@ -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:
Expand Down
10 changes: 0 additions & 10 deletions src/wrapper.py

This file was deleted.

0 comments on commit 76b9ea8

Please sign in to comment.