Skip to content

Commit

Permalink
🤝 take latest code from setupmobans and release 0.5.1 🥚 🎡, which carr…
Browse files Browse the repository at this point in the history
…ies LICENSE file, pyexcel/pyexcel#103
  • Loading branch information
chfw committed Oct 20, 2017
1 parent b85ab9e commit 3f15550
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 18 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Change log
================================================================================

0.5.1 - 20.10.2017
--------------------------------------------------------------------------------

added
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#. `#103 <https://github.com/pyexcel/pyexcel/issues/103>`_, include LICENSE file
in MANIFEST.in, meaning LICENSE file will appear in the released tar ball.

0.5.0 - 30.08.2017
--------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include README.rst
include LICENSE
include CHANGELOG.rst
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

project = u'pyexcel-ods'
copyright = u'2015-2017 Onni Software Ltd.'
version = '0.5.0'
release = '0.5.0'
version = '0.5.1'
release = '0.5.1'
exclude_patterns = []
pygments_style = 'sphinx'
html_theme = 'default'
Expand Down
6 changes: 3 additions & 3 deletions pyexcel_ods.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
overrides: "pyexcel.yaml"
name: "pyexcel-ods"
nick_name: ods
version: 0.5.0
current_version: 0.5.0
release: 0.5.0
version: 0.5.1
current_version: 0.5.1
release: 0.5.1
file_type: ods
dependencies:
- pyexcel-io>=0.5.0
Expand Down
61 changes: 50 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
# Template by setupmobans
import os
import codecs
from shutil import rmtree
from setuptools import setup, find_packages, Command

NAME = 'pyexcel-ods'
AUTHOR = 'C.W.'
VERSION = '0.5.0'
VERSION = '0.5.1'
EMAIL = 'wangc_2011@hotmail.com'
LICENSE = 'New BSD'
DESCRIPTION = (
'A wrapper library to read, manipulate and write data in ods format' +
''
)
URL = 'https://github.com/pyexcel/pyexcel-ods'
DOWNLOAD_URL = '%s/archive/0.5.0.tar.gz' % URL
FILES = ['README.rst', 'CHANGELOG.rst']
DOWNLOAD_URL = '%s/archive/0.5.1.tar.gz' % URL
FILES = ['README.rst', 'CHANGELOG.rst']
KEYWORDS = [
'python'
]
Expand Down Expand Up @@ -44,6 +43,42 @@
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
EXTRAS_REQUIRE = {
}
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
sys.executable)
GS_COMMAND = ('gs pyexcel-ods v0.5.1 ' +
"Find 0.5.1 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):
Expand All @@ -57,7 +92,7 @@ def read_files(*files):

def read(afile):
"""Read a file into setup"""
with open(afile, 'r') as opened_file:
with codecs.open(afile, 'r', 'utf-8') as opened_file:
content = filter_out_test_code(opened_file)
content = "".join(list(content))
return content
Expand Down Expand Up @@ -105,5 +140,9 @@ def filter_out_test_code(file_handle):
packages=PACKAGES,
include_package_data=True,
zip_safe=False,
classifiers=CLASSIFIERS
classifiers=CLASSIFIERS,
setup_requires=['gease'],
cmdclass={
'publish': PublishCommand,
}
)
2 changes: 1 addition & 1 deletion test.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pip freeze
nosetests --with-cov --cover-package pyexcel_ods --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_ods && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
nosetests --with-coverage --cover-package pyexcel_ods --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_ods && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pip freeze
nosetests --with-cov --cover-package pyexcel_ods --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_ods && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
nosetests --with-coverage --cover-package pyexcel_ods --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_ods && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long

0 comments on commit 3f15550

Please sign in to comment.