-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
71 lines (60 loc) · 1.85 KB
/
setup.py
File metadata and controls
71 lines (60 loc) · 1.85 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import shlex
from subprocess import check_call
from setuptools import find_packages
from setuptools import setup
from setuptools.command.develop import develop
# Create post develop command class for hooking into the python setup process
# This command will run after dependencies are installed
class PostDevelopCommand(develop):
def run(self):
try:
check_call(shlex.split('pre-commit install'))
except Exception as e:
print(f"Unable to run 'pre-commit install' with exception {e}")
develop.run(self)
install_requires = [
'numpy',
'geopandas',
'shapely',
'rasterio',
'pyproj',
'pygc',
'aiohttp',
'wandb',
'zarr',
'gcsfs',
'torch @ https://download.pytorch.org/whl/cu110/torch-1.7.1%2Bcu110-cp38-cp38-linux_x86_64.whl',
'torchvision @ https://download.pytorch.org/whl/cu110/torchvision-0.8.2%2Bcu110-cp38-cp38-linux_x86_64.whl',
'google-cloud-bigquery',
'rioxarray',
'progressbar2',
'pyarrow',
'google-cloud-pubsub',
'kornia',
'loguru',
'torchmetrics',
'dask',
'distributed',
] # alternatively, read from `requirements.txt`
with open('src/wfe/seco/requirements.txt') as fp:
seco_requires = fp.readlines()
print(seco_requires)
extra_requires = ['earthengine-api'] # optional dependencies
test_requires = ['pytest'] # test dependencies
dev_requires = ['pre-commit']
setup(
name='wfe',
version='0.1.0',
package_dir={'': 'src'},
packages=find_packages(where='src'),
install_requires=install_requires,
extras_require={
'test': test_requires,
'extra': extra_requires,
'seco': seco_requires,
'dev': test_requires + dev_requires + seco_requires,
},
cmdclass={'develop': PostDevelopCommand},
include_package_data=True,
package_data={'': ['wfe/data/s2extract/resources/*']},
)