-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that PROSPECT spectra are stored in library
I think the PROSPECT spectra are now distributed with the library. Addresses #11, @MarcYin can you please test? Thanks!
- Loading branch information
Jose Gomez-Dans
committed
Oct 12, 2018
1 parent
2a8c8e0
commit 58d99dc
Showing
4 changed files
with
33 additions
and
5 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
recursive-include prosail/ *.txt |
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,4 +1,10 @@ | ||
#!/usr/bin/env python | ||
__author__ = "J Gomez-Dans" | ||
__copyright__ = "Copyright 2017, 2018 J Gomez-Dans" | ||
__version__ = "2.0.2" | ||
__license__ = "GPLv3" | ||
__email__ = "[email protected]" | ||
|
||
from .spectral_library import get_spectra | ||
spectral_lib = get_spectra() | ||
from .prospect_d import run_prospect | ||
|
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
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,21 +1,39 @@ | ||
#!/usr/bin/env python | ||
"""Setup script for building prosail's python bindings""" | ||
from setuptools import setup | ||
import os | ||
import codecs | ||
import re | ||
from os import path | ||
from setuptools import setup | ||
|
||
# Global variables for this extension: | ||
name = "prosail" # name of the generated python extension (.so) | ||
description = "PROSPECT, SAIL and PROSAIL Python wrappers" | ||
long_description = "The PROSPECT + SAILh radiative transfer models from Python" | ||
|
||
this_directory = path.abspath(path.dirname(__file__)) | ||
|
||
def read(filename): | ||
with open(os.path.join(os.path.dirname(__file__), filename), "rb") as f: | ||
with open(os.path.join(this_directory, filename), "rb") as f: | ||
return f.read().decode("utf-8") | ||
|
||
|
||
if os.path.exists("README.md"): | ||
long_description = read("README.md") | ||
|
||
def read(*parts): | ||
with codecs.open(os.path.join(this_directory, *parts), 'r') as fp: | ||
return fp.read() | ||
|
||
def find_version(*file_paths): | ||
version_file = read(*file_paths) | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
author = "J Gomez-Dans/NCEO & University College London" | ||
author_email = "[email protected]" | ||
url = "http://github.com/jgomezdans/prosail" | ||
|
@@ -35,6 +53,9 @@ def read(filename): | |
'Environment :: Console' | ||
] | ||
|
||
|
||
|
||
|
||
setup( | ||
name=name, | ||
description=description, | ||
|
@@ -52,7 +73,7 @@ def read(filename): | |
"scipy", | ||
"pytest", | ||
], | ||
version="2.0.1-1", | ||
version=find_version("prosail", "__init__.py"), | ||
packages=["prosail"], | ||
zip_safe=False # Apparently needed for conda | ||
) |