Skip to content

Commit

Permalink
Merge branch 'feature_conda'
Browse files Browse the repository at this point in the history
  • Loading branch information
faph committed Feb 11, 2015
2 parents e9ba346 + 8b07d62 commit 26b1d21
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 37 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
version 1.0.2 (2015-02-11)
--------------------------
- Conda package build fix

version 1.0.1 (2014-12-02)
--------------------------
- Fix `lmom_fit` for `gev` distribution. Did not return `OrderedDict` in some cases.
Expand Down
8 changes: 4 additions & 4 deletions bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""One of the following arguments must be supplied:
- 'major': to increase major version number, e.g. from 1.2.3 to 2.0.0
- 'minor': to increase minor version number, e.g. from 1.2.3 to 1.3.0
- 'patch': to increase patch number, e..g from 1.2.3 to 1.2.4"""
- 'patch': to increase patch number, e.g. from 1.2.3 to 1.2.4"""

LEVELS = ['major', 'minor', 'patch']

Expand Down Expand Up @@ -60,7 +60,7 @@ def update_package_setup(new_version):
file_name= 'setup.py'

new_content = []
with open(file_name) as f:
with open(file_name, encoding='utf-8') as f:
for line in f:
if line.strip().startswith('version'):
line = " version='{}.{}.{}',\n".format(*new_version)
Expand All @@ -73,7 +73,7 @@ def update_doc_conf(new_version):
file_name = './docs/source/conf.py'

new_content = []
with open(file_name) as f:
with open(file_name, encoding='utf-8') as f:
for line in f:
if line.strip().startswith('version'):
line = "version = '{}.{}'\n".format(*new_version[0:2])
Expand All @@ -89,7 +89,7 @@ def update_changelog(new_version):

header = 'version {}.{}.{} ({})'.format(new_version[0], new_version[1], new_version[2], date.today())
new_content = [header + '\n', '-' * len(header) + '\n']
with open(file_name) as f:
with open(file_name, encoding='utf-8') as f:
for line in f:
new_content.append(line)

Expand Down
2 changes: 2 additions & 0 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python setup.py install
if errorlevel 1 exit 1
3 changes: 3 additions & 0 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

$PYTHON setup.py install || exit 1
31 changes: 31 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package:
name: lmoments3
version: {{ environ.get('GIT_DESCRIBE_TAG', '0.0.0')[1:] }}

build:
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}

source:
git_url: ..

requirements:
build:
- python
- setuptools
- numpy 1.9*
- scipy >=0.14

run:
- python
- numpy 1.9*
- scipy >=0.14

test:
imports:
- lmoments3

about:
home: http://github.com/OpenHydrology/lmoments3
license: GPLv3
summary: Python library for estimating linear moments for statistical distributions

12 changes: 7 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import sys
import os
from datetime import date

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -33,6 +34,7 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.viewcode'
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -49,7 +51,7 @@

# General information about the project.
project = 'lmoments3 Library'
copyright = '2014, Florenz A. P. Hollebrandse, Sam Gillespie, William Asquith, J. R. M. Hosking'
copyright = '2014‒{}, Florenz A. P. Hollebrandse, Sam Gillespie, William Asquith, J. R. M. Hosking'.format(date.today().year)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -58,7 +60,7 @@
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.1'
release = '1.0.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -141,7 +143,7 @@

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%d/%m/%Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
Expand All @@ -164,10 +166,10 @@
#html_split_index = False

# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
html_show_sourcelink = False

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
html_show_sphinx = False

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
Expand Down
29 changes: 1 addition & 28 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,9 @@
from setuptools import setup
from os import path

here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()

setup(
name='lmoments3',
version='1.0.1',
version='1.0.2',
packages=['lmoments3'],
url='https://github.com/OpenHydrology/lmoments3',
license='GPLv3',
author='Florenz A. P. Hollebrandse, Sam Gillespie, William Asquith, J. R. M. Hosking',
author_email='[email protected]',
description='Estimate linear moments for statistical distribution functions',
long_description=long_description,
classifiers=[
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable",
"Environment :: Other Environment",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules"
],
install_requires=[
'numpy',
'scipy'
Expand Down

0 comments on commit 26b1d21

Please sign in to comment.