climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject climate git commit: CLIMATE-859 Enable restructured text markdown for Pypi uploads
Date Fri, 19 Aug 2016 20:36:25 GMT
Repository: climate
Updated Branches:
  refs/heads/CLIMATE-859 653bec552 -> 818784ede


CLIMATE-859 Enable restructured text markdown for Pypi uploads


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/818784ed
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/818784ed
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/818784ed

Branch: refs/heads/CLIMATE-859
Commit: 818784edebcbaedd4786a27b08b1f3af5498c140
Parents: 653bec5
Author: Lewis John McGibbney <lewis.mcgibbney@gmail.com>
Authored: Fri Aug 19 13:43:43 2016 -0700
Committer: Lewis John McGibbney <lewis.mcgibbney@gmail.com>
Committed: Fri Aug 19 13:43:43 2016 -0700

----------------------------------------------------------------------
 README.md |  2 ++
 setup.py  | 36 +++++++++++++++++++-----------------
 2 files changed, 21 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/818784ed/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 832b261..a8530d3 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,8 @@
 [![Requirements Status](https://requires.io/github/apache/climate/requirements.svg?branch=master)](https://requires.io/github/apache/climate/requirements/?branch=master)
 [![Code Health](https://landscape.io/github/apache/climate/master/landscape.svg?style=flat-square)](https://landscape.io/github/apache/climate/master)
 
+![](https://svn.apache.org/repos/asf/climate/site/trunk/content/images/ocw-logo-variant-sm-01-01-new.png)
+
 Apache Open Climate Workbench is an effort to develop software that performs climate model
evaluations using model outputs from a variety of different sources (the Earth System Grid
Federation, the Coordinated Regional Downscaling Experiment, the U.S. National Climate Assessment
and the North American Regional Climate Change Assessment Program) and temporal/spatial scales
with remote sensing data from NASA, NOAA and other agencies. The toolkit includes capabilities
for rebinning, metrics computation and visualization. For additional project information,
please check the [project website](http://climate.apache.org/).
 
 ## Getting Started

http://git-wip-us.apache.org/repos/asf/climate/blob/818784ed/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 20d746b..0cda41f 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ from setuptools import find_packages, setup
 # Package data
 # ------------
 _author       = 'Apache Open Climate Workbench'
-_authorEmail  = 'dev@climate.apache.org'
+_author_email  = 'dev@climate.apache.org'
 _classifiers  = [
     'Environment :: Console',
     'Intended Audience :: Developers',
@@ -37,30 +37,32 @@ _classifiers  = [
     'Topic :: Software Development :: Libraries :: Python Modules',
 ]
 _description  = 'Apache Open Climate Workbench'
-_downloadURL  = 'http://pypi.python.org/pypi/ocw/'
+_download_url  = 'http://pypi.python.org/pypi/ocw/'
 _requirements = []
 _keywords     = ['climate analysis', 'workbench', 'rebinning', 'metrics', 'computation',
'visualization']
 _license      = 'Apache License, Version 2.0'
 _long_description    = 'The Apache Open Climate Workbench provides tools for the evaluation
and analysis of climate models.'
 _name         = 'ocw'
 _namespaces   = []
-_testSuite    = 'ocw.tests'
+_test_suite    = 'ocw.tests'
 _url          = 'http://climate.apache.org/'
 _version      = '1.2.0'
-_zipSafe      = False
+_zip_safe      = False
 
 # Setup Metadata
 # --------------
 
-def _read(*rnames):
-    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+try:
+    import pypandoc
+    _long_description = pypandoc.convert(
+        source='README.md',
+        format='markdown_github',
+        to='rst',
+        outputfile='README.rst')
+except(IOError, ImportError):
+    _long_description = open('README.md').read()
 
-_header = '*' * len(_name) + '\n' + _name + '\n' + '*' * len(_name)
-_longDescription = '\n\n'.join([
-    _header,
-    _read('README.md')
-])
-open('doc.txt', 'w').write(_longDescription)
+open('doc.txt', 'w').write(_long_description)
 
 # Include shapefiles
 _pathout = os.path.join('ocw', 'shape')
@@ -70,21 +72,21 @@ _package_data = {'ocw': _shapefiles}
 
 setup(
     author=_author,
-    author_email=_authorEmail,
+    author_email=_author_email,
     classifiers=_classifiers,
     description=_description,
-    download_url=_downloadURL,
+    download_url=_download_url,
     include_package_data=True,
     install_requires=_requirements,
     keywords=_keywords,
     license=_license,
-    long_description=_longDescription,
+    long_description=_long_description,
     name=_name,
     namespace_packages=_namespaces,
     packages=find_packages(),
-    test_suite=_testSuite,
+    test_suite=_test_suite,
     url=_url,
     version=_version,
-    zip_safe=_zipSafe,
+    zip_safe=_zip_safe,
     package_data=_package_data
 )


Mime
View raw message