From de83dbe8059d8f6c5b6b8d4c78e9a0c031439a81 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Mon, 1 Jun 2020 16:18:32 +0200 Subject: [PATCH] fix installation of requirements via setup.py --- pyrff/__init__.py | 2 +- setup.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pyrff/__init__.py b/pyrff/__init__.py index ad75e8d..1796ef9 100644 --- a/pyrff/__init__.py +++ b/pyrff/__init__.py @@ -3,4 +3,4 @@ from . thompson import sample_batch, get_probabilities from . utils import multi_start_fmin -__version__ = '1.0.0' +__version__ = '1.0.1' diff --git a/setup.py b/setup.py index f82ad00..e2cb132 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,11 @@ import setuptools __packagename__ = 'pyrff' +ROOT = pathlib.Path(__file__).parent def get_version(): - VERSIONFILE = pathlib.Path(pathlib.Path(__file__).parent, __packagename__, '__init__.py') + VERSIONFILE = pathlib.Path(ROOT, __packagename__, '__init__.py') initfile_lines = open(VERSIONFILE, 'rt').readlines() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" for line in initfile_lines: @@ -25,7 +26,7 @@ def get_version(): version=__version__, description='Implementation of random fourier feature (RFF) approximations and Thompson sampling.', license='AGPLv3', - long_description=open('README.md').read(), + long_description=open(pathlib.Path(ROOT, 'README.md')).read(), long_description_content_type='text/markdown', url='https://github.com/michaelosthege/pyrff', author='Michael Osthege', @@ -38,7 +39,7 @@ def get_version(): 'Topic :: Scientific/Engineering :: Mathematics' ], install_requires=[ - # via requirements.txt + open(pathlib.Path(ROOT, 'requirements.txt')).readlines() ], python_requires='>=3.6' )