diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..df6b913 --- /dev/null +++ b/setup.py @@ -0,0 +1,32 @@ +import io +import os +import re + +from setuptools import setup, find_packages + +# Get the version from src/huggingmolecules/__init__.py +# Adapted from https://stackoverflow.com/a/39671214 +this_directory = os.path.dirname(os.path.realpath(__file__)) +init_path = os.path.join(this_directory, 'src', 'huggingmolecules', '__init__.py') +version_matches = re.search( + r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', + io.open(init_path, encoding='utf_8_sig').read(), +) +if version_matches is None: + raise Exception('Could not determine huggingmolecules version from __init__.py') +__version__ = version_matches.group(1) + +setup( + name='huggingmolecules', + version=__version__, + packages=find_packages('src', include=['huggingmolecules*']), + package_dir={'':'src'}, + install_requires=[ + 'torch>=1.7.0', + 'scikit-learn>=0.23.2', + 'filelock>=3.0.12', + 'gdown>=3.12.2', + 'rdkit', + 'setuptools', + ] +)