bopen / xarray-sentinel

Xarray backend to Copernicus Sentinel-1 satellite data products
Apache License 2.0
219 stars 22 forks source link

Resource .xsd files not included in pip install #43

Closed scottstanie closed 3 years ago

scottstanie commented 3 years ago

I'm able to have this run when I git clone and pip install . inside the repository. But when I pip install xarray-sentinel, it successfully installs but throws the error

sentinel1.open_dataset( "S1A_IW_SLC__1SDV_20191130T235546_20191130T235613_030147_0371D0_AEE1.SAFE")
...
URLError: <urlopen error [Errno 2] No such file or directory: '/home/scott/miniconda3/envs/mapping/lib/python3.8/site-packages/xarray_sentinel/resources/sentinel1/s1-level-1-product.xsd'>

$ ls /home/scott/miniconda3/envs/mapping/lib/python3.8/site-packages/xarray_sentinel
conventions.py  esa_safe.py  __init__.py  __pycache__  sentinel1.py  version.py

The .xsd files aren't in the directory pip creates, and this is true even after disabling installs from wheel.

I think this might involve setting package_data=True and including a MANIFEST.in file to specify the non-python files to include.

alexamici commented 3 years ago

Thanks for the report. This the first time I'm using setuptools_scm that is supposed to manage the MANIFEST.in automatically, but il looks like I've still some learning to do 😅

alexamici commented 3 years ago

@scottstanie thanks a lot!