-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add setup script * Add install instructions to README
- Loading branch information
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
# shapecutter | ||
Cut data out of raster arrays based on Shapely Polygons | ||
|
||
|
||
## Install | ||
|
||
Download the source or clone from GitHub, navigate to the downloaded source then use pip to run the local setup script directly: | ||
|
||
```bash | ||
cd shapecutter | ||
pip install -e . | ||
``` | ||
|
||
**Note:** this will install dependencies from pip. During testing there were some issues installing Cartopy 0.19.0 from pip. To work around this you might be better pre-installing the dependencies directly, for example by using conda: | ||
|
||
```bash | ||
conda create -n shapecutter -c conda-forge iris shapely geopandas | ||
conda activate shapecutter | ||
``` | ||
|
||
And then install shapecutter, as above. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import setuptools | ||
|
||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="shapecutter", | ||
version="0.0.1", | ||
author="Peter Killick", | ||
author_email="[email protected]", | ||
description="Cut data out of raster arrays around shapely geometries", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/informatics-lab/shapecutter", | ||
packages=setuptools.find_packages(), | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", | ||
"Operating System :: OS Independent", | ||
], | ||
python_requires=">=3.7", | ||
install_requires=[ | ||
"geopandas>=0.9.0", | ||
"scitools-iris>=2.4.0", | ||
"Shapely>=1.7.0" | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters