import sys
import time
from setuptools import setup, find_packages

if '--release' in sys.argv:
  IS_RELEASE = True
  sys.argv.remove('--release')
else:
  # Build a nightly package by default.
  IS_RELEASE = False

# Environment-specific dependencies.
extras = {
    'jax': ['jax', 'jaxlib', 'dm-haiku', 'optax'],
    'torch': ['torch', 'torchvision', 'dgl', 'dgllife'],
    'tensorflow': ['tensorflow', 'tensorflow_probability', 'tensorflow_addons'],
}


# get the version from deepchem/__init__.py
def _get_version():
  with open('deepchem/__init__.py') as fp:
    for line in fp:
      if line.startswith('__version__'):
        g = {}
        exec(line, g)
        base = g['__version__']
        if IS_RELEASE:
          return base
        else:
          # nightly version : .devYearMonthDayHourMinute
          if base.endswith('.dev') is False:
            # Force to add `.dev` if `--release` option isn't passed when building
            base += '.dev'
          return base + time.strftime("%Y%m%d%H%M%S")

    raise ValueError('`__version__` not defined in `deepchem/__init__.py`')


setup(
    name='deepchem',
    version=_get_version(),
    url='https://github.com/deepchem/deepchem',
    maintainer='DeepChem contributors',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Console',
        'Intended Audience :: Developers',
        'Intended Audience :: Information Technology',
        'License :: OSI Approved :: MIT License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 3.7',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
    ],
    license='MIT',
    description='Deep learning models for drug discovery, \
        quantum chemistry, and the life sciences.',
    keywords=[
        'deepchem',
        'chemistry',
        'biology',
        'materials-science',
        'life-science',
        'drug-discovery',
    ],
    packages=find_packages(exclude=["*.tests"]),
    project_urls={
        'Documentation': 'https://deepchem.readthedocs.io/en/latest/',
        'Source': 'https://github.com/deepchem/deepchem',
    },
    install_requires=[
        'joblib',
        'numpy>=1.21',
        'pandas',
        'scikit-learn',
        'scipy',
        'rdkit-pypi',
    ],
    extras_require=extras,
    python_requires='>=3.7,<3.10')

@@ -344,16 +344,37 @@
 vision',
+ 'pytorch-lightning',
  'dgl', 
@@ -1117,21 +1117,16 @@
 %0A%0Asetup(
-%0A    
 name='de
@@ -1138,16 +1138,18 @@
 m',%0A    
+ 
+ 
 version=
@@ -1164,16 +1164,18 @@
 sion(),%0A
+  
     url=
@@ -1210,24 +1210,26 @@
 /deepchem',%0A
+  
     maintain
@@ -1260,16 +1260,18 @@
 s',%0A    
+  
 classifi
@@ -1272,24 +1272,26 @@
 assifiers=%5B%0A
+  
         'Dev
@@ -1328,16 +1328,18 @@
         
+ 
+ 
 'Environ
@@ -1352,24 +1352,26 @@
 : Console',%0A
+  
         'Int
@@ -1397,24 +1397,26 @@
 evelopers',%0A
+  
         'Int
@@ -1466,16 +1466,18 @@
         
+  
 'License
@@ -1518,16 +1518,18 @@
         
+  
 'Operati
@@ -1558,16 +1558,18 @@
 ndent',%0A
+  
         
@@ -1609,32 +1609,34 @@
 : 3.7',%0A        
+  
 'Programming Lan
@@ -1660,16 +1660,18 @@
 : 3.8',%0A
+  
         
@@ -1711,27 +1711,31 @@
 : 3.9',%0A    
+ 
+ 
 %5D,%0A
+  
     license=
@@ -1741,16 +1741,18 @@
 ='MIT',%0A
+  
     desc
@@ -1859,16 +1859,18 @@
 .',%0A    
+  
 keywords
@@ -1868,24 +1868,26 @@
  keywords=%5B%0A
+  
         'dee
@@ -1902,16 +1902,18 @@
         
+ 
+ 
 'chemist
@@ -1913,24 +1913,26 @@
 chemistry',%0A
+  
         'bio
@@ -1946,16 +1946,18 @@
         
+  
 'materia
@@ -1977,16 +1977,18 @@
         
+ 
+ 
 'life-sc
@@ -1987,32 +1987,34 @@
 'life-science',%0A
+  
         'drug-di
@@ -2019,24 +2019,26 @@
 discovery',%0A
+  
     %5D,%0A    p
@@ -2036,16 +2036,18 @@
  %5D,%0A    
+  
 packages
@@ -2087,16 +2087,18 @@
 %5D),%0A    
+  
 project_
@@ -2112,16 +2112,18 @@
         
+ 
+ 
 'Documen
@@ -2185,16 +2185,18 @@
         
+  
 'Source'
@@ -2233,24 +2233,26 @@
 /deepchem',%0A
+  
     %7D,%0A    i
@@ -2250,16 +2250,18 @@
  %7D,%0A    
+  
 install_
@@ -2279,16 +2279,18 @@
         
+  
 'joblib'
@@ -2299,16 +2299,18 @@
         
+ 
+ 
 'numpy%3E=
@@ -2324,16 +2324,18 @@
         
+  
 'pandas'
@@ -2332,24 +2332,26 @@
   'pandas',%0A
+  
         'sci
@@ -2366,24 +2366,26 @@
 n',%0A        
+  
 'scipy',%0A   
@@ -2377,24 +2377,26 @@
    'scipy',%0A
+  
         'rdk
@@ -2405,27 +2405,31 @@
 -pypi',%0A    
+ 
+ 
 %5D,%0A
+  
     extras_r
@@ -2443,16 +2443,18 @@
 extras,%0A
+  
     pyth

update pytorch lightning dependency