Skip to content

Commit 3168dae

Browse files
committed
🤝 take latest code from setupmobans and release 0.5.1 🥚 🎡, which carries LICENSE file, pyexcel/pyexcel#103
1 parent 1f063e0 commit 3168dae

File tree

7 files changed

+68
-19
lines changed

7 files changed

+68
-19
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Change log
22
================================================================================
33

4+
0.5.1 - 20.10.2017
5+
--------------------------------------------------------------------------------
6+
7+
added
8+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9+
10+
#. `#103 <https://github.com/pyexcel/pyexcel/issues/103>`_, include LICENSE file
11+
in MANIFEST.in, meaning LICENSE file will appear in the released tar ball.
12+
413
0.5.0 - 30.08.2017
514
--------------------------------------------------------------------------------
615

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
project = u'pyexcel-odsr'
2323
copyright = u'2015-2017 Onni Software Ltd.'
24-
version = '0.5.0'
25-
release = '0.5.0'
24+
version = '0.5.1'
25+
release = '0.5.1'
2626
exclude_patterns = []
2727
pygments_style = 'sphinx'
2828
html_theme = 'default'

pyexcel_odsr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
overrides: "pyexcel.yaml"
22
name: "pyexcel-odsr"
33
nick_name: odsr
4-
version: 0.5.0
5-
current_version: 0.5.0
6-
release: 0.5.0
4+
version: 0.5.1
5+
current_version: 0.5.1
6+
release: 0.5.1
77
file_type: ods
88
dependencies:
99
- pyexcel-io>=0.5.0

pyexcel_odsr/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Auto generated by moban
2-
__version__ = '0.5.0'
2+
__version__ = '0.5.1'
33
__author__ = 'C.W.'

setup.py

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
try:
2-
from setuptools import setup, find_packages
3-
except ImportError:
4-
from ez_setup import use_setuptools
5-
use_setuptools()
6-
from setuptools import setup, find_packages
1+
# Template by setupmobans
2+
import os
3+
import sys
4+
import codecs
5+
from shutil import rmtree
6+
from setuptools import setup, find_packages, Command
77

88
NAME = 'pyexcel-odsr'
99
AUTHOR = 'C.W.'
10-
VERSION = '0.5.0'
10+
VERSION = '0.5.1'
1111
1212
LICENSE = 'New BSD'
1313
DESCRIPTION = (
@@ -16,8 +16,8 @@
1616
''
1717
)
1818
URL = 'https://github.com/pyexcel/pyexcel-odsr'
19-
DOWNLOAD_URL = '%s/archive/0.5.0.tar.gz' % URL
20-
FILES = ['README.rst', 'CONTRIBUTORS.rst', 'CHANGELOG.rst']
19+
DOWNLOAD_URL = '%s/archive/0.5.1.tar.gz' % URL
20+
FILES = ['README.rst', 'CONTRIBUTORS.rst', 'CHANGELOG.rst']
2121
KEYWORDS = [
2222
'excel',
2323
'ods',
@@ -48,6 +48,42 @@
4848
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
4949
EXTRAS_REQUIRE = {
5050
}
51+
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
52+
sys.executable)
53+
GS_COMMAND = ('gs pyexcel-odsr v0.5.1 ' +
54+
"Find 0.5.1 in changelog for more details")
55+
here = os.path.abspath(os.path.dirname(__file__))
56+
57+
58+
class PublishCommand(Command):
59+
"""Support setup.py upload."""
60+
61+
description = 'Build and publish the package on github and pypi'
62+
user_options = []
63+
64+
@staticmethod
65+
def status(s):
66+
"""Prints things in bold."""
67+
print('\033[1m{0}\033[0m'.format(s))
68+
69+
def initialize_options(self):
70+
pass
71+
72+
def finalize_options(self):
73+
pass
74+
75+
def run(self):
76+
try:
77+
self.status('Removing previous builds...')
78+
rmtree(os.path.join(here, 'dist'))
79+
except OSError:
80+
pass
81+
82+
self.status('Building Source and Wheel (universal) distribution...')
83+
if os.system(GS_COMMAND) == 0:
84+
os.system(PUBLISH_COMMAND)
85+
86+
sys.exit()
5187

5288

5389
def read_files(*files):
@@ -61,7 +97,7 @@ def read_files(*files):
6197

6298
def read(afile):
6399
"""Read a file into setup"""
64-
with open(afile, 'r') as opened_file:
100+
with codecs.open(afile, 'r', 'utf-8') as opened_file:
65101
content = filter_out_test_code(opened_file)
66102
content = "".join(list(content))
67103
return content
@@ -109,5 +145,9 @@ def filter_out_test_code(file_handle):
109145
packages=PACKAGES,
110146
include_package_data=True,
111147
zip_safe=False,
112-
classifiers=CLASSIFIERS
148+
classifiers=CLASSIFIERS,
149+
setup_requires=['gease'],
150+
cmdclass={
151+
'publish': PublishCommand,
152+
}
113153
)

test.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pip freeze
2-
nosetests --with-cov --cover-package pyexcel_odsr --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_odsr && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
2+
nosetests --with-coverage --cover-package pyexcel_odsr --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_odsr && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pip freeze
2-
nosetests --with-cov --cover-package pyexcel_odsr --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_odsr && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long
2+
nosetests --with-coverage --cover-package pyexcel_odsr --cover-package tests --with-doctest --doctest-extension=.rst README.rst tests docs/source pyexcel_odsr && flake8 . --exclude=.moban.d --builtins=unicode,xrange,long

0 commit comments

Comments
 (0)