-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
51 lines (46 loc) · 1.52 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from setuptools import setup, find_packages
# Get version number
def getVersionNumber():
with open("SFC_TF/VERSION", "r") as vfile:
version = vfile.read().strip()
return version
__version__ = getVersionNumber()
def choose_proper_project( requires ):
'''
https://stackoverflow.com/questions/14036181/
provide-a-complex-condition-in-install-requires-python-
setuptoolss-setup-py
'''
import pkg_resources
for req in requires:
try:
pkg_resources.require( req )
return [ req ]
except pkg_resources.DistributionNotFound :
pass
pass
print("There are no proper project installation available")
print("To use this app one of the following project versions have to be installed - %s" % requires)
import os; os._exit( os.EX_OK )
pass
setup(name="SFcalculator_tf",
version=__version__,
author="Minhaun Li",
license="MIT",
description="A Differentiable pipeline connecting molecule models and crystallpgraphy data",
url="https://github.com/Hekstra-Lab/SFcalculator",
author_email='[email protected]',
packages=find_packages(),
include_package_data=True,
python_requires=">=3.7",
install_requires=[
"gemmi>=0.5.6",
"reciprocalspaceship>=0.9.18",
choose_proper_project([
"tensorflow>=2.6.0",
"tensorflow-macos>=2.6.0"]),
"tensorflow_probability>=0.14.0",
],
setup_requires=["pytest-runner"],
tests_require=["pytest", "pytest-cov"],
)