diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5aacac7..f24abe3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,15 @@ Change log ================================================================================ +0.5.2 - 20.10.2017 +-------------------------------------------------------------------------------- + +added +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +#. `#103 `_, include LICENSE file + in MANIFEST.in, meaning LICENSE file will appear in the released tar ball. + 0.5.1 - 02.09.2017 -------------------------------------------------------------------------------- diff --git a/MANIFEST.in b/MANIFEST.in index 5f13ef0..c2e4b1b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include README.rst +include LICENSE include CHANGELOG.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index 504f66f..2a91f71 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,8 +22,8 @@ master_doc = 'index' project = u'pyexcel-io' copyright = u'2015-2017 Onni Software Ltd.' -version = '0.5.1' -release = '0.5.1' +version = '0.5.2' +release = '0.5.2' exclude_patterns = [] pygments_style = 'sphinx' html_theme = 'default' diff --git a/pyexcel_io.yaml b/pyexcel_io.yaml index 273a740..cef429c 100644 --- a/pyexcel_io.yaml +++ b/pyexcel_io.yaml @@ -1,9 +1,9 @@ overrides: "pyexcel.yaml" name: "pyexcel-io" nick_name: io -version: 0.5.1 -current_version: 0.5.1 -release: 0.5.1 +version: 0.5.2 +current_version: 0.5.2 +release: 0.5.2 dependencies: - ordereddict;python_version<"2.7" - lml==0.0.1 diff --git a/setup.py b/setup.py index 7939c45..011ad40 100644 --- a/setup.py +++ b/setup.py @@ -1,17 +1,15 @@ +# Template by setupmobans +import os import codecs -try: - from setuptools import setup, find_packages -except ImportError: - from ez_setup import use_setuptools - use_setuptools() - from setuptools import setup, find_packages +from shutil import rmtree +from setuptools import setup, find_packages, Command import sys PY2 = sys.version_info[0] == 2 PY26 = PY2 and sys.version_info[1] < 7 NAME = 'pyexcel-io' AUTHOR = 'C.W.' -VERSION = '0.5.1' +VERSION = '0.5.2' EMAIL = 'wangc_2011@hotmail.com' LICENSE = 'New BSD' DESCRIPTION = ( @@ -20,7 +18,7 @@ DESCRIPTION = ( '' ) URL = 'https://github.com/pyexcel/pyexcel-io' -DOWNLOAD_URL = '%s/archive/0.5.1.tar.gz' % URL +DOWNLOAD_URL = '%s/archive/0.5.2.tar.gz' % URL FILES = ['README.rst', 'CHANGELOG.rst'] KEYWORDS = [ 'API', @@ -62,6 +60,42 @@ EXTRAS_REQUIRE = { 'xlsx': ['pyexcel-xlsx>=0.5.0'], 'ods': ['pyexcel-ods3>=0.5.0'], } +PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format( + sys.executable) +GS_COMMAND = ('gs pyexcel-io v0.5.2 ' + + "Find 0.5.2 in changelog for more details") +here = os.path.abspath(os.path.dirname(__file__)) + + +class PublishCommand(Command): + """Support setup.py upload.""" + + description = 'Build and publish the package on github and pypi' + user_options = [] + + @staticmethod + def status(s): + """Prints things in bold.""" + print('\033[1m{0}\033[0m'.format(s)) + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + try: + self.status('Removing previous builds…') + rmtree(os.path.join(here, 'dist')) + except OSError: + pass + + self.status('Building Source and Wheel (universal) distribution…') + if os.system(GS_COMMAND) == 0: + os.system(PUBLISH_COMMAND) + + sys.exit() def read_files(*files): @@ -123,5 +157,9 @@ if __name__ == '__main__': packages=PACKAGES, include_package_data=True, zip_safe=False, - classifiers=CLASSIFIERS + classifiers=CLASSIFIERS, + setup_requires=['gease'], + cmdclass={ + 'publish': PublishCommand, + } ) diff --git a/test.bat b/test.bat index 4f1f825..13dc5b6 100644 --- a/test.bat +++ b/test.bat @@ -1,2 +1,2 @@ pip freeze -nosetests --with-cov --cover-package pyexcel_io --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_io && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long +nosetests --with-coverage --cover-package pyexcel_io --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_io && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long diff --git a/test.sh b/test.sh index 4f1f825..13dc5b6 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,2 @@ pip freeze -nosetests --with-cov --cover-package pyexcel_io --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_io && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long +nosetests --with-coverage --cover-package pyexcel_io --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_io && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long